1 include_directories(BEFORE common)
3 set(Q3MAP_VERSION 2.5.17n)
4 find_package(Git REQUIRED)
6 COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
7 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
8 OUTPUT_VARIABLE GIT_VERSION
9 OUTPUT_STRIP_TRAILING_WHITESPACE
12 set(Q3MAP_VERSION "${Q3MAP_VERSION}-git-${GIT_VERSION}")
14 add_definitions(-DQ3MAP_VERSION="${Q3MAP_VERSION}")
16 find_package(GLIB REQUIRED)
17 include_directories(${GLIB_INCLUDE_DIRS})
19 find_package(JPEG REQUIRED)
20 include_directories(${JPEG_INCLUDE_DIR})
22 find_package(PNG REQUIRED)
23 include_directories(${PNG_INCLUDE_DIR})
25 find_package(WebP REQUIRED)
26 include_directories(${WEBP_INCLUDE_DIR})
28 find_package(LibXml2 REQUIRED)
29 include_directories(${LIBXML2_INCLUDE_DIR})
31 find_package(ZLIB REQUIRED)
32 include_directories(${ZLIB_INCLUDE_DIRS})
34 find_package(Minizip REQUIRED)
35 include_directories(${Minizip_INCLUDE_DIRS})
37 include_directories(${CMAKE_SOURCE_DIR}/libs/crnrgba)
40 q3map2/game_darkplaces.h
47 q3map2/game_prophecy.h
50 q3map2/game_quakelive.h
51 q3map2/game_reaction.h
52 q3map2/game_smokinguns.h
54 q3map2/game_tenebrae.h
55 q3map2/game_tremulous.h
56 q3map2/game_unvanquished.h
65 common/cmdlib.c common/cmdlib.h
66 common/imagelib.c common/imagelib.h
67 common/inout.c common/inout.h
69 common/md4.c common/md4.h
70 common/mutex.c common/mutex.h
71 common/polylib.c common/polylib.h
75 common/scriplib.c common/scriplib.h
78 common/vfs.c common/vfs.h
86 q3map2/bspfile_abstract.c
98 ${q3map2_games} q3map2/game__null.h
103 q3map2/light_bounce.c
106 q3map2/lightmaps_ydnar.c
119 q3map2/surface_extra.c
120 q3map2/surface_foliage.c
122 q3map2/surface_meta.c
131 set(OPTIONAL_IMAGE_LIBRARIES crnrgba)
132 set(OPTIONAL_IMAGE_DEFINES BUILD_CRUNCH=1)
135 target_compile_definitions(q3map2
137 ${OPTIONAL_IMAGE_DEFINES}
140 target_link_libraries(q3map2
148 ${OPTIONAL_IMAGE_LIBRARIES}
160 common/aselib.c common/aselib.h
161 common/bspfile.c common/bspfile.h
162 common/cmdlib.c common/cmdlib.h
163 common/imagelib.c common/imagelib.h
164 common/inout.c common/inout.h
165 common/md4.c common/md4.h
166 common/scriplib.c common/scriplib.h
167 common/trilib.c common/trilib.h
168 common/vfs.c common/vfs.h
170 q3data/3dslib.c q3data/3dslib.h
173 q3data/md3lib.c q3data/md3lib.h
175 q3data/p3dlib.c q3data/p3dlib.h
177 q3data/q3data.c q3data/q3data.h
182 target_link_libraries(q3data
193 add_custom_target(quake3)
194 add_dependencies(quake3 q3map2 q3data)
197 target_link_libraries(q3map2 pthread m)
198 target_link_libraries(q3data m)