forked from sw1ft747/svenmod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
79 lines (66 loc) · 1.91 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
cmake_minimum_required(VERSION 3.3.2)
project(SvenMod)
set(SVENMOD_DLL "svenmod")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(SVENMOD_SOURCE_FILES
svenmod/client.cpp
svenmod/client_weapon.cpp
svenmod/config_manager.cpp
svenmod/console.cpp
svenmod/cvar.cpp
svenmod/game_hooks.cpp
svenmod/render.cpp
svenmod/detours_api.cpp
svenmod/gamedata_finder.cpp
svenmod/gameui_iface.cpp
svenmod/hooks.cpp
svenmod/inventory.cpp
svenmod/keyvalues_custom_parser.cpp
svenmod/logging_system.cpp
svenmod/memory_utils.cpp
svenmod/patterns.cpp
svenmod/player_utils.cpp
svenmod/plugins_manager.cpp
svenmod/svenmod.cpp
svenmod/svenmod_api.cpp
svenmod/utils.cpp
svenmod/vgui_iface.cpp
shared/convar.cpp
shared/interface.cpp
shared/mathlib.cpp
shared/sys.cpp
shared/messagebuffer.cpp
public/udis86/src/decode.c
public/udis86/src/itab.c
public/udis86/src/syn.c
public/udis86/src/syn-att.c
public/udis86/src/syn-intel.c
public/udis86/src/udis86.c
)
include_directories(public)
include_directories(svenmod)
include_directories(launcher)
include_directories(shared)
add_subdirectory(shared)
add_subdirectory(launcher)
add_library(${SVENMOD_DLL} SHARED ${SVENMOD_SOURCE_FILES})
target_link_libraries(${SVENMOD_DLL} OpenGL32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
target_compile_definitions(${SVENMOD_DLL} PRIVATE
DBG_ASSERT
DBG_ASSERT_FATAL
PLATFORM_EXPORTS
LIBUDIS86_EXPORTS
SYS_UTILS_DYNAMIC_LINKED
SYS_UTILS_EXPORTS
)
if (MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT /DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
else()
set(CMAKE_CXX_FLAGS "-m32 -g -std=c++14 -w -Wl,--no-as-needed -ldl, -Wl,-soname,${SVENMOD_DLL}.so")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -s -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-Os")
endif()