| 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 |
|
| 28 |
include_directories(${CMAKE_SOURCE_DIR}/libs/crnrgba) |
| 29 |
include_directories(${CMAKE_SOURCE_DIR}/libs/cgltf) |
| 30 |
include_directories(${CMAKE_SOURCE_DIR}/libs/picomodel) |
| 31 |
|
| 32 |
set(q3map2_games |
| 33 |
q3map2/game_darkplaces.h |
| 34 |
q3map2/game_dq.h |
| 35 |
q3map2/game_ef.h |
| 36 |
q3map2/game_etut.h |
| 37 |
q3map2/game_ja.h |
| 38 |
q3map2/game_jk2.h |
| 39 |
q3map2/game_nexuiz.h |
| 40 |
q3map2/game_oa.h |
| 41 |
q3map2/game_prophecy.h |
| 42 |
q3map2/game_q3rally.h |
| 43 |
q3map2/game_qfusion.h |
| 44 |
q3map2/game_quake3.h |
| 45 |
q3map2/game_quakelive.h |
| 46 |
q3map2/game_reaction.h |
| 47 |
q3map2/game_smokinguns.h |
| 48 |
q3map2/game_sof2.h |
| 49 |
q3map2/game_tenebrae.h |
| 50 |
q3map2/game_tremulous.h |
| 51 |
q3map2/game_unvanquished.h |
| 52 |
q3map2/game_warfork.h |
| 53 |
q3map2/game_warsow.h |
| 54 |
q3map2/game_wolf.h |
| 55 |
q3map2/game_wolfet.h |
| 56 |
q3map2/game_wop.h |
| 57 |
q3map2/game_xonotic.h |
| 58 |
) |
| 59 |
|
| 60 |
radiant_tool(q3map2 |
| 61 |
q3map2/q3map2.rc |
| 62 |
|
| 63 |
${CMAKE_SOURCE_DIR}/libs/crnrgba/crn_rgba.h |
| 64 |
${CMAKE_SOURCE_DIR}/libs/cgltf/cgltf.h |
| 65 |
${CMAKE_SOURCE_DIR}/libs/cgltf/cgltf_write.h |
| 66 |
|
| 67 |
common/cmdlib.c common/cmdlib.h |
| 68 |
common/imagelib.c common/imagelib.h |
| 69 |
common/inout.c common/inout.h |
| 70 |
common/jpeg.c |
| 71 |
common/md4.c common/md4.h |
| 72 |
common/mutex.c common/mutex.h |
| 73 |
common/polylib.c common/polylib.h |
| 74 |
common/polyset.h |
| 75 |
common/qfiles.h |
| 76 |
common/qthreads.h |
| 77 |
common/scriplib.c common/scriplib.h |
| 78 |
common/surfaceflags.h |
| 79 |
common/threads.c |
| 80 |
common/vfs.c common/vfs.h |
| 81 |
|
| 82 |
q3map2/brush.c |
| 83 |
q3map2/brush_primit.c |
| 84 |
q3map2/bsp.c |
| 85 |
q3map2/bsp_analyze.c |
| 86 |
q3map2/bsp_info.c |
| 87 |
q3map2/bsp_scale.c |
| 88 |
q3map2/bspfile_abstract.c |
| 89 |
q3map2/bspfile_ibsp.c |
| 90 |
q3map2/bspfile_rbsp.c |
| 91 |
q3map2/convert_ase.c |
| 92 |
q3map2/convert_bsp.c |
| 93 |
q3map2/convert_map.c |
| 94 |
q3map2/convert_obj.c |
| 95 |
q3map2/convert_gltf.c |
| 96 |
q3map2/decals.c |
| 97 |
q3map2/exportents.c |
| 98 |
q3map2/facebsp.c |
| 99 |
q3map2/fixaas.c |
| 100 |
q3map2/fog.c |
| 101 |
${q3map2_games} q3map2/game__null.h |
| 102 |
q3map2/help.c |
| 103 |
q3map2/image.c |
| 104 |
q3map2/leakfile.c |
| 105 |
q3map2/light.c |
| 106 |
q3map2/light_bounce.c |
| 107 |
q3map2/light_trace.c |
| 108 |
q3map2/light_ydnar.c |
| 109 |
q3map2/lightmaps_ydnar.c |
| 110 |
q3map2/main.c |
| 111 |
q3map2/map.c |
| 112 |
q3map2/mesh.c |
| 113 |
q3map2/minimap.c |
| 114 |
q3map2/model.c |
| 115 |
q3map2/patch.c |
| 116 |
q3map2/path_init.c |
| 117 |
q3map2/portals.c |
| 118 |
q3map2/prtfile.c |
| 119 |
q3map2/q3map2.h |
| 120 |
q3map2/shaders.c |
| 121 |
q3map2/surface.c |
| 122 |
q3map2/surface_extra.c |
| 123 |
q3map2/surface_foliage.c |
| 124 |
q3map2/surface_fur.c |
| 125 |
q3map2/surface_meta.c |
| 126 |
q3map2/tjunction.c |
| 127 |
q3map2/tree.c |
| 128 |
q3map2/vis.c |
| 129 |
q3map2/visflow.c |
| 130 |
q3map2/writebsp.c |
| 131 |
) |
| 132 |
|
| 133 |
target_link_libraries(q3map2 |
| 134 |
${GLIB_LIBRARIES} |
| 135 |
${JPEG_LIBRARIES} |
| 136 |
${PNG_LIBRARIES} |
| 137 |
${WEBP_LIBRARIES} |
| 138 |
${LIBXML2_LIBRARIES} |
| 139 |
${Minizip_LIBRARIES} |
| 140 |
crnrgba |
| 141 |
ddslib |
| 142 |
etclib |
| 143 |
filematch |
| 144 |
l_net |
| 145 |
mathlib |
| 146 |
picomodel |
| 147 |
) |
| 148 |
|
| 149 |
radiant_tool(q3data |
| 150 |
q3data/q3data.rc |
| 151 |
|
| 152 |
common/aselib.c common/aselib.h |
| 153 |
common/bspfile.c common/bspfile.h |
| 154 |
common/cmdlib.c common/cmdlib.h |
| 155 |
common/imagelib.c common/imagelib.h |
| 156 |
common/inout.c common/inout.h |
| 157 |
common/md4.c common/md4.h |
| 158 |
common/scriplib.c common/scriplib.h |
| 159 |
common/trilib.c common/trilib.h |
| 160 |
common/vfs.c common/vfs.h |
| 161 |
|
| 162 |
q3data/3dslib.c q3data/3dslib.h |
| 163 |
q3data/compress.c |
| 164 |
q3data/images.c |
| 165 |
q3data/md3lib.c q3data/md3lib.h |
| 166 |
q3data/models.c |
| 167 |
q3data/p3dlib.c q3data/p3dlib.h |
| 168 |
q3data/polyset.c |
| 169 |
q3data/q3data.c q3data/q3data.h |
| 170 |
q3data/stripper.c |
| 171 |
q3data/video.c |
| 172 |
) |
| 173 |
|
| 174 |
target_link_libraries(q3data |
| 175 |
${GLIB_LIBRARIES} |
| 176 |
${LIBXML2_LIBRARIES} |
| 177 |
${Minizip_LIBRARIES} |
| 178 |
filematch |
| 179 |
etclib |
| 180 |
l_net |
| 181 |
mathlib |
| 182 |
) |
| 183 |
|
| 184 |
add_custom_target(quake3) |
| 185 |
add_dependencies(quake3 q3map2 q3data) |
| 186 |
|
| 187 |
if (UNIX) |
| 188 |
target_link_libraries(q3map2 pthread m) |
| 189 |
target_link_libraries(q3data m) |
| 190 |
endif () |
| 191 |
|
| 192 |
target_link_libraries(q3map2) |