forked from APGRoboCop/foxbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
140 lines (107 loc) · 3.04 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# -*- CMakeLists.txt generated by CodeLite IDE. Do not edit by hand -*-
cmake_minimum_required(VERSION 2.8.11)
# Workspace name
project(FoXBot)
# This setting is useful for providing JSON file used by CodeLite for code completion
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
# Set default locations
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CONFIGURATION_NAME "Release")
# Projects
# Top project
# Define some variables
set(PROJECT_PATH "${CMAKE_SOURCE_DIR}/")
#{{{{ User Code 1
# Place your code here
#}}}}
include_directories(
.
../hlsdk-2.3-p4/multiplayer/cl_dll
../hlsdk-2.3-p4/multiplayer/dlls
../hlsdk-2.3-p4/multiplayer/common
../hlsdk-2.3-p4/multiplayer/engine
../hlsdk-2.3-p4/multiplayer/pm_shared
../metamod-p-37/metamod
)
# Compiler options
add_definitions(-g)
add_definitions(-O2)
add_definitions(-fexpensive-optimizations)
add_definitions(-Wall)
add_definitions(-march=i686)
add_definitions(-msse2)
add_definitions(-D_strnicmp=strnicmp)
add_definitions(-Wno-unknown-pragmas)
add_definitions(-Wno-write-strings)
add_definitions(
-DNDEBUG
-DWIN32
-D_WINDOWS
-D_WIN32
-D_strnicmp=strnicmp
)
# Linker options
set(LINK_OPTIONS -Xlinker)
set(LINK_OPTIONS ${LINK_OPTIONS} -shared)
set(LINK_OPTIONS ${LINK_OPTIONS} -s)
if(WIN32)
# Resource options
endif(WIN32)
# Library path
set(CMAKE_LDFLAGS "${CMAKE_LDFLAGS} -L. -L. -LDebug ")
# Define the CXX sources
set ( CXX_SRCS
${CMAKE_SOURCE_DIR}/bot.cpp
${CMAKE_SOURCE_DIR}/bot_client.cpp
${CMAKE_SOURCE_DIR}/bot_combat.cpp
${CMAKE_SOURCE_DIR}/bot_navigate.cpp
${CMAKE_SOURCE_DIR}/bot_start.cpp
${CMAKE_SOURCE_DIR}/botcam.cpp
${CMAKE_SOURCE_DIR}/dll.cpp
${CMAKE_SOURCE_DIR}/engine.cpp
${CMAKE_SOURCE_DIR}/h_export.cpp
${CMAKE_SOURCE_DIR}/linkfunc.cpp
${CMAKE_SOURCE_DIR}/meta_api.cpp
${CMAKE_SOURCE_DIR}/sdk_util.cpp
${CMAKE_SOURCE_DIR}/util.cpp
${CMAKE_SOURCE_DIR}/waypoint.cpp
${CMAKE_SOURCE_DIR}/bot_job_assessors.cpp
${CMAKE_SOURCE_DIR}/bot_job_functions.cpp
${CMAKE_SOURCE_DIR}/bot_job_think.cpp
)
if(WIN32)
# Define the resource files
set ( RC_SRCS
${CMAKE_SOURCE_DIR}/res_fox.rc
)
endif(WIN32)
set_source_files_properties(
${CXX_SRCS} PROPERTIES COMPILE_FLAGS
" -g -O2 -fexpensive-optimizations -Wall -march=i686 -msse2 -D_strnicmp=strnicmp -Wno-unknown-pragmas -Wno-write-strings")
if(WIN32)
enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> ${RC_OPTIONS} -O coff -i <SOURCE> -o <OBJECT>")
endif(WIN32)
#{{{{ User Code 2
# Place your code here
#}}}}
add_library(FoXBot SHARED ${RC_SRCS} ${CXX_SRCS} ${C_SRCS})
target_link_libraries(FoXBot ${LINK_OPTIONS})
target_link_libraries(FoXBot
libkernel32.a
libuser32.a
libgdi32.a
libwinspool.a
libcomdlg32.a
libadvapi32.a
libshell32.a
libole32.a
liboleaut32.a
libuuid.a
)
#{{{{ User Code 3
# Place your code here
#}}}}