forked from jewalky/srvmgr
-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
74 lines (67 loc) · 1.52 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
cmake_minimum_required(VERSION 3.10)
project(srvmgr)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
link_libraries(ws2_32)
add_library(srvmgr SHARED srvmgr.def
a2server_utils.cpp
antiinvis.cpp
asm_unit_info.cpp
charcheck.cpp
cheat_codes.cpp
cheat_codes_new.cpp
common_new.cpp
config_new.cpp
crash_filter.cpp
crash_fixes.cpp
crashes_new.cpp
CRC_32.cpp
ctl_handle.cpp
distance_bug.cpp
File.cpp
forbidden_items.cpp
inn.cpp
itemex.cpp
magic_resist_limits.cpp
map_rotation.cpp
multiplayer_shop.cpp
partial_drop.cpp
pktmgr.cpp
player_info.cpp
protolayer_hat.cpp
pvm2.cpp
scanrange.cpp
scanrange_check.cpp
screenshots.cpp
shared.cpp
shops.cpp
spell_duration_fix.cpp
srvmgr.cpp
srvmgr_new.cpp
this_call.cpp
quests.cpp
unit_info.cpp
utils.cpp
zxmgr.cpp
lib/hat2.cpp
lib/packet.cpp
lib/ScanrangeCalc.cpp
lib/serialize.cpp
lib/socket.cpp
lib/utils.cpp
)
# Static link.
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
target_compile_options(srvmgr PUBLIC /MT)
target_link_options(srvmgr PUBLIC /NODEFAULTLIB:MSVCRT)
# Postbuild commands.
add_custom_command(TARGET srvmgr
POST_BUILD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND copy build\\Release\\srvmgr.dll postbuild
)
add_custom_command(TARGET srvmgr
POST_BUILD
COMMAND cmd /c ${CMAKE_CURRENT_SOURCE_DIR}/postbuild/srvmgr.bat
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/postbuild
)