mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
c4a85050a6
* feat(exception_handler): skip certain exception codes * feat(zydis): Disable BUILD_DOXYGEN and FEATURE_ENCODER * feat(cmake): link dbghelp * feat(exception_handler): implement stack dumper * feat(logger): differentiate between wine and non-wine * feat(logger): add NO_COLOR env var support * fix(logger): fix wine logging (#960) * feat(exception_handler): added string logging of exception * fix(logger): exception access violation NO_COLOR -------- Co-authored-by: Aure7138 <100095051+Aure7138@users.noreply.github.com> Co-authored-by: tupoy-ya <72797377+tupoy-ya@users.noreply.github.com>
58 lines
1.5 KiB
CMake
58 lines
1.5 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
|
|
project(YimMenu CXX ASM_MASM)
|
|
|
|
set(SRC_DIR "${PROJECT_SOURCE_DIR}/src")
|
|
|
|
# Git commit embed
|
|
include(scripts/git.cmake)
|
|
|
|
# Fetch modules
|
|
message("\nFetching modules")
|
|
include(scripts/minhook.cmake)
|
|
include(scripts/async-logger.cmake)
|
|
include(scripts/pugixml.cmake)
|
|
include(scripts/json.cmake)
|
|
include(scripts/cpr.cmake)
|
|
include(scripts/zydis.cmake)
|
|
|
|
message("\nFetching custom modules")
|
|
include(scripts/imgui.cmake)
|
|
include(scripts/gtav-classes.cmake)
|
|
|
|
|
|
# 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}/common.hpp")
|
|
target_link_libraries(YimMenu PRIVATE pugixml minhook AsyncLogger dbghelp imgui cpr Zydis)
|
|
|
|
# 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"
|
|
) |