spingle/CMakeLists.txt

188 lines
3.7 KiB
CMake

cmake_minimum_required(VERSION 3.14)
cmake_policy(SET CMP0046 NEW)
cmake_policy(SET CMP0063 NEW)
cmake_policy(SET CMP0071 NEW)
project(agw-quake C)
if(NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -Werror")
endif()
find_package(OpenGL REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2>=2.0.0)
pkg_check_modules(FLAC REQUIRED IMPORTED_TARGET flac>=1.3.3)
pkg_check_modules(Vorbis REQUIRED IMPORTED_TARGET vorbis>=1.3.6
vorbisfile>=1.3.6
ogg>=1.3.4)
pkg_check_modules(Opus REQUIRED IMPORTED_TARGET opus>=1.3.1
opusfile>=0.11
ogg>=1.3.4)
pkg_check_modules(MikMod REQUIRED IMPORTED_TARGET libmikmod>=3.3.11)
add_executable(quake WIN32
source/anorm_dots.h
source/anorms.h
source/arch_def.h
source/bgmusic.c
source/bgmusic.h
source/bspfile.h
source/cd_sdl.c
source/cdaudio.h
source/cfgfile.c
source/cfgfile.h
source/chase.c
source/cl_demo.c
source/cl_input.c
source/cl_main.c
source/cl_parse.c
source/cl_tent.c
source/client.h
source/cmd.c
source/cmd.h
source/common.c
source/common.h
source/console.c
source/console.h
source/crc.c
source/crc.h
source/cvar.c
source/cvar.h
source/draw.h
source/filenames.h
source/gl_draw.c
source/gl_fog.c
source/gl_mesh.c
source/gl_model.c
source/gl_model.h
source/gl_refrag.c
source/gl_rlight.c
source/gl_rmain.c
source/gl_rmisc.c
source/gl_screen.c
source/gl_sky.c
source/gl_texmgr.c
source/gl_texmgr.h
source/gl_vidsdl.c
source/gl_warp.c
source/gl_warp_sin.h
source/glquake.h
source/host.c
source/host_cmd.c
source/image.c
source/image.h
source/in_sdl.c
source/input.h
source/keys.c
source/keys.h
source/lodepng.h
source/main_sdl.c
source/mathlib.c
source/mathlib.h
source/menu.c
source/menu.h
source/modelgen.h
source/net.h
source/net_bsd.c
source/net_defs.h
source/net_dgrm.c
source/net_dgrm.h
source/net_loop.c
source/net_loop.h
source/net_main.c
source/net_sys.h
source/net_udp.c
source/net_udp.h
source/pl_linux.c
source/platform.h
source/pr_cmds.c
source/pr_comp.h
source/pr_edict.c
source/pr_exec.c
source/progdefs.h
source/progs.h
source/protocol.h
source/q_ctype.h
source/q_sound.h
source/q_stdinc.h
source/qs_bmp.h
source/quakedef.h
source/r_alias.c
source/r_brush.c
source/r_part.c
source/r_sprite.c
source/r_world.c
source/render.h
source/resource.h
source/sbar.c
source/sbar.h
source/screen.h
source/server.h
source/snd_codec.c
source/snd_codec.h
source/snd_codeci.h
source/snd_dma.c
source/snd_flac.c
source/snd_flac.h
source/snd_mem.c
source/snd_mikmod.c
source/snd_mikmod.h
source/snd_mix.c
source/snd_mp3.c
source/snd_mp3.h
source/snd_mpg123.c
source/snd_opus.c
source/snd_opus.h
source/snd_sdl.c
source/snd_umx.c
source/snd_umx.h
source/snd_vorbis.c
source/snd_vorbis.h
source/snd_wave.c
source/snd_wave.h
source/snd_xmp.c
source/snd_xmp.h
source/spritegn.h
source/stb_image_write.h
source/strl_fn.h
source/strlcat.c
source/strlcpy.c
source/sv_main.c
source/sv_move.c
source/sv_phys.c
source/sv_user.c
source/sys.h
source/sys_sdl_unix.c
source/vid.h
source/view.c
source/view.h
source/wad.c
source/wad.h
source/world.c
source/world.h
source/wsaerror.h
source/zone.c
source/zone.h)
target_compile_definitions(
quake
PUBLIC
-DDO_USERDIRS=1
-DUSE_SDL2=1
-DUSE_CODEC_FLAC=1
-DUSE_CODEC_VORBIS=1
-DUSE_CODEC_OPUS=1
-DUSE_CODEC_MIKMOD=1
-DUSE_CODEC_UMX=1)
target_link_libraries(quake
m
OpenGL::GL
PkgConfig::SDL2
PkgConfig::FLAC
PkgConfig::Vorbis
PkgConfig::Opus
PkgConfig::MikMod)