engine: reject mbf21 and shit24 wads. there is no way to know if it is safe to ignore...
[k8vavoom.git] / source / CMakeLists.txt
blob2a6172d949b122bf2593384d3bd148875a60212a
1 if(WITH_GLES)
2   set(VSHADPP_DEFINES -DGL4ES_HACKS)
3 endif()
5 function(sxx_compile output filename)
6   get_filename_component(ext ${filename} EXT)
7   if(NOT ext STREQUAL ".sxx")
8     return()
9   endif()
10   get_filename_component(base ${filename} NAME_WE)
11   set(base_abs ${CMAKE_CURRENT_BINARY_DIR}/${base})
12   set(outfiles ${base_abs}.ci ${base_abs}.hi)
13   set(${output} ${${output}} ${outfiles} PARENT_SCOPE)
14   #message("outfiles=${outfiles}, DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${filename}")
15   if(CMAKE_CROSSCOMPILING AND NOT WIN32)
16     file(GLOB vshadpp_FILES CONFIGURE_DEPENDS
17       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/*.vs
18       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/*.fs
19       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/common/*.vs
20       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/common/*.fs
21       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/common/*.inc
22       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/decal/*.fs
23       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/decal/*.vs
24       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/draw/*.fs
25       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/draw/*.vs
26       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/lightmap/*.fs
27       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/lightmap/*.vs
28       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/masked/*.fs
29       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/masked/*.vs
30       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/masked/poly/*.fs
31       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/masked/poly/*.vs
32       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/particle/*.fs
33       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/particle/*.vs
34       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/*.fs
35       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/*.vs
36       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/model/*.fs
37       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/model/*.vs
38       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/surf/*.fs
39       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/surf/*.vs
40       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/sky/*.fs
41       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/sky/*.vs
42       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/wipe/*.fs
43       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/wipe/*.vs
44       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/bloom/*.fs
45       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/bloom/*.vs
46       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/cas/*.fs
47       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/cas/*.vs
48       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/colorblind/*.fs
49       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/colorblind/*.vs
50       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/colormatrix/*.fs
51       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/colormatrix/*.vs
52       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/overbright/*.fs
53       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/overbright/*.vs
54       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/tonemap/*.fs
55       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/tonemap/*.vs
56       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/underwater/*.fs
57       ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/underwater/*.vs
58       )
59     # assume we have vshadpp in PATH
60     add_custom_command(
61       OUTPUT ${outfiles}
62       COMMAND vshadpp ${VSHADPP_DEFINES} -o ${CMAKE_CURRENT_BINARY_DIR} -b ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
63       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
64       ${vshadpp_FILES}
65       #${CMAKE_CURRENT_SOURCE_DIR}/${mastername}
66     )
67 else()
68   file(GLOB vshadpp_FILES CONFIGURE_DEPENDS
69     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/*.vs
70     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/*.fs
71     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/common/*.vs
72     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/common/*.fs
73     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/common/*.inc
74     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/decal/*.fs
75     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/decal/*.vs
76     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/draw/*.fs
77     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/draw/*.vs
78     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/lightmap/*.fs
79     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/lightmap/*.vs
80     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/masked/*.fs
81     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/masked/*.vs
82     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/masked/poly/*.fs
83     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/masked/poly/*.vs
84     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/particle/*.fs
85     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/particle/*.vs
86     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/*.fs
87     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/*.vs
88     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/model/*.fs
89     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/model/*.vs
90     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/surf/*.fs
91     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/shadowvol/surf/*.vs
92     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/sky/*.fs
93     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/sky/*.vs
94     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/wipe/*.fs
95     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/wipe/*.vs
96     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/bloom/*.fs
97     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/bloom/*.vs
98     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/cas/*.fs
99     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/cas/*.vs
100     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/colorblind/*.fs
101     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/colorblind/*.vs
102     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/colormatrix/*.fs
103     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/colormatrix/*.vs
104     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/overbright/*.fs
105     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/overbright/*.vs
106     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/tonemap/*.fs
107     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/tonemap/*.vs
108     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/underwater/*.fs
109     ${CMAKE_SOURCE_DIR}/basev/common/glshaders/postprocess/underwater/*.vs
110     )
112     add_custom_command(
113       OUTPUT ${outfiles}
114       COMMAND ${WINERUN} $<TARGET_FILE:vshadpp> ${VSHADPP_DEFINES} -o ${CMAKE_CURRENT_BINARY_DIR} -b ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
115       DEPENDS vshadpp ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
116       ${vshadpp_FILES}
117       #${CMAKE_CURRENT_SOURCE_DIR}/${mastername}
118     )
119   endif()
120   set_source_files_properties(${outfiles} PROPERTIES GENERATED TRUE)
121 endfunction()
124 if(CMAKE_BUILD_TYPE MATCHES "Debug")
125   add_definitions(-DVAVOOM_DEBUG_BUILD=1)
126 endif()
130 #---------------------------------------
132 # Texture loader and manager sources
134 #---------------------------------------
135 set(TEXTURELIB_SOURCES
136   textures/r_tex_id.h
137   textures/r_tex_public.h
138   textures/r_tex.h
139   textures/r_tex.cpp
140   textures/r_tex_id.cpp
141   textures/r_tex_animdef.cpp
142   textures/r_tex_base.cpp
143   textures/r_tex_camera.cpp
144   textures/r_tex_warp.cpp
145   textures/r_tex_translation.cpp
146   textures/r_tex_atlas.cpp
147   # image loaders
148   textures/formats/img_automap.cpp
149   textures/formats/img_flat.cpp
150   textures/formats/img_imgz.cpp
151   textures/formats/img_jpeg.cpp
152   textures/formats/img_multipatch.cpp
153   textures/formats/img_patch.cpp
154   textures/formats/img_pcx.cpp
155   textures/formats/img_png.cpp
156   textures/formats/img_raw.cpp
157   textures/formats/img_tga.cpp
160 set(RENDERBASE_SOURCES
161   render/r_local.h
162   render/r_public.h
163   render/r_shared.h
164   render/r_bsp.cpp
165   render/r_bsp_reg.cpp
166   render/r_bsp_adv.cpp
167   render/r_data.cpp
168   render/r_data.cpp
169   render/r_light.cpp
170   render/r_light_reg.cpp
171   render/r_light_reg_check.cpp
172   render/r_light_adv.cpp
173   render/r_light_adv_collect.cpp
174   render/r_light_adv_cvars.cpp
175   render/r_light_adv_fltopt.cpp
176   render/r_main.cpp
177   render/r_main_base.cpp
178   render/r_main_decals.cpp
179   render/r_main_reg.cpp
180   render/r_main_adv.cpp
181   render/r_model_parse.cpp
182   render/r_model_gz.cpp
183   render/r_model_render.cpp
184   render/modelparse/md2_normals.h
185   render/modelparse/voxelib.cpp
186   render/modelparse/r_parsecommon.cpp
187   render/modelparse/r_parse_md2.cpp
188   render/modelparse/r_parse_md3.cpp
189   render/modelparse/r_parse_kvx.cpp
190   render/r_particle.cpp
191   render/r_portal.cpp
192   render/r_sky.cpp
193   render/r_surf_1sided.cpp
194   render/r_surf_2sextra.cpp
195   render/r_surf_2sided.cpp
196   render/r_surf_2sided_pobj.cpp
197   render/r_surf_axes_texture.cpp
198   render/r_surf_common.cpp
199   render/r_surf_flat.cpp
200   render/r_surf_lmap_io.cpp
201   render/r_surf_mgmt.cpp
202   render/r_surf_opening.cpp
203   render/r_surf_post_adv.cpp
204   render/r_surf_post_reg.cpp
205   render/r_surf_tjunk.cpp
206   render/r_surf_update.cpp
207   render/r_surf_update_fake.cpp
208   render/r_utils_openings.cpp
209   render/r_maskqueue.cpp
210   render/r_psprites.cpp
211   render/r_things.cpp
212   render/r_things_adv.cpp
213   render/r_update.cpp
214   render/r_vis_flood.cpp
215   render/r_vis_bsp.cpp
216   render/r_vis_light.cpp
219 #---------------------------------------
221 # sound subsystem sources
223 #---------------------------------------
224 set(SOUNDSYS_SOURCES
225   sound/sound.h
226   sound/snd_local.h
227   sound/snd_data.cpp
228   sound/snd_main.cpp
230   sound/drv/snd_al.cpp
232   sound/utils/snd_midisong.cpp
233   sound/utils/snd_qmus2mid.cpp
234   sound/utils/snd_sf2scan.cpp
235   #k8:not used, 'cause there is no EAX/EFX support: sound/utils/snd_reverbs.cpp
237   sound/snd_streamplayer.cpp
239   sound/nukedopl/opl3.c
240   sound/nukedopl/musmid.cpp
242   sound/decoders/snd_timidity.cpp
243   sound/decoders/snd_wav.cpp
244   sound/decoders/snd_xmplite.cpp
245   sound/decoders/snd_nuked.cpp
248 if(WITH_MOJOAL)
249   set(SOUNDSYS_SOURCES ${SOUNDSYS_SOURCES} sound/mojoal/mojoal.c)
250 endif(WITH_MOJOAL)
253 #---------------------------------------
255 # network subsystem sources
257 #---------------------------------------
258 set(NETSUB_SOURCES
259   net/network.h
260   net/net_channel.cpp
261   net/net_channel_control.cpp
262   net/net_channel_level.cpp
263   net/net_channel_object_map.cpp
264   net/net_channel_player.cpp
265   net/net_channel_thinker.cpp
266   net/net_connection.cpp
267   net/net_context.cpp
268   net/net_datagram.cpp
269   net/net_demo.cpp
270   net/net_local.h
271   net/net_loopback.cpp
272   net/net_main.cpp
273   net/net_message.cpp
274   net/net_message.h
275   net/net_object_map.cpp
276   net/net_udp.cpp
280 #---------------------------------------
282 # ajbsp sources
284 #---------------------------------------
285 set(AJBSP_SOURCES
286   bsp/ajbsp/bsp_level.cpp
287   bsp/ajbsp/bsp_node.cpp
288   bsp/ajbsp/bsp_util.cpp
289   #ajbsp/lib_util.cpp
293 #---------------------------------------
295 # zdbsp sources
297 #---------------------------------------
298 set(ZDBSP_SOURCES
299   bsp/zdbsp/nodebuild.cpp
300   bsp/zdbsp/nodebuild_events.cpp
301   bsp/zdbsp/nodebuild_extract.cpp
302   bsp/zdbsp/nodebuild_gl.cpp
303   bsp/zdbsp/nodebuild_utility.cpp
304   bsp/zdbsp/nodebuild_classify_nosse2.cpp
305   bsp/zdbsp/zdbsp_extr.cpp
309 #---------------------------------------
311 # file subsystem sources
313 #---------------------------------------
314 set(FILESYS_SOURCES
315   filesys/files.cpp
316   filesys/files.h
320 set(VLEVEL_CLASS_SOURCES
321   level/level.h
322   level/level.cpp
323   level/level_3dcoldet.cpp
324   level/level_3dfloors.cpp
325   level/level_3dpobj_coldet.cpp
326   level/level_calclineseg.cpp
327   level/level_dbgexport.cpp
328   level/level_decals.cpp
329   level/level_decals_spread_flat.cpp
330   level/level_decals_spread_wall.cpp
331   level/level_decals_bootcheck.cpp
332   level/level_light.cpp
333   level/level_miscapi.cpp
334   level/level_nodebbox.cpp
335   level/level_opening.cpp
336   level/level_saveio.cpp
337   level/level_secnode.cpp
338   level/level_sector_change.cpp
339   level/level_soundprop.cpp
340   level/level_think.cpp
341   level/beamclip.cpp
342   level/beamclip.h
345 set(SV_SOURCES
346   server/server.h
347   server/sv_save.h
348   server/sv_local.h
349   server/sv_main.cpp
350   server/sv_save.cpp
353 set(MAPLOADER_SOURCES
354   maploader/mapload.cpp
355   maploader/mapload_cacheio.cpp
356   maploader/mapload_udmf.cpp
357   maploader/loader/lines.cpp
358   maploader/loader/sectors.cpp
359   maploader/loader/verts.cpp
360   maploader/loader/sides.cpp
361   maploader/loader/reject.cpp
362   maploader/loader/things.cpp
363   maploader/loader/acs.cpp
364   maploader/mapload_calc.cpp
365   maploader/mapload_decals.cpp
366   maploader/mapload_nodes_aj.cpp
367   maploader/mapload_nodes_zd.cpp
368   maploader/mapload_fixers.cpp
369   maploader/mapload_postload.cpp
370   maploader/mapload_blockmap.cpp
373 set(ACS_SOURCES
374   acs/p_acs.h
375   acs/p_acs_extfunc.h
376   acs/p_acs.cpp
379 set(PSIM_SOURCES
380   psim/p_decal.h
381   psim/p_decal_private.h
382   psim/p_decal.cpp
383   psim/p_entity.h
384   psim/p_entity.cpp
385   psim/p_entity_misc.cpp
386   psim/p_entity_sight.cpp
387   #psim/p_entity_world.cpp
388   psim/p_entity_checkpos.cpp
389   psim/p_entity_checkrelpos.cpp
390   psim/p_entity_worldlink.cpp
391   psim/p_entity_worldtrymove.cpp
392   psim/p_entity_worldslide.cpp
393   psim/p_entity_worldbounce.cpp
394   psim/p_gameinfo.cpp
395   psim/p_gameinfo.h
396   psim/p_gameobject.cpp
397   psim/p_gameobject.h
398   psim/p_levelinfo.cpp
399   psim/p_levelinfo.h
400   psim/p_player.cpp
401   psim/p_player.h
402   psim/p_player_input.cpp
403   psim/p_playerreplicationinfo.cpp
404   psim/p_playerreplicationinfo.h
405   psim/p_polyobj_misc.cpp
406   psim/p_polyobj_movement.cpp
407   psim/p_polyobj_spawn.cpp
408   psim/p_polyobj_vcapi.cpp
409   psim/p_switch.cpp
410   psim/p_terrain.cpp
411   psim/p_thinker.cpp
412   psim/p_thinker.h
413   psim/p_trace_bsp.cpp
414   #psim/p_trace_sight.cpp
415   #psim/p_trace_light.cpp
416   psim/p_trace_sightlight.cpp
417   psim/p_world.cpp
418   psim/p_world.h
419   psim/p_worldinfo.cpp
420   psim/p_worldinfo.h
424 #---------------------------------------
426 # VavoomC compiler support sources
428 #---------------------------------------
429 set(VCCLIB_SOURCES
430   decorate/vc_decorate.h
431   decorate/vc_decorate.cpp
432   dehacked/vc_dehacked.h
433   dehacked/vc_dehacked.cpp
434   vcapi/api_vavoom.cpp
435   vcapi/pr_cmds.cpp
439 #---------------------------------------
441 # Main executable sources
443 #---------------------------------------
444 #file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/gitversion.h)
445 #file(TOUCH ${CMAKE_CURRENT_SOURCE_DIR}/gitversion.h.in)
446 ##configure_file(
447 ##  gitversion.h.in
448 ##  gitversion.h
450 ### ### if(FOSSIL_REPO_PATH)
451 ### ###   execute_process(
452 ### ###     COMMAND fossil time -R "${FOSSIL_REPO_PATH}" -n 1 -F "%H" -t ci
453 ### ###     COMMAND head -c 16
454 ### ###     DEPENDS host.cpp
455 ### ###     RESULT_VARIABLE
456 ### ###       FOSSIL_HASH_RESULT
457 ### ###     OUTPUT_VARIABLE
458 ### ###       FOSSIL_HASH)
459 ### ###
460 ### ###   message(STATUS "Fossil commit hash: " ${FOSSIL_HASH})
461 ### ###   add_definitions("-DFOSSL_COMMIT_HASH=${FOSSIL_HASH}")
462 ### ### endif(FOSSIL_REPO_PATH)
464 if(FOSSIL_REPO_PATH)
465   add_custom_command(
466     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/fossilversion.h
467     COMMAND sh ${CMAKE_SOURCE_DIR}/utils/getfossver.sh "${FOSSIL_REPO_PATH}" ${CMAKE_CURRENT_BINARY_DIR}/fossilversion.h
468     DEPENDS host.cpp
469   )
470   add_definitions("-DHAVE_FOSSIL_COMMIT_HASH")
471   set(SRC_FOSSVER "${CMAKE_CURRENT_BINARY_DIR}/fossilversion.h")
472 else(FOSSIL_REPO_PATH)
473   set(SRC_FOSSVER )
474 endif(FOSSIL_REPO_PATH)
476 #---------------------------------------
478 # Sources shared between cliend and server
480 #---------------------------------------
481 set(CS_SHARED_SOURCES
482   #gitversion.h.in
483   gamedefs_build.h
484   gamedefs_fwd.h
485   gamedefs.h
486   cheats.cpp
487   cmd.h
488   cmd.cpp
489   cvar.h
490   cvar.cpp
492   # yeah, the server needs this
493   text.h
494   text.cpp
496   host.h
497   host.cpp
498   infostr.h
499   infostr.cpp
500   language.h
501   language.cpp
502   lockdefs.h
503   lockdefs.cpp
505   mapinfo.h
506   mapinfo.cpp
508   utils/misc.h
509   utils/misc.cpp
510   utils/qs_data.h
511   utils/qs_data.cpp
512   utils/ntvalueioex.h
513   utils/ntvalueioex.cpp
515   utils/scripts.h
516   utils/scripts.cpp
518   ${FILESYS_SOURCES}
519   ${VLEVEL_CLASS_SOURCES}
520   ${NETSUB_SOURCES}
521   ${ACS_SOURCES}
522   ${PSIM_SOURCES}
523   ${MAPLOADER_SOURCES}
524   # yeah, server loads textures too
525   ${TEXTURELIB_SOURCES}
527   ${VCCLIB_SOURCES}
529   ${AJBSP_SOURCES}
530   ${ZDBSP_SOURCES}
532   ${SV_SOURCES}
536 #-- source files for combined client/server --
537 set(COMBINED_SOURCES
538   #${CMAKE_CURRENT_BINARY_DIR}/gitversion.h
539   #${CMAKE_CURRENT_BINARY_DIR}/fossilversion.h
540   ${SRC_FOSSVER}
541   ${CS_SHARED_SOURCES}
543   ${RENDERBASE_SOURCES}
544   ${SOUNDSYS_SOURCES}
546   client/client.h
547   client/cl_local.h
548   client/cl_main.cpp
550   widgets/ui.h
551   widgets/ui_actor.cpp
552   widgets/ui_font.cpp
553   widgets/ui_font.h
554   widgets/ui_root.cpp
555   widgets/ui_root.h
556   widgets/ui_widget.cpp
557   widgets/ui_widget.h
559   automap.h
560   automap.cpp
561   chat.h
562   chat.cpp
563   console.cpp
564   console.h
565   drawer.h
566   drawer.cpp
567   finale.h
568   finale.cpp
569   iline.h
570   iline.cpp
571   in_input.cpp
572   input.h
573   menu.h
574   menu.cpp
575   sbar.h
576   sbar.cpp
577   screen.h
578   screen.cpp
579   touch.cpp
580   touch.h
581   video.h
584 #-- Common OpenGL files --
585 set(MAIN_OPENGL_SOURCES
586   render/hwgl/gl_local.h
587   render/hwgl/gl_bloom.cpp
588   render/hwgl/gl_decal.cpp
589   render/hwgl/gl_draw.cpp
590   render/hwgl/gl_main.cpp
591   render/hwgl/gl_main_ctl.cpp
592   render/hwgl/gl_main_cubemap.cpp
593   render/hwgl/gl_main_fbo.cpp
594   render/hwgl/gl_main_postprocess.cpp
595   render/hwgl/gl_main_scissor.cpp
596   render/hwgl/gl_main_shader.cpp
597   render/hwgl/gl_main_views.cpp
598   render/hwgl/gl_main_wipe.cpp
599   render/hwgl/gl_masked.cpp
600   render/hwgl/gl_model.cpp
601   render/hwgl/gl_particle.cpp
602   render/hwgl/gl_poly.cpp
603   # advanced redenrer
604   render/hwgl/gl_poly_adv_render.h
605   render/hwgl/gl_poly_adv.cpp
606   render/hwgl/gl_poly_adv_render_ambient.cpp
607   render/hwgl/gl_poly_adv_render_fog.cpp
608   render/hwgl/gl_poly_adv_render_light.cpp
609   render/hwgl/gl_poly_adv_render_pre.cpp
610   render/hwgl/gl_poly_adv_render_smap.cpp
611   render/hwgl/gl_poly_adv_render_svol.cpp
612   render/hwgl/gl_poly_adv_render_textures.cpp
613   render/hwgl/gl_poly_adv_shadowopt.cpp
614   render/hwgl/gl_poly_adv_zpass.cpp
615   # end of advanced renderer
616   render/hwgl/gl_portal.cpp
617   render/hwgl/gl_tex.cpp
618   render/hwgl/gl_shaddef.sxx
619   ${CMAKE_CURRENT_BINARY_DIR}/gl_shaddef.hi
620   ${CMAKE_CURRENT_BINARY_DIR}/gl_shaddef.ci
623 include_directories(${CMAKE_CURRENT_BINARY_DIR})
624 foreach(file ${MAIN_OPENGL_SOURCES})
625   sxx_compile(OPENGL_GENERATED_SOURCES ${file})
626 endforeach()
628 source_group("" FILES ${MAIN_OPENGL_SOURCES})
629 #source_group(generated FILES ${OPENGL_GENERATED_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/gitversion.h)
630 if(FOSSIL_REPO_PATH)
631   source_group(generated FILES ${OPENGL_GENERATED_SOURCES} ${SRC_FOSSVER})
632 endif(FOSSIL_REPO_PATH)
634 #add_executable(vshadpp ${MAIN_OPENGL_SOURCES} ${OPENGL_GENERATED_SOURCES})
635 #sxx_compile(render/hwgl/gl_shaddef.sxx  render/hwgl/gl_main.cpp)
638 include_directories( .
639   vc
640   ../libs
641   ${SYSTEM_SOURCES_DIR}
644 #---------------------------------------
646 # Dedicated server sources
648 #---------------------------------------
649 set(SERVER_COMMON_SOURCES
650   #${CMAKE_CURRENT_BINARY_DIR}/gitversion.h
651   #${CMAKE_CURRENT_BINARY_DIR}/fossilversion.h
652   ${SRC_FOSSVER}
653   ${CS_SHARED_SOURCES}
655   # for loading various definitions
656   sound/snd_data.cpp
657   # for skybox parsing
658   render/r_sky.cpp
659   # for loading various definitions
660   render/r_data.cpp
664 #---------------------------------------
666 # svnrev.h stuff
668 #---------------------------------------
670 ### add_custom_target( revision_check ALL
671 ###   COMMAND updaterevision ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/svnrev.h
672 ###   WORKING_DIRECTORY ${UPDATEREVISION_EXE}
673 ###   DEPENDS updaterevision )
675 include_directories(${CMAKE_CURRENT_BINARY_DIR})
677 if(NOT WIN32)
678   set(K8VAVOOMDEV OFF)
679   if("$ENV{K8VAVOOMDEV}" STREQUAL "tan")
680     set(K8VAVOOMDEV ON)
681   endif()
682   if("$ENV{USER}" STREQUAL "ketmar")
683     set(K8VAVOOMDEV ON)
684   endif()
686   if(K8VAVOOMDEV)
687     add_definitions(-DVAVOOM_K8_DEVELOPER)
688   endif(K8VAVOOMDEV)
689 endif(NOT WIN32)
692 #---------------------------------------
694 # Main executable
696 #---------------------------------------
697 if(ENABLE_CLIENT)
698   set(MAIN_SOURCES ${COMBINED_SOURCES})
699   #set(MAIN_LIBS glbsp libglvis timidity vavoomc core ${VAVOOM_MAIN_DEPS} ${NET_LIBRARIES} ${MAIN_LIBS})
700   set(MAIN_LIBS timidity vavoomc core ${VAVOOM_MAIN_DEPS} ${NET_LIBRARIES} ${MAIN_LIBS})
701   set(MAIN_COMPILE_FLAGS "")
703   if(VORBIS_FOUND)
704     set(MAIN_SOURCES ${MAIN_SOURCES} sound/decoders/snd_vorbis.cpp)
705   else(VORBIS_FOUND)
706     set(MAIN_SOURCES ${MAIN_SOURCES} sound/decoders/snd_vorbis_stb.cpp)
707   endif(VORBIS_FOUND)
709   #k8: we have internal opus library
710   if(OPUS_FOUND OR OPUS_USE_INTERNAL)
711     set(MAIN_SOURCES ${MAIN_SOURCES} sound/decoders/snd_opus.cpp)
712   endif(OPUS_FOUND OR OPUS_USE_INTERNAL)
714   if(LIBMAD_FOUND)
715     set(MAIN_SOURCES ${MAIN_SOURCES} sound/decoders/snd_mp3_mad.cpp)
716   else(LIBMAD_FOUND)
717     set(MAIN_SOURCES ${MAIN_SOURCES} sound/decoders/snd_mp3_dr.cpp)
718   endif(LIBMAD_FOUND)
720   if(FLAC_FOUND)
721     set(MAIN_SOURCES ${MAIN_SOURCES} sound/decoders/snd_flac.cpp)
722   else(FLAC_FOUND)
723     set(MAIN_SOURCES ${MAIN_SOURCES} sound/decoders/snd_flac_dr.cpp)
724   endif(FLAC_FOUND)
726   if(FLUID_FOUND)
727     set(MAIN_SOURCES ${MAIN_SOURCES} sound/decoders/snd_fluid.cpp)
728   endif(FLUID_FOUND)
731   # shitdoze icon
732   if(WIN32)
733     #  CMake doesn't support automatic building of resource files so
734     # we must add a custom command and add object files to the list
735     # of source files
736     set(RC_SRC ${CMAKE_SOURCE_DIR}/branding/shitdoze.rc)
737     set(RC_OBJ ${CMAKE_CURRENT_BINARY_DIR}/shitdoze.o)
738     add_custom_command(OUTPUT ${RC_OBJ}
739       DEPENDS ${RC_SRC}
740       COMMAND windres -o ${RC_OBJ} -i ${RC_SRC} ${RES_FLAGS}
741     )
742     set(MAIN_SOURCES ${MAIN_SOURCES} ${RC_OBJ})
743   endif(WIN32)
746   if(SDL2_FOUND)
747     if(WIN32)
748       set(MAIN_LIBS gdi32 ole32 winmm imm32 version ${MAIN_LIBS})
749     endif(WIN32)
750     set(MAIN_SOURCES ${MAIN_SOURCES} in_sdl.cpp sys_sdl.cpp)
751     set(MAIN_SOURCES ${MAIN_SOURCES} render/hwgl/gl_sdl.cpp render/hwgl/gl_dpi.cpp)
752     ###set(VAVOOM_MAIN_DEPS ${VAVOOM_MAIN_DEPS} imago)
753     ###set(MAIN_LIBS imago ${MAIN_LIBS})
754   endif(SDL2_FOUND)
757   ### if(OPENGL_FOUND)
758   ###   set(MAIN_SOURCES ${MAIN_SOURCES} ${MAIN_OPENGL_SOURCES})
759   ###   if(WIN32)
760   ###     set(MAIN_SOURCES ${MAIN_SOURCES} winshit/render/hwgl/gl_win32.cpp)
761   ###     set(MAIN_LIBS opengl32 ${MAIN_LIBS})
762   ###   else(WIN32)
763   ###     set(MAIN_SOURCES ${MAIN_SOURCES} render/hwgl/gl_sdl.cpp)
764   ###   endif(WIN32)
765   ### endif(OPENGL_FOUND)
766   if(OPENGL_FOUND)
767     set(MAIN_SOURCES ${MAIN_SOURCES} ${MAIN_OPENGL_SOURCES})
768   endif(OPENGL_FOUND)
771   if(CYGWIN OR MINGW)
772     # prune --out-implib from executables: it doesn't make sense, even with --export-all-symbols
773     string(REGEX REPLACE "-Wl,--out-implib,[^ ]+ " " " CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE}")
774     string(REGEX REPLACE "-Wl,--out-implib,[^ ]+ " " " CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE}")
775   endif()
777   if(ANDROID)
778     add_library(k8vavoom SHARED ${MAIN_SOURCES})
779   else()
780     add_executable(k8vavoom ${MAIN_SOURCES})
781     if(ENABLE_WRAPPERS)
782       set_target_properties(k8vavoom PROPERTIES OUTPUT_NAME ../k8vavoom.bin)
783     else(ENABLE_WRAPPERS)
784       set_target_properties(k8vavoom PROPERTIES OUTPUT_NAME ../k8vavoom)
785     endif(ENABLE_WRAPPERS)
786   endif()
787   if (MAIN_COMPILE_FLAGS)
788     set_target_properties(k8vavoom PROPERTIES COMPILE_FLAGS ${MAIN_COMPILE_FLAGS})
789   endif (MAIN_COMPILE_FLAGS)
790   #message(STATUS "MAIN LINKLIBS: " ${MAIN_LIBS})
791   target_link_libraries(k8vavoom ${MAIN_LIBS})
792   #add_dependencies(k8vavoom core vavoomc timidity glbsp libglvis ${VAVOOM_MAIN_DEPS})
793   add_dependencies(k8vavoom core vavoomc timidity ${VAVOOM_MAIN_DEPS})
795   install(TARGETS k8vavoom DESTINATION ${BINDIR})
797   #
798   # Icon
799   #
800   install(FILES ${CMAKE_SOURCE_DIR}/docs/k8vavoom.txt DESTINATION ${DATADIR})
801   install(FILES ${CMAKE_SOURCE_DIR}/res/k8vavoom.png DESTINATION ${DATADIR})
802   # more docs
803   install(FILES ${CMAKE_SOURCE_DIR}/docs/code_of_conduct.txt DESTINATION ${DATADIR}/docs)
804   install(FILES ${CMAKE_SOURCE_DIR}/README DESTINATION ${DATADIR}/docs)
805   # variants
806   if(WIN32)
807     install(FILES ${CMAKE_SOURCE_DIR}/res/ico/k8vavoom_icon2.ico DESTINATION ${DATADIR}/icons)
808     install(FILES ${CMAKE_SOURCE_DIR}/res/ico/k8vavoom_icon3.ico DESTINATION ${DATADIR}/icons)
809     install(FILES ${CMAKE_SOURCE_DIR}/res/ico/k8vavoom_icon4.ico DESTINATION ${DATADIR}/icons)
810     install(FILES ${CMAKE_SOURCE_DIR}/res/ico/k8vavoom_icon5.ico DESTINATION ${DATADIR}/icons)
811     install(FILES ${CMAKE_SOURCE_DIR}/res/ico/k8vavoom_icon6.ico DESTINATION ${DATADIR}/icons)
812     install(FILES ${CMAKE_SOURCE_DIR}/res/ico/k8vavoom_icon7.ico DESTINATION ${DATADIR}/icons)
813     install(FILES ${CMAKE_SOURCE_DIR}/res/ico/k8vavoom_icon8.ico DESTINATION ${DATADIR}/icons)
814     install(FILES ${CMAKE_SOURCE_DIR}/res/ico/k8vavoom_icon9.ico DESTINATION ${DATADIR}/icons)
815   else(WIN32)
816     install(FILES ${CMAKE_SOURCE_DIR}/res/png/k8vavoom_icon2.png DESTINATION ${DATADIR}/icons)
817     install(FILES ${CMAKE_SOURCE_DIR}/res/png/k8vavoom_icon3.png DESTINATION ${DATADIR}/icons)
818     install(FILES ${CMAKE_SOURCE_DIR}/res/png/k8vavoom_icon4.png DESTINATION ${DATADIR}/icons)
819     install(FILES ${CMAKE_SOURCE_DIR}/res/png/k8vavoom_icon5.png DESTINATION ${DATADIR}/icons)
820     install(FILES ${CMAKE_SOURCE_DIR}/res/png/k8vavoom_icon6.png DESTINATION ${DATADIR}/icons)
821     install(FILES ${CMAKE_SOURCE_DIR}/res/png/k8vavoom_icon7.png DESTINATION ${DATADIR}/icons)
822     install(FILES ${CMAKE_SOURCE_DIR}/res/png/k8vavoom_icon8.png DESTINATION ${DATADIR}/icons)
823     install(FILES ${CMAKE_SOURCE_DIR}/res/png/k8vavoom_icon9.png DESTINATION ${DATADIR}/icons)
824   endif(WIN32)
826   # some specs and demos
827   if(WIN32)
828     set(DSPECSDIR ${SPECSDIR})
829   else(WIN32)
830     set(DSPECSDIR ${DATADIR}/${SPECSDIR})
831   endif(WIN32)
832   #
833   #install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/k8vavoom_3dpobj.html DESTINATION ${DSPECSDIR}/3dpobj)
834   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/k8vavoom_3dpobj.wiki DESTINATION ${DSPECSDIR}/3dpobj)
835   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/fig1.png DESTINATION ${DSPECSDIR}/3dpobj)
836   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/zacc_acs/zdefs.acs DESTINATION ${DSPECSDIR}/3dpobj/zacc_acs)
837   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/zacc_acs/zspecial.acs DESTINATION ${DSPECSDIR}/3dpobj/zacc_acs)
838   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/3d_polyobject_cabin_crush.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
839   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/3d_polyobject_cabin_crush_side.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
840   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/3d_polyobject_cabin_railings.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
841   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/3d_polyobject_cabin_railings_blockhitscan.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
842   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/3d_polyobject_cabin_railings_blockproj.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
843   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/3d_polyobject_cabin_simple.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
844   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/big_dropoff.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
845   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/big_sight_faraway.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
846   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/empty.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
847   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/rotate.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
848   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/rotate_empty.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
849   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/simple_test.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads)
850   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/boris/3dpolyobj_testmap00.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads/boris)
851   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/complex/3d_polyobject_cabin_move_spot.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads/complex)
852   install(FILES ${CMAKE_SOURCE_DIR}/specs/3dpobj/sample_wads/complex/3d_polyobject_cabin_move_spot_doors.wad DESTINATION ${DSPECSDIR}/3dpobj/sample_wads/complex)
853   # more specs
854   install(FILES ${CMAKE_SOURCE_DIR}/specs/index.wiki DESTINATION ${DSPECSDIR})
855   install(FILES ${CMAKE_SOURCE_DIR}/specs/udmf_k8vavoom.txt DESTINATION ${DSPECSDIR})
856   install(FILES ${CMAKE_SOURCE_DIR}/specs/k8vavoom_terrain_bootprints.txt DESTINATION ${DSPECSDIR})
857   install(FILES ${CMAKE_SOURCE_DIR}/specs/k8vavoom_pointlights.txt DESTINATION ${DSPECSDIR})
858   install(FILES ${CMAKE_SOURCE_DIR}/specs/k8vavoom_decals.txt DESTINATION ${DSPECSDIR})
859   install(FILES ${CMAKE_SOURCE_DIR}/specs/k8vavoom_decorate.txt DESTINATION ${DSPECSDIR})
860   # unfinished specs
861   install(FILES ${CMAKE_SOURCE_DIR}/specs/unfinished/k8vavoom_models.txt DESTINATION ${DSPECSDIR}/unfinished)
862   # non-specific specs
863   install(FILES ${CMAKE_SOURCE_DIR}/specs/umapinfo.txt DESTINATION ${DSPECSDIR})
864   install(FILES ${CMAKE_SOURCE_DIR}/specs/udmf.txt DESTINATION ${DSPECSDIR})
865   install(FILES ${CMAKE_SOURCE_DIR}/specs/udmf_zdoom.txt DESTINATION ${DSPECSDIR})
866   install(FILES ${CMAKE_SOURCE_DIR}/specs/usdf.txt DESTINATION ${DSPECSDIR})
867   install(FILES ${CMAKE_SOURCE_DIR}/specs/usdf_zdoom.txt DESTINATION ${DSPECSDIR})
868   install(FILES ${CMAKE_SOURCE_DIR}/specs/usdf_gzdoom.txt DESTINATION ${DSPECSDIR})
869   # vwad specs
870   install(FILES ${CMAKE_SOURCE_DIR}/specs/vwad/vwad_fmt.txt DESTINATION ${DSPECSDIR}/vwad)
872   if(ENABLE_WRAPPERS)
873     file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/k8vavoom
874 "#!/bin/sh
875 # Needed to make symlinks/shortcuts work.
876 # the binaries must run with correct working directory
877 exec \"${CMAKE_INSTALL_PREFIX}/${BINDIR}/k8vavoom.bin\" \"\$\@\" -basedir \"${CMAKE_INSTALL_PREFIX}/${DATADIR}\" ${IWADDIR}
879     install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/k8vavoom DESTINATION ${BINDIR})
880   endif(ENABLE_WRAPPERS)
882   if(NSWITCH)
883     add_custom_command(
884       TARGET k8vavoom POST_BUILD
885       COMMAND nacptool --create "${CMAKE_PROJECT_NAME}" \"\" \"\" "k8vavoom.nacp"
886       COMMAND aarch64-none-elf-strip -o "${CMAKE_BINARY_DIR}/k8vavoom_stripped" "${CMAKE_BINARY_DIR}/k8vavoom"
887       COMMAND elf2nro "${CMAKE_BINARY_DIR}/k8vavoom_stripped" "${CMAKE_BINARY_DIR}/k8vavoom.nro" --icon="${CMAKE_SOURCE_DIR}/branding/k8vavoom_switch.jpg" --nacp=k8vavoom.nacp
888     )
889   endif(NSWITCH)
890 endif(ENABLE_CLIENT)
893 #---------------------------------------
895 # Dedicated server
897 #---------------------------------------
898 if(ENABLE_SERVER)
899   ### if(WIN32)
900   ###   set(SERVER_SOURCES ${SERVER_COMMON_SOURCES} winshit/sys_wind.cpp)
901   ###
902   ###   #  CMake doesn't support automatic building of resource files so
903   ###   # we must add a custom command and add object files to the list
904   ###   # of source files
905   ###   ### set(RC_SRC ${CMAKE_CURRENT_SOURCE_DIR}/winshit/res/k8vavoom.rc)
906   ###   ### set(RC_OBJ ${CMAKE_CURRENT_BINARY_DIR}/winshit/res/k8vavoom_sv.o)
907   ###   ### add_custom_command(OUTPUT ${RC_OBJ}
908   ###   ###   DEPENDS ${RC_SRC}
909   ###   ###   COMMAND windres --include-dir=${CMAKE_CURRENT_SOURCE_DIR} --include-dir=${CMAKE_CURRENT_BINARY_DIR} -o ${RC_OBJ} -i ${RC_SRC}
910   ###   ### )
911   ###   ### set(SERVER_SOURCES ${SERVER_SOURCES} ${RC_OBJ})
912   ###   #set(SERVER_SOURCES ${SERVER_SOURCES})
913   ### else(WIN32)
914   ###   set(SERVER_SOURCES ${SERVER_COMMON_SOURCES} sys_ded.cpp)
915   ### endif(WIN32)
916   set(SERVER_SOURCES ${SERVER_COMMON_SOURCES} sys_ded.cpp)
918   add_executable(k8vavoom-dedicated ${SERVER_SOURCES})
919   if(CYGWIN OR MINGW)
920     set_target_properties(k8vavoom-dedicated PROPERTIES LINK_FLAGS "-Wl,--subsystem,console")
921   endif()
923   if(ENABLE_WRAPPERS)
924     set_target_properties(k8vavoom-dedicated PROPERTIES OUTPUT_NAME ../k8vavoom-dedicated.bin)
925   else(ENABLE_WRAPPERS)
926     set_target_properties(k8vavoom-dedicated PROPERTIES OUTPUT_NAME ../k8vavoom-dedicated)
927   endif(ENABLE_WRAPPERS)
928   set_target_properties(k8vavoom-dedicated PROPERTIES COMPILE_FLAGS -DSERVER)
929   #FIXME: create separate from MAIN_LIBS link list
930   #target_link_libraries(k8vavoom-dedicated glbsp vavoomc core ${MAIN_LIBS} ${NET_LIBRARIES})
931   target_link_libraries(k8vavoom-dedicated vavoomc core ${MAIN_LIBS} ${NET_LIBRARIES})
932   #add_dependencies(k8vavoom-dedicated core vavoomc glbsp ${VAVOOM_MAIN_DEPS})
933   add_dependencies(k8vavoom-dedicated core vavoomc ${VAVOOM_MAIN_DEPS})
935   install(TARGETS k8vavoom-dedicated DESTINATION ${BINDIR})
937   if(ENABLE_WRAPPERS)
938     file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/k8vavoom-dedicated
939 "#!/bin/sh
940 # Needed to make symlinks/shortcuts work.
941 # the binaries must run with correct working directory
942 exec \"${CMAKE_INSTALL_PREFIX}/${BINDIR}/k8vavoom-dedicated.bin\" \"\$\@\" -basedir \"${CMAKE_INSTALL_PREFIX}/${DATADIR}\" ${IWADDIR}
944     install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/k8vavoom-dedicated DESTINATION ${BINDIR})
945   endif(ENABLE_WRAPPERS)
946 endif(ENABLE_SERVER)