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