2019-10-29 18:53:46 +00:00
cmake_minimum_required ( VERSION 3.1.0 )
2019-09-22 21:15:46 +00:00
include ( precompiled_headers )
if ( COMMAND cmake_policy )
cmake_policy ( SET CMP0003 NEW )
endif ( )
include ( CheckCXXSourceCompiles )
include ( CheckFunctionExists )
include ( CheckCXXCompilerFlag )
include ( CheckIncludeFile )
include ( CheckIncludeFiles )
include ( CheckLibraryExists )
include ( FindPkgConfig )
2019-09-22 23:28:18 +00:00
if ( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
2019-09-22 21:15:46 +00:00
option ( NO_STRIP "Do not strip Release or MinSizeRel builds" )
# At least some versions of Xcode fail if you strip with the linker
# instead of the separate strip utility.
if ( APPLE )
set ( NO_STRIP ON )
endif ( )
endif ( )
2020-01-06 01:41:47 +00:00
# Build does not work with signed chars!
2019-10-16 21:09:02 +00:00
if ( MSVC )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /J" )
2020-01-06 01:41:47 +00:00
else ( )
2020-01-07 00:11:19 +00:00
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -funsigned-char -Wno-missing-braces -Wno-char-subscripts -Wno-unused-variable" )
2019-10-16 21:09:02 +00:00
endif ( )
2019-09-22 21:15:46 +00:00
option ( DYN_OPENAL "Dynamically load OpenAL" ON )
if ( APPLE )
option ( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON )
endif ( )
2019-12-27 12:37:39 +00:00
target_architecture ( TARGET_ARCHITECTURE )
message ( STATUS "Architecture is ${TARGET_ARCHITECTURE}" )
2019-11-19 20:35:35 +00:00
2019-10-17 18:29:58 +00:00
# Right now only 64 bit is supported.
2019-12-27 12:37:39 +00:00
if ( ${ TARGET_ARCHITECTURE } MATCHES "x86_64" )
2019-11-19 20:35:35 +00:00
set ( X64 64 )
endif ( )
2019-09-22 21:15:46 +00:00
2019-12-27 12:37:39 +00:00
if ( X64 OR ${ TARGET_ARCHITECTURE } MATCHES "i386" )
2019-09-22 21:15:46 +00:00
add_definitions ( -DARCH_IA32 )
endif ( )
2019-12-27 12:37:39 +00:00
if ( NOT PROJECT_LIBRARIES )
set ( PROJECT_LIBRARIES "" )
2019-09-22 21:15:46 +00:00
endif ( )
if ( WIN32 )
if ( X64 )
set ( WIN_TYPE Win64 )
set ( XBITS x64 )
else ( )
set ( WIN_TYPE Win32 )
set ( XBITS x86 )
endif ( )
add_definitions ( -D_WIN32 )
2019-10-17 18:29:58 +00:00
set ( DX_dinput8_LIBRARY dinput8 )
2019-09-22 21:15:46 +00:00
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES
2019-09-22 21:15:46 +00:00
o p e n g l 3 2
w s o c k 3 2
w i n m m
" $ { D X _ d i n p u t 8 _ L I B R A R Y } "
o l e 3 2
u s e r 3 2
g d i 3 2
c o m c t l 3 2
c o m d l g 3 2
w s 2 _ 3 2
s e t u p a p i
o l e a u t 3 2
2020-01-06 01:41:47 +00:00
d b g h e l p
2019-09-22 21:15:46 +00:00
l e g a c y _ s t d i o _ d e f i n i t i o n s
2020-01-06 01:41:47 +00:00
2019-09-22 21:15:46 +00:00
s h l w a p i
v e r s i o n
i m m 3 2
d x g u i d
d s o u n d
w i n s p o o l
a d v a p i 3 2
s h e l l 3 2
S e t u p A P I
u u i d
o d b c 3 2
o d b c c p 3 2
2019-12-18 21:50:37 +00:00
# this local library crap needs to go away. Sadly there doesn't seem to be anything to get a working libvpx that doesn't force linking with MinGW dependencies.
2019-09-22 21:15:46 +00:00
l i b v p x
l i b c o m p a t - t o - m s v c
2020-01-06 01:41:47 +00:00
2019-09-22 21:15:46 +00:00
)
2020-01-06 01:41:47 +00:00
2019-09-22 21:15:46 +00:00
2019-09-22 23:28:18 +00:00
if ( NOT DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } DelayImp )
2019-09-22 21:15:46 +00:00
endif ( )
2019-09-22 23:28:18 +00:00
if ( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
2019-09-22 21:15:46 +00:00
if ( DX_dxguid_LIBRARY )
2019-12-27 12:37:39 +00:00
list ( APPEND PROJECT_LIBRARIES "${DX_dxguid_LIBRARY}" )
2019-09-22 21:15:46 +00:00
endif ( )
endif ( )
else ( )
if ( APPLE )
set ( NO_GTK ON )
set ( DYN_GTK OFF )
# Prevent inclusion of fp.h and FixMath.h from Carbon framework
# Declarations from these files are not used but cause the following conflicts:
# - redefinition of 'FixedToFloat' and 'FloatToFixed' macros
# - redefinition of 'pi' as different kind of symbol
add_definitions ( -D__FP__ -D__FIXMATH__ )
else ( )
option ( NO_GTK "Disable GTK+ dialogs (Not applicable to Windows)" )
option ( DYN_GTK "Load GTK+ at runtime instead of compile time" ON )
# Use GTK+ for the IWAD picker, if available.
if ( NOT NO_GTK )
pkg_check_modules ( GTK3 gtk+-3.0 )
if ( GTK3_FOUND )
if ( NOT DYN_GTK )
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } ${ GTK3_LIBRARIES } )
2019-09-22 21:15:46 +00:00
endif ( )
include_directories ( ${ GTK3_INCLUDE_DIRS } )
link_directories ( ${ GTK3_LIBRARY_DIRS } )
else ( )
pkg_check_modules ( GTK2 gtk+-2.0 )
if ( GTK2_FOUND )
if ( NOT DYN_GTK )
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } ${ GTK2_LIBRARIES } )
2019-09-22 21:15:46 +00:00
endif ( )
include_directories ( ${ GTK2_INCLUDE_DIRS } )
link_directories ( ${ GTK2_LIBRARY_DIRS } )
else ( )
set ( NO_GTK ON )
endif ( )
endif ( )
endif ( )
endif ( )
if ( NO_GTK )
add_definitions ( -DNO_GTK )
elseif ( DYN_GTK )
add_definitions ( -DDYN_GTK=1 )
else ( )
add_definitions ( -DDYN_GTK=0 )
endif ( )
# Non-Windows version also needs SDL except native OS X backend
if ( NOT APPLE OR NOT OSX_COCOA_BACKEND )
find_package ( SDL2 REQUIRED )
include_directories ( "${SDL2_INCLUDE_DIR}" )
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } "${SDL2_LIBRARY}" )
2019-09-22 21:15:46 +00:00
endif ( )
find_path ( FPU_CONTROL_DIR fpu_control.h )
if ( FPU_CONTROL_DIR )
include_directories ( ${ FPU_CONTROL_DIR } )
add_definitions ( -DHAVE_FPU_CONTROL )
endif ( )
endif ( )
if ( NOT NO_OPENAL )
if ( NOT DYN_OPENAL ) # DYN_OPENAL uses local copies of the headers.
find_package ( OpenAL )
mark_as_advanced ( CLEAR OPENAL_INCLUDE_DIR )
if ( OPENAL_INCLUDE_DIR )
include_directories ( ${ OPENAL_INCLUDE_DIR } )
mark_as_advanced ( CLEAR OPENAL_LIBRARY )
if ( OPENAL_LIBRARY )
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ OPENAL_LIBRARY } ${ PROJECT_LIBRARIES } )
2019-09-22 21:15:46 +00:00
else ( )
set ( NO_OPENAL ON )
endif ( )
else ( )
set ( NO_OPENAL ON )
endif ( )
else ( )
add_definitions ( -DDYN_OPENAL )
endif ( )
endif ( )
if ( NO_OPENAL )
add_definitions ( -DNO_OPENAL=1 )
endif ( )
# Decide on SSE setup
2019-12-27 12:37:39 +00:00
# SSE only matters on 32-bit targets. We check compiler flags to know if we can do it.
if ( CMAKE_SIZEOF_VOID_P MATCHES "4" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ppc )
2019-09-22 21:15:46 +00:00
CHECK_CXX_COMPILER_FLAG ( "-msse2 -mfpmath=sse" CAN_DO_MFPMATH )
CHECK_CXX_COMPILER_FLAG ( -arch:SSE2 CAN_DO_ARCHSSE2 )
if ( CAN_DO_MFPMATH )
set ( SSE1_ENABLE "-msse -mfpmath=sse" )
set ( SSE2_ENABLE "-msse2 -mfpmath=sse" )
elseif ( CAN_DO_ARCHSSE2 )
set ( SSE1_ENABLE -arch:SSE )
set ( SSE2_ENABLE -arch:SSE2 )
endif ( )
endif ( )
if ( X64 )
set ( HAVE_MMX 1 )
else ( X64 )
set ( SAFE_CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS } )
2019-09-22 23:28:18 +00:00
if ( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
2019-09-22 21:15:46 +00:00
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx" )
2019-09-22 23:28:18 +00:00
endif ( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
2019-09-22 21:15:46 +00:00
CHECK_CXX_SOURCE_COMPILES ( " #include <mmintrin.h>
i n t main ( void ) { _ _ m 6 4 v = _m_from_int ( 0 ) ; } "
H A V E _ M M X )
set ( CMAKE_CXX_FLAGS ${ SAFE_CMAKE_CXX_FLAGS } )
endif ( X64 )
CHECK_CXX_SOURCE_COMPILES ( " #include <ppl.h>
i n t main ( ) { c o n c u r r e n c y : : parallel_for ( 0, 1, 1, [](int ) { } ) ; } "
H A V E _ P A R A L L E L _ F O R )
if ( NOT HAVE_PARALLEL_FOR )
CHECK_CXX_SOURCE_COMPILES ( " #include <dispatch/dispatch.h>
i n t main ( ) { dispatch_apply ( 1, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ) , ^ ( s i z e _ t ) { } ) ; } "
H A V E _ D I S P A T C H _ A P P L Y )
endif ( )
# Set up flags for MSVC
if ( MSVC )
set ( CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS}" )
endif ( MSVC )
# Set up flags for GCC
2019-09-22 23:28:18 +00:00
if ( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
2019-09-22 21:15:46 +00:00
if ( PROFILE )
set ( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -pg" )
set ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg" )
set ( CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -pg" )
set ( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -pg" )
endif ( )
2020-01-20 09:09:44 +00:00
#set( REL_CXX_FLAGS "-fno-rtti" )
2019-09-22 21:15:46 +00:00
if ( NOT PROFILE AND NOT APPLE )
# On OS X frame pointers are required for exception handling, at least with Clang
set ( REL_CXX_FLAGS "${REL_CXX_FLAGS} -fomit-frame-pointer" )
endif ( )
set ( CMAKE_CXX_FLAGS_RELEASE "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}" )
set ( CMAKE_CXX_FLAGS_MINSIZEREL "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}" )
set ( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
# Support for the GCC/Clang sanitizers.
set ( WITH_ASAN 0 CACHE BOOL "Enable the Address Sanitizer" )
if ( NOT CMAKE_COMPILER_IS_GNUCXX )
set ( WITH_MSAN 0 CACHE BOOL "Enable the Memory Sanitizer" )
endif ( NOT CMAKE_COMPILER_IS_GNUCXX )
set ( WITH_UBSAN 0 CACHE BOOL "Enable the Undefined Behavior Sanitizer" )
if ( WITH_MSAN )
if ( WITH_ASAN OR WITH_UBSAN )
message ( SEND_ERROR "You can't use MSAN with either ASAN or UBSAN." )
endif ( WITH_ASAN OR WITH_UBSAN )
endif ( WITH_MSAN )
set ( SANITIZER_FLAG "" )
if ( WITH_ASAN )
set ( SANITIZER_FLAG "-fsanitize=address" )
if ( WITH_UBSAN )
set ( SANITIZER_FLAG "${SANITIZER_FLAG},undefined" )
endif ( WITH_UBSAN )
elseif ( WITH_MSAN )
set ( SANITIZER_FLAG "-fsanitize=memory" )
elseif ( WITH_UBSAN )
set ( SANITIZER_FLAG "-fsanitize=undefined" )
endif ( WITH_ASAN )
set ( CMAKE_CXX_FLAGS "${SANITIZER_FLAG} ${CMAKE_CXX_FLAGS}" )
set ( CMAKE_C_FLAGS "${SANITIZER_FLAG} ${CMAKE_C_FLAGS}" )
set ( CMAKE_EXE_LINKER_FLAGS "${SANITIZER_FLAG} ${CMAKE_EXE_LINKER_FLAGS}" )
if ( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.5" )
set ( CMAKE_C_FLAGS "-Wno-unused-result ${CMAKE_C_FLAGS}" )
set ( CMAKE_CXX_FLAGS "-Wno-unused-result ${CMAKE_CXX_FLAGS}" )
endif ( )
if ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
if ( APPLE OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "3.6" )
set ( CMAKE_CXX_FLAGS "-Wno-inconsistent-missing-override ${CMAKE_CXX_FLAGS}" )
endif ( )
endif ( )
set ( CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -ffp-contract=off ${CMAKE_C_FLAGS}" )
set ( CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -ffp-contract=off ${CMAKE_CXX_FLAGS}" )
# ARM processors (Raspberry Pi, et al) - enable ARM NEON support.
if ( ${ CMAKE_SYSTEM_PROCESSOR } MATCHES "arm" )
set ( USE_ARMV8 0 CACHE BOOL "Use ARMv8 instructions - Raspberry Pi 3" )
if ( USE_ARMV8 )
set ( CMAKE_CXX_FLAGS "-mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mtune=cortex-a53 -mhard-float -DNO_SSE ${CMAKE_CXX_FLAGS}" )
else ( )
set ( CMAKE_CXX_FLAGS "-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mtune=cortex-a7 -mhard-float -DNO_SSE ${CMAKE_CXX_FLAGS}" )
endif ( )
endif ( )
if ( NOT X64 AND NOT CAN_DO_MFPMATH )
set ( CMAKE_C_FLAGS "-DNO_SSE ${CMAKE_CXX_FLAGS}" )
set ( CMAKE_CXX_FLAGS "-DNO_SSE ${CMAKE_CXX_FLAGS}" )
endif ( )
# Remove extra warnings when using the official DirectX headers.
# Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid,
# which is a royal pain. The previous version I had been using was fine with them.
# MinGW: switch to the Windows Unicode API.
if ( WIN32 )
set ( CMAKE_CXX_FLAGS "-Wno-unknown-pragmas -Wno-comment -Wno-format ${CMAKE_CXX_FLAGS}" )
set ( CMAKE_CXX_FLAGS "-D_UNICODE -DUNICODE ${CMAKE_CXX_FLAGS}" )
set ( CMAKE_CXX_FLAGS "-D_WIN32_WINNT=0x0600 ${CMAKE_CXX_FLAGS}" )
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -municode" )
endif ( )
# Detect FreeBSD and add flags
if ( ${ CMAKE_SYSTEM_NAME } MATCHES "FreeBSD" )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
endif ( )
if ( NOT NO_STRIP )
set ( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -s" )
set ( CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -s" )
endif ( )
endif ( )
# Check for thread_local keyword, it's optional at the moment
2020-01-06 01:41:47 +00:00
#CHECK_CXX_SOURCE_COMPILES("thread_local int i; int main() { i = 0; }"
# HAVE_THREAD_LOCAL)
2019-09-22 21:15:46 +00:00
2020-01-06 01:41:47 +00:00
#if( NOT HAVE_THREAD_LOCAL )
# message( SEND_ERROR "C++ compiler doesn't support thread_local storage duration specifier" )
#endif()
2019-09-22 21:15:46 +00:00
# Check for functions that may or may not exist.
CHECK_FUNCTION_EXISTS ( filelength FILELENGTH_EXISTS )
if ( FILELENGTH_EXISTS )
add_definitions ( -DHAVE_FILELENGTH=1 )
endif ( )
CHECK_FUNCTION_EXISTS ( strupr STRUPR_EXISTS )
if ( NOT STRUPR_EXISTS )
add_definitions ( -DNEED_STRUPR=1 )
endif ( )
CHECK_FUNCTION_EXISTS ( stricmp STRICMP_EXISTS )
if ( NOT STRICMP_EXISTS )
add_definitions ( -Dstricmp=strcasecmp )
endif ( )
CHECK_FUNCTION_EXISTS ( strnicmp STRNICMP_EXISTS )
if ( NOT STRNICMP_EXISTS )
add_definitions ( -Dstrnicmp=strncasecmp )
endif ( )
if ( NOT MSVC )
add_definitions ( -D__forceinline=inline )
endif ( )
if ( UNIX )
CHECK_LIBRARY_EXISTS ( rt clock_gettime "" CLOCK_GETTIME_IN_RT )
if ( NOT CLOCK_GETTIME_IN_RT )
CHECK_FUNCTION_EXISTS ( clock_gettime CLOCK_GETTIME_EXISTS )
if ( NOT CLOCK_GETTIME_EXISTS )
message ( STATUS "Could not find clock_gettime. Timing statistics will not be available." )
add_definitions ( -DNO_CLOCK_GETTIME )
endif ( )
else ( )
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } rt )
2019-09-22 21:15:46 +00:00
endif ( )
endif ( )
# Flags
# Update gitinfo.h
add_custom_target ( revision_check ALL
2020-04-11 22:16:14 +00:00
C O M M A N D " $ { C M A K E _ C O M M A N D } " - P " $ { C M A K E _ S O U R C E _ D I R } / t o o l s / u p d a t e r e v i s i o n / U p d a t e R e v i s i o n . c m a k e " s o u r c e / g i t i n f o . h
2019-09-22 21:15:46 +00:00
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ S O U R C E _ D I R }
2020-04-11 22:04:02 +00:00
)
2019-09-22 21:15:46 +00:00
2019-12-26 13:16:00 +00:00
# required libraries
2019-09-22 21:15:46 +00:00
2020-02-09 12:26:51 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${CMAKE_DL_LIBS}" )
2019-09-22 21:15:46 +00:00
if ( HAVE_VULKAN )
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } "glslang" "SPIRV" "OGLCompiler" )
2019-09-22 21:15:46 +00:00
endif ( )
2020-02-09 12:26:51 +00:00
# ZMUSIC
2020-02-09 14:48:07 +00:00
if ( MSVC )
find_package ( ZMusic )
else ( )
2020-04-13 08:28:31 +00:00
find_package ( ZMusic REQUIRED )
2020-02-09 14:48:07 +00:00
endif ( )
2020-02-09 12:26:51 +00:00
if ( MSVC AND NOT ZMUSIC_FOUND )
# Use prebuilt library
set ( ZMUSIC_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../bin/windows/zmusic" )
set ( ZMUSIC_INCLUDE_DIR ${ ZMUSIC_ROOT_PATH } /include )
set ( ZMUSIC_LIBRARIES zmusiclite )
if ( X64 )
link_directories ( ${ ZMUSIC_ROOT_PATH } /64bit )
else ( )
link_directories ( ${ ZMUSIC_ROOT_PATH } /32bit )
endif ( )
set ( ZMUSIC_FOUND TRUE )
endif ( )
2020-01-28 09:04:48 +00:00
# VPX
if ( MSVC AND NOT VPX_FOUND )
# Use prebuilt library
set ( VPX_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../platform/Windows" )
set ( VPX_INCLUDE_DIR ${ VPX_ROOT_PATH } /include )
set ( VPX_LIBRARIES libvpx libcompat-to-msvc )
if ( X64 )
link_directories ( ${ VPX_ROOT_PATH } /lib/64 )
else ( )
link_directories ( ${ VPX_ROOT_PATH } /lib/32 )
# Workaround for "error LNK2026: module unsafe for SAFESEH image."
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO" )
endif ( )
set ( VPX_FOUND TRUE )
endif ( )
if ( VPX_FOUND )
add_definitions ( "-DUSE_LIBVPX=1" )
include_directories ( "${VPX_INCLUDE_DIR}" )
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } ${ VPX_LIBRARIES } )
endif ( )
include_directories ( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GDTOA_INCLUDE_DIR}" )
2019-09-22 21:15:46 +00:00
if ( WIN32 )
2020-01-28 09:04:48 +00:00
include_directories ( "platform/win32" )
2019-09-22 21:15:46 +00:00
endif ( )
if ( ${ HAVE_VM_JIT } )
add_definitions ( -DHAVE_VM_JIT )
include_directories ( "${ASMJIT_INCLUDE_DIR}" )
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } "${ASMJIT_LIBRARIES}" )
2019-09-22 21:15:46 +00:00
endif ( )
2020-04-23 20:58:02 +00:00
# Start defining source files for ZDoom
set ( PLAT_WIN32_SOURCES
p l a t f o r m / w i n 3 2 / i _ s t e a m . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / h a r d w a r e . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ c r a s h . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ i n p u t . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ k e y b o a r d . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ m o u s e . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ d i j o y . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ r a w p s 2 . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ x i n p u t . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ m a i n . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ s y s t e m . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / i _ s p e c i a l p a t h s . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / s t _ s t a r t . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / s t _ s t a r t _ u t i l . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / g l _ s y s f b . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / b a s e _ s y s f b . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / w i n 3 2 b a s e v i d e o . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / w i n 3 2 g l v i d e o . c p p
c o m m o n / p l a t f o r m / w i n 3 2 / w i n 3 2 p o l y v i d e o . c p p )
2019-09-22 21:15:46 +00:00
2020-04-23 20:58:02 +00:00
if ( HAVE_VULKAN )
set ( PLAT_WIN32_SOURCES ${ PLAT_WIN32_SOURCES } common/platform/win32/win32vulkanvideo.cpp )
endif ( )
2020-01-06 01:35:27 +00:00
set ( PLAT_POSIX_SOURCES
2020-04-23 19:18:40 +00:00
p l a t f o r m / p o s i x / i _ s t e a m . c p p
2020-04-23 20:58:02 +00:00
c o m m o n / p l a t f o r m / p o s i x / i _ s y s t e m _ p o s i x . c p p )
2020-01-06 01:35:27 +00:00
set ( PLAT_SDL_SOURCES
2020-04-23 20:58:02 +00:00
c o m m o n / p l a t f o r m / p o s i x / s d l / c r a s h c a t c h e r . c
c o m m o n / p l a t f o r m / p o s i x / s d l / h a r d w a r e . c p p
c o m m o n / p l a t f o r m / p o s i x / s d l / i _ g u i . c p p
c o m m o n / p l a t f o r m / p o s i x / s d l / i _ i n p u t . c p p
c o m m o n / p l a t f o r m / p o s i x / s d l / i _ j o y s t i c k . c p p
c o m m o n / p l a t f o r m / p o s i x / s d l / i _ m a i n . c p p
c o m m o n / p l a t f o r m / p o s i x / s d l / i _ s y s t e m . c p p
c o m m o n / p l a t f o r m / p o s i x / s d l / s d l g l v i d e o . c p p
c o m m o n / p l a t f o r m / p o s i x / s d l / s t _ s t a r t . c p p )
2020-01-06 01:35:27 +00:00
set ( PLAT_UNIX_SOURCES
2020-04-23 20:58:02 +00:00
c o m m o n / p l a t f o r m / p o s i x / u n i x / i _ s p e c i a l p a t h s . c p p
c o m m o n / p l a t f o r m / p o s i x / u n i x / g t k _ d i a l o g s . c p p )
2020-01-06 01:35:27 +00:00
set ( PLAT_OSX_SOURCES
2020-04-23 20:58:02 +00:00
c o m m o n / p l a t f o r m / p o s i x / o s x / i w a d p i c k e r _ c o c o a . m m
c o m m o n / p l a t f o r m / p o s i x / o s x / i _ s p e c i a l p a t h s . m m
2020-01-26 14:39:10 +00:00
p l a t f o r m / p o s i x / o s x / r a z e . i c n s )
2020-01-06 01:35:27 +00:00
set ( PLAT_COCOA_SOURCES
2020-04-23 20:58:02 +00:00
c o m m o n / p l a t f o r m / p o s i x / c o c o a / i _ i n p u t . m m
c o m m o n / p l a t f o r m / p o s i x / c o c o a / i _ j o y s t i c k . c p p
c o m m o n / p l a t f o r m / p o s i x / c o c o a / i _ m a i n . m m
c o m m o n / p l a t f o r m / p o s i x / c o c o a / i _ s y s t e m . m m
c o m m o n / p l a t f o r m / p o s i x / c o c o a / i _ v i d e o . m m
c o m m o n / p l a t f o r m / p o s i x / c o c o a / s t _ c o n s o l e . m m
c o m m o n / p l a t f o r m / p o s i x / c o c o a / s t _ s t a r t . m m )
2019-09-22 21:15:46 +00:00
if ( WIN32 )
2020-04-23 20:58:02 +00:00
set ( SYSTEM_SOURCES_DIR common/platform/win32 )
2019-09-22 21:15:46 +00:00
set ( SYSTEM_SOURCES ${ PLAT_WIN32_SOURCES } )
set ( OTHER_SYSTEM_SOURCES ${ PLAT_POSIX_SOURCES } ${ PLAT_SDL_SOURCES } ${ PLAT_OSX_SOURCES } ${ PLAT_COCOA_SOURCES } ${ PLAT_UNIX_SOURCES } )
2019-09-22 23:28:18 +00:00
set ( SYSTEM_SOURCES ${ SYSTEM_SOURCES } platform/win32/gameres.rc )
2019-09-22 21:15:46 +00:00
elseif ( APPLE )
if ( OSX_COCOA_BACKEND )
2020-04-23 20:58:02 +00:00
set ( SYSTEM_SOURCES_DIR common/platform/posix common/platform/posix/cocoa )
2019-09-22 21:15:46 +00:00
set ( SYSTEM_SOURCES ${ PLAT_COCOA_SOURCES } )
set ( OTHER_SYSTEM_SOURCES ${ PLAT_WIN32_SOURCES } ${ PLAT_SDL_SOURCES } ${ PLAT_UNIX_SOURCES } )
else ( )
2020-04-23 20:58:02 +00:00
set ( SYSTEM_SOURCES_DIR common/platform/posix common/platform/posix/sdl )
2019-09-22 21:15:46 +00:00
set ( SYSTEM_SOURCES ${ PLAT_SDL_SOURCES } )
2020-04-23 20:58:02 +00:00
set ( PLAT_OSX_SOURCES ${ PLAT_OSX_SOURCES } common/platform/posix/sdl/i_system.mm )
2019-09-22 21:15:46 +00:00
set ( OTHER_SYSTEM_SOURCES ${ PLAT_WIN32_SOURCES } ${ PLAT_COCOA_SOURCES } ${ PLAT_UNIX_SOURCES } )
endif ( )
set ( SYSTEM_SOURCES ${ SYSTEM_SOURCES } ${ PLAT_POSIX_SOURCES } ${ PLAT_OSX_SOURCES } )
2020-01-06 01:35:27 +00:00
set_source_files_properties ( platform/posix/osx/ ${ PROJECT_NAME } .icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources )
2020-04-23 20:58:02 +00:00
set_source_files_properties ( common/platform/posix/osx/iwadpicker_cocoa.mm PROPERTIES COMPILE_FLAGS -fobjc-exceptions )
2019-09-22 21:15:46 +00:00
else ( )
2020-04-23 20:58:02 +00:00
set ( SYSTEM_SOURCES_DIR common/platform/posix common/platform/posix/sdl )
2019-09-22 21:15:46 +00:00
set ( SYSTEM_SOURCES ${ PLAT_POSIX_SOURCES } ${ PLAT_SDL_SOURCES } ${ PLAT_UNIX_SOURCES } )
set ( OTHER_SYSTEM_SOURCES ${ PLAT_WIN32_SOURCES } ${ PLAT_OSX_SOURCES } ${ PLAT_COCOA_SOURCES } )
endif ( )
2020-05-24 19:19:33 +00:00
if ( HAVE_MMX )
add_definitions ( -DHAVE_MMX=1 )
set ( SYSTEM_SOURCES ${ SYSTEM_SOURCES }
c o m m o n / t e x t u r e s / h i r e s / h q n x _ a s m / h q 2 x _ a s m . c p p
c o m m o n / t e x t u r e s / h i r e s / h q n x _ a s m / h q 3 x _ a s m . c p p
c o m m o n / t e x t u r e s / h i r e s / h q n x _ a s m / h q 4 x _ a s m . c p p
c o m m o n / t e x t u r e s / h i r e s / h q n x _ a s m / h q n x _ a s m _ I m a g e . c p p )
if ( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
set_source_files_properties (
c o m m o n / t e x t u r e s / h i r e s / h q n x _ a s m / h q 2 x _ a s m . c p p
c o m m o n / t e x t u r e s / h i r e s / h q n x _ a s m / h q 3 x _ a s m . c p p
c o m m o n / t e x t u r e s / h i r e s / h q n x _ a s m / h q 4 x _ a s m . c p p
c o m m o n / t e x t u r e s / h i r e s / h q r e s i z e . c p p
P R O P E R T I E S C O M P I L E _ F L A G S " - m m m x " )
endif ( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
endif ( HAVE_MMX )
2019-09-22 21:15:46 +00:00
if ( HAVE_PARALLEL_FOR )
add_definitions ( -DHAVE_PARALLEL_FOR=1 )
elseif ( HAVE_DISPATCH_APPLY )
add_definitions ( -DHAVE_DISPATCH_APPLY=1 )
else ( )
option ( NO_OPENMP "Disable usage of OpenMP" OFF )
if ( NOT NO_OPENMP )
include ( FindOpenMP )
if ( OPENMP_FOUND )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
endif ( OPENMP_FOUND )
endif ( NOT NO_OPENMP )
endif ( )
2020-04-07 22:19:49 +00:00
add_custom_command ( OUTPUT ${ CMAKE_CURRENT_BINARY_DIR } /zcc-parse.c ${ CMAKE_CURRENT_BINARY_DIR } /zcc-parse.h
C O M M A N D l e m o n - C $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o m m o n / s c r i p t i n g / f r o n t e n d / z c c - p a r s e . l e m o n
D E P E N D S l e m o n $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o m m o n / s c r i p t i n g / f r o n t e n d / z c c - p a r s e . l e m o n )
2019-09-22 21:15:46 +00:00
add_custom_command ( OUTPUT ${ CMAKE_CURRENT_BINARY_DIR } /sc_man_scanner.h
2020-04-11 22:04:02 +00:00
C O M M A N D r e 2 c - - n o - g e n e r a t i o n - d a t e - s - o $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / s c _ m a n _ s c a n n e r . h $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o m m o n / e n g i n e / s c _ m a n _ s c a n n e r . r e
D E P E N D S r e 2 c $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o m m o n / e n g i n e / s c _ m a n _ s c a n n e r . r e )
2020-01-06 01:41:47 +00:00
2019-09-22 21:15:46 +00:00
include_directories ( ${ CMAKE_CURRENT_BINARY_DIR } )
#option( SEND_ANON_STATS "Enable sending of anonymous hardware statistics" ON )
#if( NOT SEND_ANON_STATS )
# add_definitions( -DNO_SEND_STATS )
#endif()
# Project files should be aware of the header files. We can GLOB these since
# there's generally a new cpp for every header so this file will get changed
file ( GLOB HEADER_FILES
b u i l d / i n c l u d e / * . h
g l b a c k e n d / * . h
l i b s m a c k e r d e c / i n c l u d e / * . h
l i b x m p - l i t e / i n c l u d e / l i b x m p - l i t e / * . h
l i b x m p - l i t e / s r c / * . h
2020-04-11 21:38:30 +00:00
c o r e / * . h
c o r e / 2 d / * . h
c o r e / u t i l i t y / * . h
c o r e / u t i l i t y / r a p i d j s o n / * . h
c o r e / c o n s o l e / * . h
c o r e / m u s i c / * . h
c o r e / m e n u / * . h
c o r e / i n p u t / * . h
2019-09-22 21:15:46 +00:00
2020-04-12 06:19:19 +00:00
c o m m o n / a u d i o / s o u n d / t h i r d p a r t y / * . h
c o m m o n / a u d i o / s o u n d / * . h
2020-04-12 06:08:31 +00:00
c o m m o n / a u d i o / m u s i c / * . h *
2020-05-25 15:11:32 +00:00
c o m m o n / 2 d / * . h
2020-04-12 06:08:31 +00:00
c o m m o n / c o n s o l e / * . h
2020-04-11 21:50:43 +00:00
c o m m o n / u t i l i t y / * . h
2020-04-11 22:04:02 +00:00
c o m m o n / e n g i n e / * . h
2020-04-23 20:58:02 +00:00
c o m m o n / m e n u / * . h
2020-04-05 20:51:53 +00:00
c o m m o n / f o n t s / * . h
2020-04-06 14:10:54 +00:00
c o m m o n / o b j e c t s / * . h
2020-04-11 21:54:33 +00:00
c o m m o n / f i l e s y s t e m / * . h
2020-04-23 20:58:02 +00:00
c o m m o n / p l a t f o r m / p o s i x / c o c o a / * . h
c o m m o n / p l a t f o r m / p o s i x / s d l / * . h
c o m m o n / p l a t f o r m / w i n 3 2 / * . h
2020-05-30 22:01:00 +00:00
c o m m o n / m o d e l s / * . h
2020-04-11 22:04:02 +00:00
c o m m o n / t e x t u r e s / * . h
2020-05-24 19:19:33 +00:00
c o m m o n / t e x t u r e s / h i r e s / h q n x / * . h
c o m m o n / t e x t u r e s / h i r e s / h q n x _ a s m / * . h
c o m m o n / t e x t u r e s / h i r e s / x b r / * . h
2020-04-11 21:50:43 +00:00
c o m m o n / t h i r d p a r t y / * . h
c o m m o n / t h i r d p a r t y / r a p i d j s o n / * . h
2020-04-06 19:10:07 +00:00
c o m m o n / t h i r d p a r t y / m a t h / * h
2020-04-25 22:01:04 +00:00
c o m m o n / r e n d e r i n g / * . h
2020-04-10 20:17:29 +00:00
c o m m o n / r e n d e r i n g / g l _ l o a d / * . h
2020-06-11 16:40:53 +00:00
c o m m o n / r e n d e r i n g / h w r e n d e r e r / * . h
2020-04-25 22:01:04 +00:00
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / * . h
2020-05-31 08:53:11 +00:00
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / * . h
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / m a t h / * . h
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / d r a w e r s / * . h
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / b a c k e n d / * . h
c o m m o n / r e n d e r i n g / v u l k a n / * . h
c o m m o n / r e n d e r i n g / v u l k a n / s y s t e m / * . h
c o m m o n / r e n d e r i n g / v u l k a n / r e n d e r e r / * . h
c o m m o n / r e n d e r i n g / v u l k a n / s h a d e r s / * . h
c o m m o n / r e n d e r i n g / v u l k a n / t e x t u r e s / * . h
2020-04-06 19:10:07 +00:00
c o m m o n / s c r i p t i n g / c o r e / * h
c o m m o n / s c r i p t i n g / v m / * h
c o m m o n / s c r i p t i n g / j i t / * h
c o m m o n / s c r i p t i n g / i n t e r f a c e / * . h
2020-04-07 18:14:24 +00:00
c o m m o n / s c r i p t i n g / b a c k e n d / * . h
2020-04-07 22:19:49 +00:00
c o m m o n / s c r i p t i n g / f r o n t e n d / * . h
2020-04-11 21:50:43 +00:00
2019-09-22 21:15:46 +00:00
b u i l d / s r c / * . h
2019-12-22 19:55:47 +00:00
p l a t f o r m / w i n 3 2 / * . h
2020-01-26 14:40:43 +00:00
p l a t f o r m / p o s i x / * . h
2019-09-22 21:15:46 +00:00
t h i r d p a r t y / i n c l u d e / * . h
t h i r d p a r t y / i n c l u d e / * . h p p
2019-11-07 19:31:16 +00:00
t h i r d p a r t y / i m g u i / * . h
2020-04-11 21:38:30 +00:00
c o r e / t e x t u r e s / * . h
c o r e / t e x t u r e s / f o r m a t s / * . h
2019-09-22 21:15:46 +00:00
)
2020-05-31 08:53:11 +00:00
set ( POLYRENDER_SOURCES
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / d r a w e r s / p o l y _ t r i a n g l e . c p p
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / d r a w e r s / p o l y _ t h r e a d . c p p
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / d r a w e r s / s c r e e n _ t r i a n g l e . c p p
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / d r a w e r s / s c r e e n _ s c a n l i n e _ s e t u p . c p p
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / d r a w e r s / s c r e e n _ s h a d e r . c p p
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / d r a w e r s / s c r e e n _ b l e n d . c p p
)
2019-09-22 21:15:46 +00:00
# These files will be flagged as "headers" so that they appear in project files
# without being compiled.
set ( NOT_COMPILED_SOURCE_FILES
$ { O T H E R _ S Y S T E M _ S O U R C E S }
2020-05-31 08:53:11 +00:00
$ { P O L Y R E N D E R _ S O U R C E S }
2019-10-23 23:20:58 +00:00
s c _ m a n _ s c a n n e r . h
2020-04-11 22:04:02 +00:00
c o m m o n / e n g i n e / s c _ m a n _ s c a n n e r . r e
2020-04-07 22:19:49 +00:00
c o m m o n / s c r i p t i n g / f r o n t e n d / z c c - p a r s e . l e m o n
z c c - p a r s e . c
z c c - p a r s e . h
2020-04-23 20:58:02 +00:00
c o m m o n / p l a t f o r m / w i n 3 2 / z u t i l . n a t v i s
2019-09-22 21:15:46 +00:00
)
2020-04-06 21:32:29 +00:00
set ( VM_JIT_SOURCES
c o m m o n / s c r i p t i n g / j i t / j i t . c p p
c o m m o n / s c r i p t i n g / j i t / j i t _ r u n t i m e . c p p
c o m m o n / s c r i p t i n g / j i t / j i t _ c a l l . c p p
c o m m o n / s c r i p t i n g / j i t / j i t _ f l o w . c p p
c o m m o n / s c r i p t i n g / j i t / j i t _ l o a d . c p p
c o m m o n / s c r i p t i n g / j i t / j i t _ m a t h . c p p
c o m m o n / s c r i p t i n g / j i t / j i t _ m o v e . c p p
c o m m o n / s c r i p t i n g / j i t / j i t _ s t o r e . c p p
)
2019-09-22 21:15:46 +00:00
# Enable fast math for some sources where performance matters (or where the PCH must not be used.) (This would be good for rendering code, but unfortunately that is hopelessly intermingled with the playsim code in engine.cpp.)
set ( FASTMATH_SOURCES
2020-04-10 20:17:29 +00:00
c o m m o n / r e n d e r i n g / g l _ l o a d / g l _ l o a d . c
2020-05-31 08:53:11 +00:00
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / p o l y _ a l l . c p p
2020-05-24 19:19:33 +00:00
c o m m o n / t e x t u r e s / h i r e s / h q n x / i n i t . c p p
c o m m o n / t e x t u r e s / h i r e s / h q n x / h q 2 x . c p p
c o m m o n / t e x t u r e s / h i r e s / h q n x / h q 3 x . c p p
c o m m o n / t e x t u r e s / h i r e s / h q n x / h q 4 x . c p p
c o m m o n / t e x t u r e s / h i r e s / x b r / x b r z . c p p
c o m m o n / t e x t u r e s / h i r e s / x b r / x b r z _ o l d . c p p
2019-09-22 21:15:46 +00:00
# This should better be made a library subproject later, once things are working.
l i b s m a c k e r d e c / s r c / B i t R e a d e r . c p p
l i b s m a c k e r d e c / s r c / F i l e S t r e a m . c p p
l i b s m a c k e r d e c / s r c / H u f f m a n V L C . c p p
l i b s m a c k e r d e c / s r c / L o g E r r o r . c p p
l i b s m a c k e r d e c / s r c / S m a c k e r D e c o d e r . c p p
2020-04-11 21:50:43 +00:00
c o m m o n / u t i l i t y / m a t r i x . c p p
2019-09-22 21:15:46 +00:00
# The rest is only here because it is C, not C++
2020-01-06 01:41:47 +00:00
2019-11-02 11:59:59 +00:00
g i t i n f o . c p p
2019-09-22 21:15:46 +00:00
)
2020-05-31 08:53:11 +00:00
#Vulkan stuff must go into a separate list because it needs to be disabled for some platforms
set ( VULKAN_SOURCES
c o m m o n / r e n d e r i n g / v u l k a n / s y s t e m / v k _ d e v i c e . c p p
c o m m o n / r e n d e r i n g / v u l k a n / s y s t e m / v k _ s w a p c h a i n . c p p
c o m m o n / r e n d e r i n g / v u l k a n / s y s t e m / v k _ b u i l d e r s . c p p
c o m m o n / r e n d e r i n g / v u l k a n / s y s t e m / v k _ f r a m e b u f f e r . c p p
c o m m o n / r e n d e r i n g / v u l k a n / s y s t e m / v k _ b u f f e r s . c p p
c o m m o n / r e n d e r i n g / v u l k a n / r e n d e r e r / v k _ r e n d e r s t a t e . c p p
c o m m o n / r e n d e r i n g / v u l k a n / r e n d e r e r / v k _ r e n d e r p a s s . c p p
c o m m o n / r e n d e r i n g / v u l k a n / r e n d e r e r / v k _ s t r e a m b u f f e r . c p p
c o m m o n / r e n d e r i n g / v u l k a n / r e n d e r e r / v k _ p o s t p r o c e s s . c p p
c o m m o n / r e n d e r i n g / v u l k a n / r e n d e r e r / v k _ r e n d e r b u f f e r s . c p p
c o m m o n / r e n d e r i n g / v u l k a n / s h a d e r s / v k _ s h a d e r . c p p
c o m m o n / r e n d e r i n g / v u l k a n / t e x t u r e s / v k _ s a m p l e r s . c p p
c o m m o n / r e n d e r i n g / v u l k a n / t e x t u r e s / v k _ h w t e x t u r e . c p p
c o m m o n / r e n d e r i n g / v u l k a n / t e x t u r e s / v k _ i m a g e t r a n s i t i o n . c p p
c o m m o n / r e n d e r i n g / v u l k a n / t h i r d p a r t y / v o l k / v o l k . c
c o m m o n / r e n d e r i n g / v u l k a n / t h i r d p a r t y / v k _ m e m _ a l l o c / v k _ m e m _ a l l o c . c p p
)
2019-09-22 21:15:46 +00:00
2020-05-31 08:53:11 +00:00
if ( HAVE_VULKAN )
set ( FASTMATH_SOURCES ${ FASTMATH_SOURCES } ${ VULKAN_SOURCES } )
endif ( )
set ( POLYBACKEND_SOURCES
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / b a c k e n d / p o l y _ f r a m e b u f f e r . c p p
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / b a c k e n d / p o l y _ b u f f e r s . c p p
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / b a c k e n d / p o l y _ h w t e x t u r e . c p p
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / b a c k e n d / p o l y _ r e n d e r s t a t e . c p p
)
set ( FASTMATH_SOURCES ${ FASTMATH_SOURCES } ${ POLYBACKEND_SOURCES } )
2019-09-22 21:15:46 +00:00
set ( PCH_SOURCES
2019-11-26 20:25:45 +00:00
2019-09-22 21:15:46 +00:00
g l b a c k e n d / g l b a c k e n d . c p p
2019-10-06 19:15:53 +00:00
g l b a c k e n d / g l _ p a l m a n a g e r . c p p
2019-10-20 06:04:54 +00:00
g l b a c k e n d / g l _ t e x t u r e . c p p
2020-01-06 01:41:47 +00:00
2019-11-01 23:38:30 +00:00
t h i r d p a r t y / s r c / b a s e 6 4 . c p p
2019-09-22 21:15:46 +00:00
t h i r d p a r t y / s r c / f i x 1 6 . c p p
t h i r d p a r t y / s r c / m d 4 . c p p
2020-01-06 01:41:47 +00:00
2019-09-22 21:15:46 +00:00
# Todo: Split out the license-safe code from this.
b u i l d / s r c / a n i m v p x . c p p
b u i l d / s r c / c l i p . c p p
b u i l d / s r c / d e f s . c p p
b u i l d / s r c / e n g i n e . c p p
b u i l d / s r c / m d s p r i t e . c p p
b u i l d / s r c / m h k . c p p
b u i l d / s r c / p o l y m o s t . c p p
b u i l d / s r c / s c r i p t f i l e . c p p
b u i l d / s r c / t i m e r . c p p
b u i l d / s r c / v o x m o d e l . c p p
2020-01-06 01:41:47 +00:00
2020-07-23 20:26:07 +00:00
c o r e / m o v i e / p l a y m v e . c p p
2020-07-04 08:22:20 +00:00
c o r e / c h e a t h a n d l e r . c p p
2020-05-10 10:42:47 +00:00
c o r e / m a t h u t i l . c p p
2020-04-11 21:38:30 +00:00
c o r e / r t s . c p p
2020-05-17 06:51:49 +00:00
c o r e / c t _ c h a t . c p p
2020-04-11 21:38:30 +00:00
c o r e / g a m e c o n f i g f i l e . c p p
c o r e / g a m e c v a r s . c p p
c o r e / g a m e c o n t r o l . c p p
c o r e / i n p u t s t a t e . c p p
2020-07-07 11:19:09 +00:00
c o r e / m a p i n f o . c p p
2020-04-11 21:38:30 +00:00
c o r e / s e a r c h p a t h s . c p p
2020-06-20 07:46:41 +00:00
c o r e / s c r e e n j o b . c p p
2020-04-11 21:38:30 +00:00
c o r e / i n i t f s . c p p
c o r e / s t a t i s t i c s . c p p
c o r e / s e c r e t s . c p p
c o r e / c o m p o s i t e s a v e g a m e . c p p
c o r e / s a v e g a m e h e l p . c p p
c o r e / q u o t e s . c p p
c o r e / s c r e e n s h o t . c p p
2020-04-12 06:07:48 +00:00
c o r e / r a z e _ m u s i c . c p p
2020-04-12 06:09:38 +00:00
c o r e / r a z e _ s o u n d . c p p
2020-06-07 11:06:18 +00:00
c o r e / p a l e t t e . c p p
2020-06-14 17:20:04 +00:00
c o r e / z c o m p i l e . c p p
2020-06-21 20:18:12 +00:00
c o r e / s t a t u s b a r . c p p
2020-04-11 21:38:30 +00:00
c o r e / c o n s o l e / c _ c o n s o l e . c p p
c o r e / c o n s o l e / d _ e v e n t . c p p
2020-04-12 06:19:19 +00:00
c o m m o n / a u d i o / s o u n d / i _ s o u n d . c p p
c o m m o n / a u d i o / s o u n d / o a l s o u n d . c p p
c o m m o n / a u d i o / s o u n d / s _ e n v i r o n m e n t . c p p
c o m m o n / a u d i o / s o u n d / s _ s o u n d . c p p
2020-06-14 16:57:55 +00:00
#common/audio/sound/s_reverbedit.cpp
2020-04-12 06:08:31 +00:00
c o m m o n / a u d i o / m u s i c / m u s i c _ m i d i _ b a s e . c p p
c o m m o n / a u d i o / m u s i c / m u s i c . c p p
c o m m o n / a u d i o / m u s i c / i _ m u s i c . c p p
c o m m o n / a u d i o / m u s i c / i _ s o u n d f o n t . c p p
c o m m o n / a u d i o / m u s i c / m u s i c _ c o n f i g . c p p
2020-05-25 15:11:32 +00:00
c o m m o n / 2 d / v _ 2 d d r a w e r . c p p
c o m m o n / 2 d / v _ d r a w t e x t . c p p
c o m m o n / 2 d / v _ d r a w . c p p
2020-04-11 21:50:43 +00:00
c o m m o n / t h i r d p a r t y / s f m t / S F M T . c p p
2020-04-05 20:51:53 +00:00
c o m m o n / f o n t s / s i n g l e l u m p f o n t . c p p
c o m m o n / f o n t s / s i n g l e p i c f o n t . c p p
c o m m o n / f o n t s / s p e c i a l f o n t . c p p
c o m m o n / f o n t s / f o n t . c p p
c o m m o n / f o n t s / h e x f o n t . c p p
c o m m o n / f o n t s / v _ f o n t . c p p
2020-05-25 15:11:32 +00:00
c o m m o n / f o n t s / v _ t e x t . c p p
2020-05-24 19:19:33 +00:00
c o m m o n / t e x t u r e s / h w _ i h w t e x t u r e . c p p
c o m m o n / t e x t u r e s / h w _ m a t e r i a l . c p p
2020-04-11 22:04:02 +00:00
c o m m o n / t e x t u r e s / b i t m a p . c p p
2020-04-11 22:17:01 +00:00
c o m m o n / t e x t u r e s / m _ p n g . c p p
2020-05-24 19:19:33 +00:00
c o m m o n / t e x t u r e s / t e x t u r e . c p p
2020-05-25 21:59:07 +00:00
c o m m o n / t e x t u r e s / g a m e t e x t u r e . c p p
2020-05-23 21:53:38 +00:00
c o m m o n / t e x t u r e s / i m a g e . c p p
2020-05-24 19:19:33 +00:00
c o m m o n / t e x t u r e s / i m a g e t e x t u r e . c p p
2020-05-24 14:11:10 +00:00
c o m m o n / t e x t u r e s / t e x t u r e m a n a g e r . c p p
2020-05-24 19:19:33 +00:00
c o m m o n / t e x t u r e s / m u l t i p a t c h t e x t u r e b u i l d e r . c p p
c o m m o n / t e x t u r e s / s k y b o x t e x t u r e . c p p
2020-04-05 20:51:53 +00:00
c o m m o n / t e x t u r e s / a n i m t e x t u r e . c p p
2020-05-31 08:53:11 +00:00
c o m m o n / t e x t u r e s / v _ c o l l e c t i o n . c p p
2020-06-28 12:41:44 +00:00
c o m m o n / t e x t u r e s / a n i m l i b . c p p
2020-05-23 22:15:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / a u t o m a p t e x t u r e . c p p
c o m m o n / t e x t u r e s / f o r m a t s / b r i g h t m a p t e x t u r e . c p p
c o m m o n / t e x t u r e s / f o r m a t s / b u i l d t e x t u r e . c p p
2020-05-23 21:53:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / d d s t e x t u r e . c p p
2020-05-23 22:15:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / f l a t t e x t u r e . c p p
2020-05-24 19:19:33 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / f o n t c h a r s . c p p
2020-05-23 22:15:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / i m g z t e x t u r e . c p p
2020-05-23 21:53:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / j p e g t e x t u r e . c p p
2020-05-23 22:15:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / m d 5 c h e c k . c p p
c o m m o n / t e x t u r e s / f o r m a t s / m u l t i p a t c h t e x t u r e . c p p
c o m m o n / t e x t u r e s / f o r m a t s / p a t c h t e x t u r e . c p p
2020-05-23 21:53:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / p c x t e x t u r e . c p p
c o m m o n / t e x t u r e s / f o r m a t s / p n g t e x t u r e . c p p
2020-05-23 22:15:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / r a w p a g e t e x t u r e . c p p
c o m m o n / t e x t u r e s / f o r m a t s / e m p t y t e x t u r e . c p p
c o m m o n / t e x t u r e s / f o r m a t s / s h a d e r t e x t u r e . c p p
2020-05-23 21:53:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / t g a t e x t u r e . c p p
c o m m o n / t e x t u r e s / f o r m a t s / s t b t e x t u r e . c p p
2020-06-28 12:41:44 +00:00
c o m m o n / t e x t u r e s / f o r m a t s / a n m t e x t u r e . c p p
2020-05-24 19:19:33 +00:00
c o m m o n / t e x t u r e s / h i r e s / h q r e s i z e . c p p
2020-05-30 22:01:00 +00:00
c o m m o n / m o d e l s / m o d e l s _ m d 3 . c p p
c o m m o n / m o d e l s / m o d e l s _ m d 2 . c p p
c o m m o n / m o d e l s / m o d e l s _ v o x e l . c p p
c o m m o n / m o d e l s / m o d e l s _ u e 1 . c p p
c o m m o n / m o d e l s / m o d e l s _ o b j . c p p
c o m m o n / m o d e l s / m o d e l . c p p
c o m m o n / m o d e l s / v o x e l s . c p p
2020-04-11 22:11:50 +00:00
c o m m o n / c o n s o l e / c _ c o m m a n d l i n e . c p p
c o m m o n / c o n s o l e / c _ b u t t o n s . c p p
c o m m o n / c o n s o l e / c _ b i n d . c p p
c o m m o n / c o n s o l e / c _ e n g i n e c m d s . c p p
c o m m o n / c o n s o l e / c _ c o n s o l e b u f f e r . c p p
c o m m o n / c o n s o l e / c _ c v a r s . c p p
c o m m o n / c o n s o l e / c _ d i s p a t c h . c p p
c o m m o n / c o n s o l e / c _ e x p r . c p p
2020-04-11 21:50:43 +00:00
c o m m o n / u t i l i t y / e n g i n e e r r o r s . c p p
c o m m o n / u t i l i t y / i _ m o d u l e . c p p
c o m m o n / u t i l i t y / m _ a l l o c . c p p
c o m m o n / u t i l i t y / u t f 8 . c p p
c o m m o n / u t i l i t y / p a l e t t e . c p p
c o m m o n / u t i l i t y / f i l e s . c p p
c o m m o n / u t i l i t y / f i l e s _ d e c o m p r e s s . c p p
c o m m o n / u t i l i t y / m e m a r e n a . c p p
c o m m o n / u t i l i t y / c m d l i b . c p p
c o m m o n / u t i l i t y / c o n f i g f i l e . c p p
c o m m o n / u t i l i t y / i _ t i m e . c p p
c o m m o n / u t i l i t y / m _ a r g v . c p p
c o m m o n / u t i l i t y / s _ p l a y l i s t . c p p
c o m m o n / u t i l i t y / z s t r f o r m a t . c p p
2020-04-11 22:04:02 +00:00
c o m m o n / u t i l i t y / n a m e . c p p
2020-05-31 08:53:11 +00:00
c o m m o n / u t i l i t y / r _ m e m o r y . c p p
2020-04-11 21:50:43 +00:00
c o m m o n / t h i r d p a r t y / m d 5 . c p p
c o m m o n / t h i r d p a r t y / s u p e r f a s t h a s h . c p p
2020-04-11 21:54:33 +00:00
c o m m o n / f i l e s y s t e m / f i l e s y s t e m . c p p
c o m m o n / f i l e s y s t e m / a n c i e n t z i p . c p p
c o m m o n / f i l e s y s t e m / f i l e _ 7 z . c p p
c o m m o n / f i l e s y s t e m / f i l e _ g r p . c p p
c o m m o n / f i l e s y s t e m / f i l e _ l u m p . c p p
c o m m o n / f i l e s y s t e m / f i l e _ r f f . c p p
c o m m o n / f i l e s y s t e m / f i l e _ w a d . c p p
c o m m o n / f i l e s y s t e m / f i l e _ z i p . c p p
c o m m o n / f i l e s y s t e m / f i l e _ p a k . c p p
c o m m o n / f i l e s y s t e m / f i l e _ w h r e s . c p p
c o m m o n / f i l e s y s t e m / f i l e _ d i r e c t o r y . c p p
c o m m o n / f i l e s y s t e m / r e s o u r c e f i l e . c p p
2020-05-31 08:53:11 +00:00
c o m m o n / e n g i n e / c y c l e r . c p p
2020-06-14 16:57:55 +00:00
c o m m o n / e n g i n e / d _ e v e n t . c p p
2020-04-08 16:53:47 +00:00
c o m m o n / e n g i n e / s t a t s . c p p
2020-04-11 22:04:02 +00:00
c o m m o n / e n g i n e / s c _ m a n . c p p
2020-04-11 22:18:12 +00:00
c o m m o n / e n g i n e / p a l e t t e c o n t a i n e r . c p p
2020-04-11 22:11:50 +00:00
c o m m o n / e n g i n e / s t r i n g t a b l e . c p p
2020-04-12 06:21:50 +00:00
c o m m o n / e n g i n e / i _ i n t e r f a c e . c p p
c o m m o n / e n g i n e / r e n d e r s t y l e . c p p
c o m m o n / e n g i n e / v _ c o l o r t a b l e s . c p p
2020-04-07 16:04:35 +00:00
c o m m o n / e n g i n e / s e r i a l i z e r . c p p
2020-06-11 07:15:44 +00:00
c o m m o n / e n g i n e / m _ j o y . c p p
2020-04-07 18:14:24 +00:00
c o m m o n / e n g i n e / m _ r a n d o m . c p p
2020-04-06 14:10:54 +00:00
c o m m o n / o b j e c t s / d o b j e c t . c p p
c o m m o n / o b j e c t s / d o b j g c . c p p
c o m m o n / o b j e c t s / d o b j t y p e . c p p
2020-06-14 16:57:55 +00:00
2020-04-28 21:11:33 +00:00
c o m m o n / r e n d e r i n g / v _ f r a m e b u f f e r . c p p
c o m m o n / r e n d e r i n g / v _ v i d e o . c p p
2020-05-31 08:53:11 +00:00
c o m m o n / r e n d e r i n g / r _ t h r e a d . c p p
2020-04-25 22:01:04 +00:00
c o m m o n / r e n d e r i n g / r _ v i d e o s c a l e . c p p
2020-06-11 16:40:53 +00:00
c o m m o n / r e n d e r i n g / h w r e n d e r e r / h w _ d r a w 2 d . c p p
2020-05-31 08:41:59 +00:00
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ c l o c k . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ s k y d o m e . c p p
2020-04-26 21:17:54 +00:00
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / f l a t v e r t i c e s . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ v i e w p o i n t b u f f e r . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ m o d e l v e r t e x b u f f e r . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ c v a r s . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ v r m o d e s . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ l i g h t b u f f e r . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ a a b b t r e e . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ s h a d o w m a p . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a / h w _ s h a d e r p a t c h e r . c p p
2020-04-25 22:01:04 +00:00
c o m m o n / r e n d e r i n g / h w r e n d e r e r / p o s t p r o c e s s i n g / h w _ p o s t p r o c e s s . c p p
c o m m o n / r e n d e r i n g / h w r e n d e r e r / p o s t p r o c e s s i n g / h w _ p o s t p r o c e s s _ c v a r s . c p p
2020-04-10 20:17:29 +00:00
c o m m o n / r e n d e r i n g / g l _ l o a d / g l _ i n t e r f a c e . c p p
2020-05-31 08:41:59 +00:00
c o m m o n / r e n d e r i n g / g l / g l _ r e n d e r e r . c p p
c o m m o n / r e n d e r i n g / g l / g l _ s t e r e o 3 d . c p p
c o m m o n / r e n d e r i n g / g l / g l _ f r a m e b u f f e r . c p p
2020-04-26 21:17:54 +00:00
c o m m o n / r e n d e r i n g / g l / g l _ r e n d e r s t a t e . c p p
c o m m o n / r e n d e r i n g / g l / g l _ r e n d e r b u f f e r s . c p p
c o m m o n / r e n d e r i n g / g l / g l _ p o s t p r o c e s s . c p p
c o m m o n / r e n d e r i n g / g l / g l _ p o s t p r o c e s s s t a t e . c p p
2020-05-28 21:48:50 +00:00
c o m m o n / r e n d e r i n g / g l / g l _ d e b u g . c p p
2020-04-26 21:17:54 +00:00
c o m m o n / r e n d e r i n g / g l / g l _ b u f f e r s . c p p
2020-05-28 23:03:01 +00:00
c o m m o n / r e n d e r i n g / g l / g l _ h w t e x t u r e . c p p
2020-05-28 21:48:50 +00:00
c o m m o n / r e n d e r i n g / g l / g l _ s a m p l e r s . c p p
2020-04-26 21:17:54 +00:00
c o m m o n / r e n d e r i n g / g l / g l _ s h a d e r . c p p
c o m m o n / r e n d e r i n g / g l / g l _ s h a d e r p r o g r a m . c p p
2020-04-07 16:04:35 +00:00
c o m m o n / s c r i p t i n g / c o r e / d i c t i o n a r y . c p p
2020-04-07 18:14:24 +00:00
c o m m o n / s c r i p t i n g / c o r e / d y n a r r a y s . c p p
2020-04-06 19:10:07 +00:00
c o m m o n / s c r i p t i n g / c o r e / s y m b o l s . c p p
c o m m o n / s c r i p t i n g / c o r e / t y p e s . c p p
c o m m o n / s c r i p t i n g / c o r e / s c o p e b a r r i e r . c p p
c o m m o n / s c r i p t i n g / c o r e / v m d i s a s m . c p p
2020-04-07 22:19:49 +00:00
c o m m o n / s c r i p t i n g / c o r e / i m p o r t s . c p p
2020-04-06 19:10:07 +00:00
c o m m o n / s c r i p t i n g / v m / v m e x e c . c p p
c o m m o n / s c r i p t i n g / v m / v m f r a m e . c p p
c o m m o n / s c r i p t i n g / i n t e r f a c e / s t r i n g f o r m a t . c p p
2020-06-14 16:57:55 +00:00
c o m m o n / s c r i p t i n g / i n t e r f a c e / v m n a t i v e s . c p p
2020-04-07 22:19:49 +00:00
c o m m o n / s c r i p t i n g / f r o n t e n d / a s t . c p p
c o m m o n / s c r i p t i n g / f r o n t e n d / z c c _ c o m p i l e . c p p
c o m m o n / s c r i p t i n g / f r o n t e n d / z c c _ p a r s e r . c p p
2020-04-07 18:14:24 +00:00
c o m m o n / s c r i p t i n g / b a c k e n d / v m b u i l d e r . c p p
c o m m o n / s c r i p t i n g / b a c k e n d / c o d e g e n . c p p
2020-04-11 21:50:43 +00:00
2020-04-08 16:53:47 +00:00
2020-04-11 21:38:30 +00:00
c o r e / t e x t u r e s / b u i l d t i l e s . c p p
2020-05-24 19:19:33 +00:00
#core/textures/texture.cpp
2020-04-11 21:38:30 +00:00
c o r e / m u s i c / s _ a d v s o u n d . c p p
c o r e / m e n u / i m a g e s c r o l l e r . c p p
c o r e / m e n u / j o y s t i c k m e n u . c p p
c o r e / m e n u / l i s t m e n u . c p p
c o r e / m e n u / s a v e g a m e m a n a g e r . c p p
c o r e / m e n u / l o a d s a v e m e n u . c p p
c o r e / m e n u / m e n u . c p p
c o r e / m e n u / m e n u d e f . c p p
c o r e / m e n u / m e n u i n p u t . c p p
c o r e / m e n u / m e s s a g e b o x . c p p
c o r e / m e n u / o p t i o n m e n u . c p p
c o r e / m e n u / r e s o l u t i o n m e n u . c p p
2019-09-22 21:15:46 +00:00
)
2020-04-06 21:32:29 +00:00
if ( ${ HAVE_VM_JIT } )
set ( PCH_SOURCES ${ PCH_SOURCES } ${ VM_JIT_SOURCES } )
else ( )
set ( NOT_COMPILED_SOURCE_FILES ${ NOT_COMPILED_SOURCE_FILES } ${ VM_JIT_SOURCES } )
endif ( )
2020-01-27 11:45:19 +00:00
macro ( use_precompiled_header )
if ( MSVC )
enable_precompiled_headers ( "${ARGV0}/g_pch.h" PCH_SOURCES )
# The original Build code was written with unsigned chars and unfortunately they still haven't been eliminated entirely.
# All other code should stay with signed chars. What a mess... :(
else ( )
# Temporary solution for compilers other than MSVC
set_source_files_properties ( ${ PCH_SOURCES } PROPERTIES COMPILE_FLAGS "-include g_pch.h" )
endif ( )
endmacro ( )
use_precompiled_header ( "." )
2019-09-22 21:15:46 +00:00
2019-12-27 12:52:15 +00:00
add_executable ( ${ PROJECT_NAME } WIN32 MACOSX_BUNDLE
2019-09-22 21:15:46 +00:00
$ { H E A D E R _ F I L E S }
$ { N O T _ C O M P I L E D _ S O U R C E _ F I L E S }
2020-04-19 19:53:21 +00:00
_ _ a u t o s t a r t . c p p
2019-09-22 21:15:46 +00:00
$ { S Y S T E M _ S O U R C E S }
$ { F A S T M A T H _ S O U R C E S }
$ { P C H _ S O U R C E S }
2020-04-11 21:50:43 +00:00
c o m m o n / u t i l i t y / x 8 6 . c p p
c o m m o n / t h i r d p a r t y / s t r n a t c m p . c
c o m m o n / u t i l i t y / z s t r i n g . c p p
c o m m o n / u t i l i t y / f i n d f i l e . c p p
c o m m o n / t h i r d p a r t y / m a t h / a s i n . c
c o m m o n / t h i r d p a r t y / m a t h / a t a n . c
c o m m o n / t h i r d p a r t y / m a t h / c o n s t . c
c o m m o n / t h i r d p a r t y / m a t h / c o s h . c
c o m m o n / t h i r d p a r t y / m a t h / e x p . c
c o m m o n / t h i r d p a r t y / m a t h / i s n a n . c
c o m m o n / t h i r d p a r t y / m a t h / l o g . c
c o m m o n / t h i r d p a r t y / m a t h / l o g 1 0 . c
c o m m o n / t h i r d p a r t y / m a t h / m t h e r r . c
c o m m o n / t h i r d p a r t y / m a t h / p o l e v l . c
c o m m o n / t h i r d p a r t y / m a t h / p o w . c
c o m m o n / t h i r d p a r t y / m a t h / p o w i . c
c o m m o n / t h i r d p a r t y / m a t h / s i n . c
c o m m o n / t h i r d p a r t y / m a t h / s i n h . c
c o m m o n / t h i r d p a r t y / m a t h / s q r t . c
c o m m o n / t h i r d p a r t y / m a t h / t a n . c
c o m m o n / t h i r d p a r t y / m a t h / t a n h . c
c o m m o n / t h i r d p a r t y / m a t h / f a s t s i n . c p p
2020-04-19 19:53:21 +00:00
z z a u t o z e n d . c p p
2019-09-22 21:15:46 +00:00
)
2019-12-02 01:07:32 +00:00
#set_source_files_properties( ${FASTMATH_SOURCES} PROPERTIES COMPILE_FLAGS ${DEM_FASTMATH_FLAG} )
2019-09-22 21:15:46 +00:00
set_source_files_properties ( xlat/parse_xlat.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c" )
2020-04-11 22:04:02 +00:00
set_source_files_properties ( common/engine/sc_man.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h" )
2019-09-22 21:15:46 +00:00
set_source_files_properties ( ${ NOT_COMPILED_SOURCE_FILES } PROPERTIES HEADER_FILE_ONLY TRUE )
if ( ${ CMAKE_SYSTEM_NAME } STREQUAL "SunOS" )
# [BL] Solaris requires these to be explicitly linked.
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } nsl socket )
2019-09-22 21:15:46 +00:00
endif ( )
if ( UNIX )
find_package ( Backtrace )
if ( Backtrace_FOUND )
2019-12-27 12:37:39 +00:00
set ( PROJECT_LIBRARIES ${ PROJECT_LIBRARIES } ${ Backtrace_LIBRARIES } )
2019-09-22 21:15:46 +00:00
endif ( )
endif ( )
2020-07-14 11:09:34 +00:00
target_link_libraries ( ${ PROJECT_NAME } ${ PROJECT_LIBRARIES } ${ ZMUSIC_LIBRARIES } gdtoa lzma duke blood sw exhumed )
2019-09-22 21:15:46 +00:00
include_directories (
2019-11-02 11:59:59 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R }
2019-09-22 21:15:46 +00:00
b u i l d / i n c l u d e
l i b x m p - l i t e / i n c l u d e
l i b x m p - l i t e / i n c l u d e / l i b x m p - l i t e
l i b s m a c k e r d e c / i n c l u d e
t h i r d p a r t y / i n c l u d e
2019-11-07 19:31:16 +00:00
t h i r d p a r t y / i m g u i
2020-04-11 21:38:30 +00:00
c o r e
c o r e / 2 d
c o r e / f o n t s
c o r e / u t i l i t y
c o r e / c o n s o l e
c o r e / t e x t u r e s
c o r e / m u s i c
c o r e / d o b j e c t
c o r e / m e n u
c o r e / i n p u t
2019-09-25 20:38:47 +00:00
p l a t f o r m
2020-04-12 06:19:19 +00:00
c o m m o n / a u d i o / s o u n d
2020-04-12 06:08:31 +00:00
c o m m o n / a u d i o / m u s i c
2020-05-25 15:11:32 +00:00
c o m m o n / 2 d
2020-04-11 21:50:43 +00:00
c o m m o n / t h i r d p a r t y
2020-04-11 22:04:02 +00:00
c o m m o n / t e x t u r e s
2020-05-23 22:15:38 +00:00
c o m m o n / t e x t u r e s / f o r m a t s
2020-05-24 19:19:33 +00:00
c o m m o n / t e x t u r e s / h i r e s
2020-05-25 21:59:07 +00:00
c o m m o n / t e x t u r e s
2020-05-30 22:01:00 +00:00
c o m m o n / m o d e l s
2020-04-11 21:54:33 +00:00
c o m m o n / f i l e s y s t e m
2020-04-11 21:50:43 +00:00
c o m m o n / u t i l i t y
2020-04-11 22:11:50 +00:00
c o m m o n / c o n s o l e
2020-04-11 22:04:02 +00:00
c o m m o n / e n g i n e
2020-04-23 20:58:02 +00:00
c o m m o n / m e n u
2020-04-05 20:51:53 +00:00
c o m m o n / f o n t s
2020-04-06 19:10:07 +00:00
c o m m o n / o b j e c t s
2020-04-10 20:17:29 +00:00
c o m m o n / r e n d e r i n g
2020-06-11 16:40:53 +00:00
c o m m o n / r e n d e r i n g / h w r e n d e r e r
2020-04-25 22:01:04 +00:00
c o m m o n / r e n d e r i n g / h w r e n d e r e r / d a t a
2020-04-10 20:17:29 +00:00
c o m m o n / r e n d e r i n g / g l _ l o a d
2020-05-28 21:48:50 +00:00
c o m m o n / r e n d e r i n g / g l
2020-05-31 08:53:11 +00:00
c o m m o n / r e n d e r i n g / v u l k a n / t h i r d p a r t y
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / b a c k e n d
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / d r a w e r s
2020-04-06 19:10:07 +00:00
c o m m o n / s c r i p t i n g / v m
c o m m o n / s c r i p t i n g / j i t
2020-04-07 16:04:35 +00:00
c o m m o n / s c r i p t i n g / c o r e
2020-04-07 18:14:24 +00:00
c o m m o n / s c r i p t i n g / i n t e r f a c e
2020-04-07 22:19:49 +00:00
c o m m o n / s c r i p t i n g / f r o n t e n d
2020-04-07 18:14:24 +00:00
c o m m o n / s c r i p t i n g / b a c k e n d
2020-05-31 08:53:11 +00:00
. . / l i b r a r i e s / g l s l a n g / g l s l a n g / P u b l i c
. . / l i b r a r i e s / g l s l a n g / s p i r v
2019-09-22 21:15:46 +00:00
$ { C M A K E _ B I N A R Y _ D I R } / l i b r a r i e s / g d t o a
2020-01-07 00:11:19 +00:00
$ { S Y S T E M _ S O U R C E S _ D I R }
2019-09-22 21:15:46 +00:00
)
2020-01-07 00:11:19 +00:00
if ( NOT WIN32 )
include_directories ( platform/posix )
endif ( )
2019-12-27 12:52:15 +00:00
add_dependencies ( ${ PROJECT_NAME } revision_check )
2019-09-22 21:15:46 +00:00
# Due to some quirks, we need to do this in this order
2019-12-27 12:37:39 +00:00
if ( NOT COMPILE_OUTPUT_OLDSTYLE )
2019-09-22 21:15:46 +00:00
# RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4.
# Linux distributions are slow to adopt 2.6. :(
2019-12-27 12:52:15 +00:00
set_target_properties ( ${ PROJECT_NAME } PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ COMPILE_OUTPUT_DIECTRORY } )
set_target_properties ( ${ PROJECT_NAME } PROPERTIES OUTPUT_NAME ${ PROJECT_NAME } )
2019-09-22 21:15:46 +00:00
else ( )
2019-12-27 12:52:15 +00:00
set_target_properties ( ${ PROJECT_NAME } PROPERTIES
R U N T I M E _ O U T P U T _ N A M E $ { P R O J E C T _ N A M E }
2019-12-27 12:37:39 +00:00
R U N T I M E _ O U T P U T _ D I R E C T O R Y _ R E L E A S E $ { C O M P I L E _ O U T P U T _ D I E C T R O R Y }
2019-12-27 12:52:15 +00:00
R U N T I M E _ O U T P U T _ N A M E _ D E B U G $ { P R O J E C T _ N A M E } d
2019-12-27 12:37:39 +00:00
R U N T I M E _ O U T P U T _ D I R E C T O R Y _ D E B U G $ { C O M P I L E _ O U T P U T _ D I E C T R O R Y }
2019-12-27 12:52:15 +00:00
R U N T I M E _ O U T P U T _ N A M E _ M I N S I Z E R E L $ { P R O J E C T _ N A M E } m s r
2019-12-27 12:37:39 +00:00
R U N T I M E _ O U T P U T _ D I R E C T O R Y _ M I N S I Z E R E L $ { C O M P I L E _ O U T P U T _ D I E C T R O R Y }
2019-12-27 12:52:15 +00:00
R U N T I M E _ O U T P U T _ N A M E _ R E L W I T H D E B I N F O $ { P R O J E C T _ N A M E } r d
2019-12-27 12:37:39 +00:00
R U N T I M E _ O U T P U T _ D I R E C T O R Y _ R E L W I T H D E B I N F O $ { C O M P I L E _ O U T P U T _ D I E C T R O R Y }
2019-09-22 21:15:46 +00:00
)
endif ( )
if ( MSVC )
2019-12-27 12:37:39 +00:00
option ( COMPILE_GENERATE_MAPFILE "Generate .map file for debugging." OFF )
2019-09-22 21:15:46 +00:00
set ( LINKERSTUFF "/MANIFEST:NO" )
2019-12-27 12:37:39 +00:00
if ( COMPILE_GENERATE_MAPFILE )
2019-09-22 21:15:46 +00:00
set ( LINKERSTUFF "${LINKERSTUFF} /MAP" )
endif ( )
2019-12-27 12:52:15 +00:00
set_target_properties ( ${ PROJECT_NAME } PROPERTIES LINK_FLAGS ${ LINKERSTUFF } )
2019-09-22 21:15:46 +00:00
2019-12-27 12:52:15 +00:00
add_custom_command ( TARGET ${ PROJECT_NAME } POST_BUILD
2020-04-23 20:58:02 +00:00
C O M M A N D " m t . e x e " - m a n i f e s t \ " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } \ \ c o m m o n \ \ p l a t f o r m \ \ w i n 3 2 \ \ m a n i f e s t . x m l \ " - o u t p u t r e s o u r c e : \ " $ < T A R G E T _ F I L E : $ { P R O J E C T _ N A M E } > \ " \ ; \ #1
2019-09-22 21:15:46 +00:00
C O M M E N T " A d d i n g m a n i f e s t . . . "
)
endif ( )
if ( NOT WIN32 AND NOT APPLE )
2019-12-27 12:52:15 +00:00
FILE ( WRITE ${ CMAKE_CURRENT_BINARY_DIR } /link-make "if [ ! -e ${COMPILE_OUTPUT_DIECTRORY}/${PROJECT_NAME} ]; then ln -sf ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME} ${COMPILE_OUTPUT_DIECTRORY}/${PROJECT_NAME}; fi" )
add_custom_command ( TARGET ${ PROJECT_NAME } POST_BUILD
2019-09-22 21:15:46 +00:00
C O M M A N D c h m o d + x $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / l i n k - m a k e
C O M M A N D / b i n / s h - c $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / l i n k - m a k e )
endif ( )
2020-02-07 20:36:37 +00:00
add_custom_command ( TARGET ${ PROJECT_NAME } POST_BUILD
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ i f _ d i f f e r e n t
$ { C M A K E _ S O U R C E _ D I R } / s o u n d f o n t / $ { P R O J E C T _ N A M E } . s f 2 $ < T A R G E T _ F I L E _ D I R : $ { P R O J E C T _ N A M E } > / s o u n d f o n t s / $ { P R O J E C T _ N A M E } . s f 2
)
2019-09-22 21:15:46 +00:00
if ( CMAKE_COMPILER_IS_GNUCXX )
# GCC misoptimizes this file
endif ( )
2020-05-31 08:53:11 +00:00
if ( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
# Need to enable intrinsics for these files.
if ( SSE_MATTERS )
set_property ( SOURCE
c o m m o n / r e n d e r i n g / p o l y r e n d e r e r / p o l y _ a l l . c p p
r e n d e r i n g / s w r e n d e r e r / r _ a l l . c p p
u t i l i t y / p a l e t t e . c p p
u t i l i t y / x 8 6 . c p p
A P P E N D _ S T R I N G P R O P E R T Y C O M P I L E _ F L A G S " - m s s e 2 - m m m x " )
endif ( )
endif ( )
2019-09-22 21:15:46 +00:00
if ( APPLE )
set ( LINK_FRAMEWORKS "-framework Cocoa -framework IOKit -framework OpenGL" )
if ( HAVE_VULKAN )
set ( LINK_FRAMEWORKS "${LINK_FRAMEWORKS} -framework QuartzCore" )
endif ( )
2019-12-27 12:52:15 +00:00
set_target_properties ( ${ PROJECT_NAME } PROPERTIES
2019-09-22 21:15:46 +00:00
L I N K _ F L A G S " $ { L I N K _ F R A M E W O R K S } "
2020-01-26 14:38:13 +00:00
M A C O S X _ B U N D L E _ I N F O _ P L I S T " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / p l a t f o r m / p o s i x / o s x / $ { P R O J E C T _ N A M E } - i n f o . p l i s t "
X C O D E _ A T T R I B U T E _ C O D E _ S I G N _ I D E N T I T Y " " )
2019-09-22 21:15:46 +00:00
# Dymanic libraries like libvulkan.dylib or libMoltenVK.dylib will be loaded by dlopen()
# if placed in the directory with the main executable
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rpath @executable_path" )
endif ( )
if ( WIN32 )
2019-12-26 16:42:45 +00:00
set ( INSTALL_PATH . CACHE STRING "Directory where the executable will be placed during install." )
2019-09-22 21:15:46 +00:00
else ( )
2019-12-26 16:42:45 +00:00
set ( INSTALL_PATH bin CACHE STRING "Directory where the executable will be placed during install." )
2019-09-22 21:15:46 +00:00
endif ( )
2019-12-27 12:52:15 +00:00
install ( TARGETS ${ PROJECT_NAME }
2019-09-22 21:15:46 +00:00
D E S T I N A T I O N $ { I N S T A L L _ P A T H }
C O M P O N E N T " G a m e e x e c u t a b l e " )
2020-04-11 21:38:30 +00:00
source_group ( "Utility" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/core/utility/.+" )
source_group ( "Core" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/core/.+" )
source_group ( "Core\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/core/textures/.+" )
source_group ( "Core\\Textures\\Formats" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/core/textures/formats/.+" )
source_group ( "Core\\Utility" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/core/utility/.+" )
source_group ( "Core\\2D" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/core/2d/.+" )
source_group ( "Core\\Console" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/core/console/.+" )
source_group ( "Core\\DObject" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/core/dobject/.+" )
source_group ( "Core\\Menu" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/core/menu/.+" )
2019-12-26 16:42:45 +00:00
source_group ( "Platform" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/platform/.+" )
source_group ( "Platform\\Win32" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/platform/win32/.+" )
2020-01-26 14:40:43 +00:00
source_group ( "Platform\\POSIX" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/platform/posix/.+" )
2020-04-11 21:50:43 +00:00
source_group ( "Common" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/.+" )
2020-04-12 06:08:31 +00:00
source_group ( "Common\\Audio" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/audio/.+" )
2020-04-12 06:19:19 +00:00
source_group ( "Common\\Audio\\Sound" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/audio/sound/.+" )
source_group ( "Common\\Audio\\Sound\\Third-party" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/audio/sound/thirdparty/.+" )
2020-04-12 06:08:31 +00:00
source_group ( "Common\\Audio\\Music" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/audio/music.+" )
2020-04-11 22:11:50 +00:00
source_group ( "Common\\Console" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/console/.+" )
source_group ( "Common\\Utility" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/utility/.+" )
source_group ( "Common\\Engine" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/engine/.+" )
2020-05-25 15:11:32 +00:00
source_group ( "Common\\2D" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/2d/.+" )
2020-04-06 14:10:54 +00:00
source_group ( "Common\\Objects" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/objects/.+" )
2020-04-23 20:58:02 +00:00
source_group ( "Common\\Menu" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/menu/.+" )
2020-04-06 14:10:54 +00:00
source_group ( "Common\\Fonts" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/fonts/.+" )
2020-04-11 22:11:50 +00:00
source_group ( "Common\\File System" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/filesystem/.+" )
2020-04-06 19:10:07 +00:00
source_group ( "Common\\Scripting" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/.+" )
2020-04-07 18:14:24 +00:00
source_group ( "Common\\Scripting\\Interface" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/interface/.+" )
2020-04-07 22:19:49 +00:00
source_group ( "Common\\Scripting\\Frontend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/frontend/.+" FILES ${ CMAKE_CURRENT_BINARY_DIR } /zcc-parse.c ${ CMAKE_CURRENT_BINARY_DIR } /zcc-parse.h )
2020-04-07 18:14:24 +00:00
source_group ( "Common\\Scripting\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/backend/.+" )
2020-04-06 19:10:07 +00:00
source_group ( "Common\\Scripting\\Core" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/core/.+" )
source_group ( "Common\\Scripting\\JIT" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/jit/.+" )
2020-04-07 16:04:35 +00:00
source_group ( "Common\\Scripting\\VM" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/vm/.+" )
2020-04-23 20:58:02 +00:00
source_group ( "Common\\Platforms\\Cocoa Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/platform/posix/cocoa/.+" )
source_group ( "Common\\Platforms\\OS X Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/platform/posix/osx/.+" )
source_group ( "Common\\Platforms\\Unix Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/platform/posix/unix/.+" )
source_group ( "Common\\Platforms\\SDL Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/platform/posix/sdl/.+" )
source_group ( "Common\\Platforms\\Win32 Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/platform/win32/.+" )
2020-05-31 08:53:11 +00:00
source_group ( "Common\\Rendering" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/.+" )
source_group ( "Common\\Rendering\\Hardware Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/hwrenderer/.+" )
source_group ( "Common\\Rendering\\Hardware Renderer\\Data" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/hwrenderer/data/.+" )
source_group ( "Common\\Rendering\\Hardware Renderer\\Postprocessing" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/hwrenderer/postprocessing/.+" )
source_group ( "Common\\Rendering\\OpenGL Loader" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/gl_load/.+" )
source_group ( "Common\\Rendering\\OpenGL Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/gl/.+" )
source_group ( "Common\\Rendering\\Vulkan Renderer\\System" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/system/.+" )
source_group ( "Common\\Rendering\\Vulkan Renderer\\Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/renderer/.+" )
source_group ( "Common\\Rendering\\Vulkan Renderer\\Shaders" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/shaders/.+" )
source_group ( "Common\\Rendering\\Vulkan Renderer\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/textures/.+" )
source_group ( "Common\\Rendering\\Vulkan Renderer\\Third Party" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/thirdparty/.+" )
source_group ( "Common\\Rendering\\Vulkan Renderer\\Third Party\\Volk" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/thirdparty/volk/.+" )
source_group ( "Common\\Rendering\\Vulkan Renderer\\Third Party\\Vk_Mem_Alloc" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/thirdparty/vk_mem_alloc.+" )
source_group ( "Common\\Rendering\\Poly Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/polyrenderer/.+" )
source_group ( "Common\\Rendering\\Poly Renderer\\Drawers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/polyrenderer/drawers/.+" )
source_group ( "Common\\Rendering\\Poly Renderer\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/polyrenderer/backend/.+" )
2020-05-30 22:01:00 +00:00
source_group ( "Common\\Models" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/models/.+" )
2020-04-07 16:04:35 +00:00
source_group ( "Common\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/.+" )
2020-05-24 19:19:33 +00:00
source_group ( "Common\\Textures\\Hires" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/hires/.+" )
source_group ( "Common\\Textures\\Hires\\HQ Resize" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/hires/hqnx/.+" )
source_group ( "Common\\Textures\\Hires\\HQ Resize MMX version" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/hires/hqnx_asm/.+" )
source_group ( "Common\\Textures\\Hires\\XBRZ" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/hires/xbr/.+" )
source_group ( "Common\\Textures\\Formats" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/formats/.+" )
2020-04-11 21:50:43 +00:00
source_group ( "Common\\Third Party" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/thirdparty/.+" )
source_group ( "Common\\Third Party\\Math" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/thirdparty/math/.+" )
source_group ( "Common\\Third Party\\RapidJSON" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/thirdparty/rapidjson/.+" )
source_group ( "Common\\Third Party\\SFMT" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/thirdparty/sfmt/.+" )
2019-09-22 21:15:46 +00:00
source_group ( "Utility\\Smackerdec" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/smackerdec/.+" )
source_group ( "Utility\\Smackerdec\\Headers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/libsmackerdec/include/.+" )
source_group ( "Utility\\Smackerdec\\Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/libsmackerdec/src/.+" )
source_group ( "Utility\\Third Party" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/.+" )
source_group ( "Utility\\Third Party Headers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/include/.+" )
source_group ( "Utility\\Third Party Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/src/.+" )
2020-02-22 17:41:24 +00:00
source_group ( "Utility\\RapidJSON" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/utility/rapidjson/.+" )
2019-09-22 21:15:46 +00:00
source_group ( "Build Engine" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/build/.+" )
source_group ( "Build Engine\\Headers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/build/include/.+" )
source_group ( "Build Engine\\Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/build/src/.+" )
2020-01-27 11:45:19 +00:00
macro ( add_game_library )
file ( GLOB HEADER_FILES src/*.h )
if ( NOT_COMPILED_SOURCE_FILES )
set_source_files_properties ( ${ NOT_COMPILED_SOURCE_FILES } PROPERTIES HEADER_FILE_ONLY TRUE )
endif ( )
use_precompiled_header ( ".." )
add_library ( ${ ARGV0 } STATIC
$ { P C H _ S O U R C E S }
$ { H E A D E R _ F I L E S }
$ { N O T _ C O M P I L E D _ S O U R C E _ F I L E S }
)
endmacro ( )
2020-06-11 07:35:03 +00:00
macro ( add_game_library2 )
file ( GLOB HEADER_FILES src/*.h )
if ( NOT_COMPILED_SOURCE_FILES )
set_source_files_properties ( ${ NOT_COMPILED_SOURCE_FILES } PROPERTIES HEADER_FILE_ONLY TRUE )
endif ( )
use_precompiled_header ( "../.." )
add_library ( ${ ARGV0 } STATIC
$ { P C H _ S O U R C E S }
$ { H E A D E R _ F I L E S }
$ { N O T _ C O M P I L E D _ S O U R C E _ F I L E S }
)
endmacro ( )
2020-01-27 11:45:19 +00:00
require_stricmp ( )
require_strnicmp ( )
unset ( PCH_SOURCES )
unset ( HEADER_FILES )
unset ( NOT_COMPILED_SOURCE_FILES )
2020-06-11 07:31:58 +00:00
add_subdirectory ( games/duke )
2020-01-27 11:45:19 +00:00
add_subdirectory ( blood )
add_subdirectory ( sw )
add_subdirectory ( exhumed )