]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - tools/quake3/CMakeLists.txt
Merge branch 'NateEag-master-patch-12920' into 'master'
[xonotic/netradiant.git] / tools / quake3 / CMakeLists.txt
1 include_directories(BEFORE common)
2
3 set(Q3MAP_VERSION 2.5.17n)
4
5 if (GIT_VERSION)
6     set(Q3MAP_VERSION "${Q3MAP_VERSION}-git-${GIT_VERSION}")
7 endif ()
8
9 add_definitions(-DQ3MAP_VERSION="${Q3MAP_VERSION}")
10
11 find_package(GLIB REQUIRED)
12 include_directories(${GLIB_INCLUDE_DIRS})
13
14 find_package(JPEG REQUIRED)
15 include_directories(${JPEG_INCLUDE_DIR})
16
17 find_package(PNG REQUIRED)
18 include_directories(${PNG_INCLUDE_DIR})
19
20 find_package(WebP REQUIRED)
21 include_directories(${WEBP_INCLUDE_DIR})
22
23 find_package(LibXml2 REQUIRED)
24 include_directories(${LIBXML2_INCLUDE_DIR})
25
26 find_package(Minizip REQUIRED)
27 include_directories(${Minizip_INCLUDE_DIRS})
28
29 include_directories(${CMAKE_SOURCE_DIR}/libs/crnrgba)
30
31 set(q3map2_games
32         q3map2/game_darkplaces.h
33         q3map2/game_dq.h
34         q3map2/game_ef.h
35         q3map2/game_etut.h
36         q3map2/game_ja.h
37         q3map2/game_jk2.h
38         q3map2/game_nexuiz.h
39         q3map2/game_oa.h
40         q3map2/game_prophecy.h
41         q3map2/game_q3rally.h
42         q3map2/game_qfusion.h
43         q3map2/game_quake3.h
44         q3map2/game_quakelive.h
45         q3map2/game_reaction.h
46         q3map2/game_smokinguns.h
47         q3map2/game_sof2.h
48         q3map2/game_tenebrae.h
49         q3map2/game_tremulous.h
50         q3map2/game_unvanquished.h
51         q3map2/game_warfork.h
52         q3map2/game_warsow.h
53         q3map2/game_wolf.h
54         q3map2/game_wolfet.h
55         q3map2/game_wop.h
56         q3map2/game_xonotic.h
57         )
58
59 radiant_tool(q3map2
60         q3map2/q3map2.rc
61
62         common/cmdlib.c common/cmdlib.h
63         common/imagelib.c common/imagelib.h
64         common/inout.c common/inout.h
65         common/jpeg.c
66         common/md4.c common/md4.h
67         common/mutex.c common/mutex.h
68         common/polylib.c common/polylib.h
69         common/polyset.h
70         common/qfiles.h
71         common/qthreads.h
72         common/scriplib.c common/scriplib.h
73         common/surfaceflags.h
74         common/threads.c
75         common/vfs.c common/vfs.h
76
77         q3map2/brush.c
78         q3map2/brush_primit.c
79         q3map2/bsp.c
80         q3map2/bsp_analyze.c
81         q3map2/bsp_info.c
82         q3map2/bsp_scale.c
83         q3map2/bspfile_abstract.c
84         q3map2/bspfile_ibsp.c
85         q3map2/bspfile_rbsp.c
86         q3map2/convert_ase.c
87         q3map2/convert_bsp.c
88         q3map2/convert_map.c
89         q3map2/convert_obj.c
90         q3map2/decals.c
91         q3map2/exportents.c
92         q3map2/facebsp.c
93         q3map2/fixaas.c
94         q3map2/fog.c
95         ${q3map2_games} q3map2/game__null.h
96         q3map2/help.c
97         q3map2/image.c
98         q3map2/leakfile.c
99         q3map2/light.c
100         q3map2/light_bounce.c
101         q3map2/light_trace.c
102         q3map2/light_ydnar.c
103         q3map2/lightmaps_ydnar.c
104         q3map2/main.c
105         q3map2/map.c
106         q3map2/mesh.c
107         q3map2/minimap.c
108         q3map2/model.c
109         q3map2/patch.c
110         q3map2/path_init.c
111         q3map2/portals.c
112         q3map2/prtfile.c
113         q3map2/q3map2.h
114         q3map2/shaders.c
115         q3map2/surface.c
116         q3map2/surface_extra.c
117         q3map2/surface_foliage.c
118         q3map2/surface_fur.c
119         q3map2/surface_meta.c
120         q3map2/tjunction.c
121         q3map2/tree.c
122         q3map2/vis.c
123         q3map2/visflow.c
124         q3map2/writebsp.c
125         )
126
127 if (BUILD_CRUNCH)
128         set(OPTIONAL_IMAGE_LIBRARIES crnrgba)
129         set(OPTIONAL_IMAGE_DEFINES BUILD_CRUNCH=1)
130 endif ()
131
132 target_compile_definitions(q3map2
133         PRIVATE
134         ${OPTIONAL_IMAGE_DEFINES}
135         )
136
137 target_link_libraries(q3map2
138         ${GLIB_LIBRARIES}
139         ${JPEG_LIBRARIES}
140         ${PNG_LIBRARIES}
141         ${WEBP_LIBRARIES}
142         ${LIBXML2_LIBRARIES}
143         ${Minizip_LIBRARIES}
144         ${OPTIONAL_IMAGE_LIBRARIES}
145         ddslib
146         etclib
147         filematch
148         l_net
149         mathlib
150         picomodel
151         )
152
153 radiant_tool(q3data
154         q3data/q3data.rc
155
156         common/aselib.c common/aselib.h
157         common/bspfile.c common/bspfile.h
158         common/cmdlib.c common/cmdlib.h
159         common/imagelib.c common/imagelib.h
160         common/inout.c common/inout.h
161         common/md4.c common/md4.h
162         common/scriplib.c common/scriplib.h
163         common/trilib.c common/trilib.h
164         common/vfs.c common/vfs.h
165
166         q3data/3dslib.c q3data/3dslib.h
167         q3data/compress.c
168         q3data/images.c
169         q3data/md3lib.c q3data/md3lib.h
170         q3data/models.c
171         q3data/p3dlib.c q3data/p3dlib.h
172         q3data/polyset.c
173         q3data/q3data.c q3data/q3data.h
174         q3data/stripper.c
175         q3data/video.c
176         )
177
178 target_link_libraries(q3data
179         ${GLIB_LIBRARIES}
180         ${LIBXML2_LIBRARIES}
181         ${Minizip_LIBRARIES}
182         filematch
183         etclib
184         l_net
185         mathlib
186         )
187
188 add_custom_target(quake3)
189 add_dependencies(quake3 q3map2 q3data)
190
191 if (UNIX)
192     target_link_libraries(q3map2 pthread m)
193     target_link_libraries(q3data m)
194 endif ()
195
196 target_link_libraries(q3map2)