0% found this document useful (0 votes)
45 views2 pages

CMake Configuration for YimMenu Project

This document configures a CMake project called YimMenu. It sets the minimum CMake version, defines the source and include directories, includes dependencies, and configures the YimMenu target to build a module library from source files while applying compiler flags and linking dependencies.

Uploaded by

Trap Dad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views2 pages

CMake Configuration for YimMenu Project

This document configures a CMake project called YimMenu. It sets the minimum CMake version, defines the source and include directories, includes dependencies, and configures the YimMenu target to build a module library from source files while applying compiler flags and linking dependencies.

Uploaded by

Trap Dad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

cmake_minimum_required(VERSION 3.

20)

project(YimMenu CXX ASM_MASM)

set(SRC_DIR "${PROJECT_SOURCE_DIR}/src")

# Git commit embed


include(scripts/[Link])

# Fetch modules
message("\nFetching modules")
include(scripts/[Link])
include(scripts/[Link])
include(scripts/[Link])
include(scripts/[Link])
include(scripts/[Link])
include(scripts/[Link])
include(scripts/[Link])

message("\nFetching custom modules")


include(scripts/[Link])
include(scripts/[Link])

# YimMenu
message(STATUS "YimMenu")
file(GLOB_RECURSE SRC_MAIN
"${SRC_DIR}/**.hpp"
"${SRC_DIR}/**.h"
"${SRC_DIR}/**.cpp"
"${SRC_DIR}/**.cc"
"${SRC_DIR}/**.cxx"
"${SRC_DIR}/**.asm"
)
add_library(YimMenu MODULE "${SRC_MAIN}")

set_property(GLOBAL PROPERTY USE_FOLDERS ON)


set_property(TARGET YimMenu PROPERTY CXX_STANDARD 23) # 23 Because std::format is
not avalible in std:c++20 for some reason. Maybe it's because i use v142 toolset.

source_group(TREE ${SRC_DIR} PREFIX "src" FILES ${SRC_MAIN} )

target_include_directories(YimMenu PRIVATE
"${SRC_DIR}"
"${json_SOURCE_DIR}/single_include"
"${gtav_classes_SOURCE_DIR}"
"${imgui_SOURCE_DIR}"
)

target_precompile_headers(YimMenu PRIVATE "${SRC_DIR}/[Link]")


target_link_libraries(YimMenu PRIVATE pugixml minhook AsyncLogger dbghelp imgui cpr
Zydis lua_static)

# Warnings as errors
set_property(TARGET YimMenu PROPERTY COMPILE_WARNING_AS_ERROR ON)

add_compile_definitions(YimMenu
"_CRT_SECURE_NO_WARNINGS"
"NOMINMAX"
"WIN32_LEAN_AND_MEAN"
)

You might also like