-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathCMakeLists.txt
73 lines (64 loc) · 1.21 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
cmake_minimum_required(VERSION 3.19)
project(sscanf LANGUAGES C CXX VERSION 2.15.1)
set(CMAKE_CXX_STANDARD 17)
include_directories(
robin-hood-hashing/src/include
string-view-lite/include
open.mp/include
span-lite/include
glm
amx
.
)
add_definitions(
-DPROJECT_NAME="sscanf"
-DHAVE_STDINT_H=1
-DGLM_FORCE_SSE2=1
-DGLM_FORCE_QUAT_DATA_WXYZ=1
-DNOMINMAX=1
-Dnssv_CONFIG_SELECT_STRING_VIEW=nssv_STRING_VIEW_NONSTD
-Dspan_CONFIG_SELECT_SPAN=span_SPAN_NONSTD
-DPAWN_CELL_SIZE=32
)
if(MSVC)
add_definitions(
-DWIN32
-D_CRT_SECURE_NO_DEPRECATE=1
-DWIN32_LEAN_AND_MEAN=1
-DSUBHOOK_STATIC
)
add_library(${PROJECT_NAME} SHARED
amx/amx.c
amx/amxplugin.c
sscanf.def
subhook/subhook.c
array.cpp
data.cpp
enum.cpp
kustom.cpp
specifiers.cpp
sscanf.cpp
utils.cpp
error.cpp
)
elseif(UNIX)
add_definitions(
-DLINUX=1
)
set(CMAKE_C_FLAGS "-m32 -fPIC -O2 -w")
set(CMAKE_CXX_FLAGS "-m32 -fPIC -O2 -w")
add_library(${PROJECT_NAME} SHARED
amx/amx.c
amx/amxplugin.c
amx/getch.c
subhook/subhook.c
array.cpp
data.cpp
enum.cpp
kustom.cpp
specifiers.cpp
sscanf.cpp
utils.cpp
)
endif()
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT sscanf)