forked from samp-incognito/samp-streamer-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
202 lines (182 loc) · 4.17 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
include(AMXConfig)
include(AddSAMPPlugin)
set(SOURCE_NATIVES
natives/actors.cpp
natives/areas.cpp
natives/checkpoints.cpp
natives/deprecated.cpp
natives/extended.cpp
natives/manipulation.cpp
natives/map-icons.cpp
natives/miscellaneous.cpp
natives/objects.cpp
natives/pickups.cpp
natives/race-checkpoints.cpp
natives/settings.cpp
natives/text-labels.cpp
natives/updates.cpp
)
set(SOURCE_FILES
cell.cpp
core.cpp
data.cpp
grid.cpp
identifier.cpp
item.cpp
player.cpp
streamer.cpp
chunk-streamer.cpp
utility/amx.cpp
utility/geometry.cpp
utility/misc.cpp
manipulation/array.cpp
manipulation/float.cpp
manipulation/int.cpp
)
SET(HEADER_FILES
cell.h
common.h
core.h
data.h
grid.h
identifier.h
item.h
main.h
manipulation.h
natives.h
player.h
streamer.h
chunk-streamer.h
utility.h
utility/amx.h
utility/geometry.h
utility/misc.h
manipulation/array.h
manipulation/float.h
manipulation/int.h
)
SET(PLUGIN_FILES
callbacks.cpp
main.cpp
streamer.def
streamer.rc
)
# Plugin
if (SAMP_STREAMER_INCLUDE_PLUGIN)
streamer_add_samp_plugin(streamer
${PLUGIN_FILES}
${SOURCE_FILES}
${SOURCE_NATIVES}
${HEADER_FILES}
)
target_link_libraries(streamer
boost::unordered
boost::smart_ptr
boost::geometry
boost::bimap
)
if (SAMP_STREAMER_USE_BUILD_DIR)
# Target output
set_target_properties(streamer
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${SAMP_STREAMER_BIN_OUT_DIR}/plugins"
LIBRARY_OUTPUT_DIRECTORY "${SAMP_STREAMER_BIN_OUT_DIR}/plugins"
RUNTIME_OUTPUT_DIRECTORY "${SAMP_STREAMER_BIN_OUT_DIR}/plugins"
)
# Streamerr include file handling
set(STREAMER_INCLUDE_SRC "${SAMP_STREAMER_ROOT}/include/streamer.inc")
set(STREAMER_INCLUDE_DST "${SAMP_STREAMER_BIN_OUT_DIR}/include/streamer.inc")
# Copy
add_custom_command(
TARGET streamer POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${STREAMER_INCLUDE_SRC}
${STREAMER_INCLUDE_DST}
COMMENT "Copy Pawno include file")
endif()
endif()
set(SOURCE_LIB
implements/actors_impl.cpp
implements/areas_impl.cpp
implements/checkpoints_impl.cpp
implements/deprecated_impl.cpp
implements/extended_impl.cpp
implements/manipulation_impl.cpp
implements/map-icons_impl.cpp
implements/miscellaneous_impl.cpp
implements/objects_impl.cpp
implements/pickups_impl.cpp
implements/race-checkpoints_impl.cpp
implements/settings_impl.cpp
implements/text-labels_impl.cpp
implements/updates_impl.cpp
implements/streamer_impl.cpp
implements/main_impl.cpp
)
SET(SOURCE_LIB_HEADER
include/streamer/actors.hpp
include/streamer/areas.hpp
include/streamer/checkpoints.hpp
include/streamer/config.hpp
include/streamer/deprecated.hpp
include/streamer/extended.hpp
include/streamer/manipulation.hpp
include/streamer/map-icons.hpp
include/streamer/miscellaneous.hpp
include/streamer/objects.hpp
include/streamer/pickups.hpp
include/streamer/race-checkpoints.hpp
include/streamer/settings.hpp
include/streamer/streamer.hpp
include/streamer/text-labels.hpp
include/streamer/updates.hpp
)
# Library
streamer_add_library(streamer-lib
${SOURCE_FILES}
${HEADER_FILES}
${SOURCE_LIB}
${SOURCE_LIB_HEADER}
)
target_include_directories(streamer-lib PUBLIC include/)
target_link_libraries(streamer-lib
boost::unordered
boost::smart_ptr
boost::geometry
boost::bimap
eigen
)
if (SAMP_STREAMER_USE_BUILD_DIR)
# Target output
set_target_properties(streamer-lib
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${SAMP_STREAMER_BIN_OUT_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${SAMP_STREAMER_BIN_OUT_DIR}/lib"
RUNTIME_OUTPUT_DIRECTORY "${SAMP_STREAMER_BIN_OUT_DIR}/lib"
)
endif()
# Library with natives
streamer_add_library(streamer-plugin-lib
${SOURCE_FILES}
${HEADER_FILES}
${SOURCE_LIB}
${SOURCE_NATIVES}
${SOURCE_LIB_HEADER}
)
target_include_directories(streamer-plugin-lib PUBLIC include/)
target_link_libraries(streamer-plugin-lib
boost::unordered
boost::smart_ptr
boost::geometry
boost::bimap
eigen
)
if (SAMP_STREAMER_USE_BUILD_DIR)
# Target output
set_target_properties(streamer-lib
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${SAMP_STREAMER_BIN_OUT_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${SAMP_STREAMER_BIN_OUT_DIR}/lib"
RUNTIME_OUTPUT_DIRECTORY "${SAMP_STREAMER_BIN_OUT_DIR}/lib"
)
endif()