forked from modulecnw/gvmp-anticheat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
91 lines (75 loc) · 2.16 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
cmake_minimum_required (VERSION 2.8)
project(NEMO_AC)
set(PROJECT_NAME NEMO_AC)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-DALT_CLIENT)
add_definitions(-DALT_CLIENT_API)
file(GLOB_RECURSE PROJECT_SOURCE_FILES "src/*.h" "src/*.hpp" "src/*.cpp" "include/*.h" "include/*.hpp" "include/*.cpp")
macro(GroupSources curdir groupindex)
file(GLOB children RELATIVE ${curdir} ${curdir}/*)
foreach(child ${children})
if(IS_DIRECTORY ${curdir}/${child})
GroupSources(${curdir}/${child} ${groupindex}/${child})
else()
string(REPLACE "/" "\\" groupname ${groupindex})
source_group(${groupname} FILES ${curdir}/${child})
endif()
endforeach()
endmacro()
GroupSources(${PROJECT_SOURCE_DIR}/src "Source Files")
GroupSources(${PROJECT_SOURCE_DIR}/include "Include Files")
include_directories(
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/include
$ENV{DXSDK_DIR}/Include
)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(${PROJECT_NAME} PRIVATE
-Wno-deprecated-declarations
-Wno-switch-enum
-Wno-unused-command-line-argument
-Wno-macro-redefined
-Wno-inconsistent-missing-override
-Wno-deprecated-declarations
-Wno-return-type
-Wno-switch-enum
-Wno-switch
-Wno-parentheses
-Wno-unused-private-field
-Wno-unused-variable
-Wno-format
-Wno-reorder
-Wno-delete-non-virtual-dtor
-Wno-microsoft-cast
-Wno-unused-function
-Wno-unused-lambda-capture
-Wno-missing-braces
-Wno-unused-local-typedef
-Wno-tautological-constant-out-of-range-compare
-Wno-delete-incomplete
-Wno-c++11-narrowing
-Wno-comment
)
target_compile_options(${PROJECT_NAME} PRIVATE
-fms-compatibility
-fms-extensions
/EHsc
/FORCE
)
set_target_properties(${PROJECT_NAME} PROPERTIES
COTIRE_ENABLE_PRECOMPILED_HEADER FALSE
COTIRE_ADD_UNITY_BUILD FALSE
)
endif()
link_directories(
$ENV{DXSDK_DIR}/Lib/x64
${PROJECT_SOURCE_DIR}/libs
)
add_library(
${PROJECT_NAME} SHARED
${PROJECT_SOURCE_FILES}
)
if (WIN32)
target_link_libraries(${PROJECT_NAME} libMinHook.x64.lib d3d11.lib D3dcompiler.lib)
endif (WIN32)