2020-12-08 09:02:54 +00:00
cmake_minimum_required ( VERSION 2.8.12...3.19.1 )
if ( CMAKE_VERSION VERSION_LESS 3.12 )
cmake_policy ( VERSION ${ CMAKE_VERSION } )
endif ( )
2017-08-01 19:55:49 +00:00
2020-04-13 08:46:30 +00:00
set ( CMAKE_OSX_DEPLOYMENT_TARGET 10.9 CACHE INTERNAL "" )
if ( CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 )
message ( WARNING "Building for macOS <= 10.9 is not supported" )
endif ( )
2017-08-01 19:55:49 +00:00
file ( STRINGS src/game/version.h VERSION_LINE
L I M I T _ C O U N T 1
2019-03-06 20:02:06 +00:00
R E G E X " ^ #define GAME_RELEASE_VERSION "
2017-08-01 19:55:49 +00:00
)
if ( VERSION_LINE MATCHES "\" ( [0-9]+ ) \\.([0-9]+)\\.([0-9]+)\"")
set ( VERSION_MAJOR ${ CMAKE_MATCH_1 } )
set ( VERSION_MINOR ${ CMAKE_MATCH_2 } )
set ( VERSION_PATCH ${ CMAKE_MATCH_3 } )
2018-01-14 14:04:18 +00:00
elseif ( VERSION_LINE MATCHES "\" ( [0-9]+ ) \\.([0-9]+)\"")
set ( VERSION_MAJOR ${ CMAKE_MATCH_1 } )
set ( VERSION_MINOR ${ CMAKE_MATCH_2 } )
set ( VERSION_PATCH "0" )
2017-08-01 19:55:49 +00:00
else ( )
message ( FATAL_ERROR "Couldn't parse version from src/game/version.h" )
endif ( )
2020-12-08 09:02:54 +00:00
# Extra support for CMake pre-3.0
if ( NOT POLICY CMP0048 )
2017-08-01 19:55:49 +00:00
set ( PROJECT_VERSION_MAJOR ${ VERSION_MAJOR } )
set ( PROJECT_VERSION_MINOR ${ VERSION_MINOR } )
set ( PROJECT_VERSION_PATCH ${ VERSION_PATCH } )
2018-01-14 14:31:31 +00:00
if ( VERSION_PATCH STREQUAL "0" )
set ( PROJECT_VERSION ${ VERSION_MAJOR } . ${ VERSION_MINOR } )
else ( )
set ( PROJECT_VERSION ${ VERSION_MAJOR } . ${ VERSION_MINOR } . ${ VERSION_PATCH } )
endif ( )
2017-08-01 19:55:49 +00:00
endif ( )
2020-12-08 09:02:54 +00:00
if ( VERSION_PATCH STREQUAL "0" )
project ( DDNet VERSION ${ VERSION_MAJOR } . ${ VERSION_MINOR } )
else ( )
project ( DDNet VERSION ${ VERSION_MAJOR } . ${ VERSION_MINOR } . ${ VERSION_PATCH } )
endif ( )
2017-02-23 13:16:32 +00:00
2018-02-12 22:14:14 +00:00
set ( ORIGINAL_CMAKE_MODULE_PATH ${ CMAKE_MODULE_PATH } )
set ( ORIGINAL_CMAKE_REQUIRED_INCLUDES ${ CMAKE_REQUIRED_INCLUDES } )
set ( ORIGINAL_CMAKE_REQUIRED_LIBRARIES ${ CMAKE_REQUIRED_LIBRARIES } )
set ( OWN_CMAKE_MODULE_PATH ${ CMAKE_MODULE_PATH } ${ PROJECT_SOURCE_DIR } /cmake )
set ( CMAKE_MODULE_PATH ${ OWN_CMAKE_MODULE_PATH } )
2017-02-23 13:16:32 +00:00
2019-12-30 09:55:45 +00:00
if ( CMAKE_SIZEOF_VOID_P EQUAL 4 )
2017-07-31 16:30:24 +00:00
set ( TARGET_BITS "32" )
2019-12-30 09:55:45 +00:00
else ( )
set ( TARGET_BITS "64" )
2017-07-31 16:30:24 +00:00
endif ( )
if ( CMAKE_SYSTEM_NAME STREQUAL "Windows" )
set ( TARGET_OS "windows" )
elseif ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
set ( TARGET_OS "linux" )
elseif ( CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
set ( TARGET_OS "mac" )
endif ( )
2018-01-22 18:10:57 +00:00
include ( CheckCCompilerFlag )
2018-01-22 18:32:30 +00:00
include ( CheckCXXCompilerFlag )
2018-01-22 18:10:57 +00:00
include ( CheckSymbolExists )
check_symbol_exists ( __i386 "" TARGET_ARCH_X86_i386 )
if ( TARGET_ARCH_X86_i386 )
set ( TARGET_ARCH x86 )
else ( )
set ( TARGET_ARCH )
endif ( )
2017-10-15 08:25:26 +00:00
set ( AUTO_DEPENDENCIES_DEFAULT OFF )
2017-07-31 16:30:24 +00:00
if ( TARGET_OS STREQUAL "windows" )
2017-10-15 08:25:26 +00:00
set ( AUTO_DEPENDENCIES_DEFAULT ON )
2018-09-20 12:06:18 +00:00
elseif ( TARGET_OS STREQUAL "linux" )
2017-07-31 16:30:24 +00:00
endif ( )
2017-02-23 15:29:13 +00:00
option ( WEBSOCKETS "Enable websockets support" OFF )
2017-03-01 12:40:11 +00:00
option ( MYSQL "Enable mysql support" OFF )
2020-09-17 19:11:28 +00:00
option ( AUTOUPDATE "Enable the autoupdater" OFF )
2020-09-23 20:42:54 +00:00
option ( INFORM_UPDATE "Inform about available updates" ON )
2020-01-01 15:56:48 +00:00
option ( VIDEORECORDER "Enable video recording support via FFmpeg" OFF )
2020-04-14 10:11:50 +00:00
option ( UPNP "Enable UPnP support" OFF )
2020-03-11 00:58:50 +00:00
option ( ANTIBOT "Enable support for a dynamic anticheat library" OFF )
2017-02-23 14:41:42 +00:00
option ( CLIENT "Compile client" ON )
2017-10-15 08:25:26 +00:00
option ( DOWNLOAD_GTEST "Download and compile GTest" ${ AUTO_DEPENDENCIES_DEFAULT } )
2020-08-31 10:25:53 +00:00
option ( STEAM "Build the Steam release version" OFF )
2017-10-15 08:25:26 +00:00
option ( PREFER_BUNDLED_LIBS "Prefer bundled libraries over system libraries" ${ AUTO_DEPENDENCIES_DEFAULT } )
2018-08-26 19:44:31 +00:00
option ( DEV "Don't generate stuff necessary for packaging" OFF )
2020-10-17 16:50:26 +00:00
# Set version if not explicitly set
if ( NOT VERSION )
set ( VERSION ${ PROJECT_VERSION } )
endif ( )
2017-02-23 14:41:42 +00:00
2019-05-11 10:00:21 +00:00
set ( OpenGL_GL_PREFERENCE LEGACY )
2017-02-23 14:41:42 +00:00
# Set the default build type to Release
if ( NOT(CMAKE_BUILD_TYPE ) )
2018-09-30 17:01:43 +00:00
if ( NOT(DEV ) )
2018-08-26 19:44:31 +00:00
set ( CMAKE_BUILD_TYPE Release )
else ( )
set ( CMAKE_BUILD_TYPE Debug )
endif ( )
2017-02-23 14:41:42 +00:00
endif ( )
2019-03-19 09:46:28 +00:00
if ( NOT(CMAKE_BUILD_TYPE MATCHES "^(Release|Debug|RelWithDebInfo|MinSizeRel)$" ) )
message ( WARNING "Unknown CMAKE_BUILD_TYPE, should be one of Release, Debug, RelWithDebInfo or MinSizeRel" )
endif ( )
2017-11-23 02:10:25 +00:00
set ( DBG $< OR:$<CONFIG:Debug > , $< CONFIG:RelWithDebInfo > > )
2017-09-21 13:11:09 +00:00
2020-10-17 16:50:26 +00:00
if ( CMAKE_VERSION VERSION_LESS 3.0 )
configure_file ( src/game/version.h vd.h )
else ( )
set_property ( DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
s r c / g a m e / v e r s i o n . h
)
endif ( )
2017-10-15 07:57:21 +00:00
2017-03-01 12:40:11 +00:00
set ( SERVER_EXECUTABLE DDNet-Server CACHE STRING "Name of the built server executable" )
set ( CLIENT_EXECUTABLE DDNet CACHE STRING "Name of the build client executable" )
2018-01-22 18:10:57 +00:00
########################################################################
# Compiler flags
########################################################################
function ( add_c_compiler_flag_if_supported VARIABLE FLAG )
if ( ARGC GREATER 2 )
set ( CHECKED_FLAG "${ARGV2}" )
else ( )
set ( CHECKED_FLAG "${FLAG}" )
endif ( )
string ( REGEX REPLACE "[^A-Za-z0-9]" "_" CONFIG_VARIABLE "FLAG_SUPPORTED${CHECKED_FLAG}" )
check_c_compiler_flag ( "${CHECKED_FLAG}" ${ CONFIG_VARIABLE } )
if ( ${ CONFIG_VARIABLE } )
if ( ${ VARIABLE } )
set ( "${VARIABLE}" "${${VARIABLE}};${FLAG}" PARENT_SCOPE )
else ( )
set ( "${VARIABLE}" "${FLAG}" PARENT_SCOPE )
endif ( )
endif ( )
endfunction ( )
2019-04-10 20:37:58 +00:00
# Force compiler colors on when using ninja. Ninja filters the colors out when
# it's not printing to a terminal on its own.
if ( CMAKE_GENERATOR STREQUAL "Ninja" )
add_c_compiler_flag_if_supported ( OUR_FLAGS -fdiagnostics-color=always )
add_c_compiler_flag_if_supported ( OUR_FLAGS -fcolor-diagnostics )
endif ( )
2018-01-22 18:10:57 +00:00
if ( NOT MSVC )
if ( CMAKE_VERSION VERSION_LESS 3.1 OR TARGET_OS STREQUAL "mac" )
2018-01-22 18:48:17 +00:00
check_cxx_compiler_flag ( -std=gnu++11 FLAG_SUPPORTED_std_gnu__11 )
if ( FLAG_SUPPORTED_std_gnu__11 )
if ( CMAKE_CXX_FLAGS )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11" )
else ( )
set ( CMAKE_CXX_FLAGS -std=gnu++11 )
endif ( )
endif ( )
2018-01-22 18:10:57 +00:00
endif ( )
# Protect the stack pointer.
# -fstack-protector-all doesn't work on MinGW.
add_c_compiler_flag_if_supported ( OUR_FLAGS -fstack-protector-all )
# Inaccurate floating point numbers cause problems on mingw-w64-gcc when
# compiling for x86, might cause problems elsewhere. So don't store floats
# in registers but keep them at higher accuracy.
if ( TARGET_ARCH STREQUAL "x86" )
add_c_compiler_flag_if_supported ( OUR_FLAGS -ffloat-store )
endif ( )
2020-09-08 12:13:24 +00:00
# Don't insert timestamps into PEs to keep the build reproducible.
if ( TARGET_OS STREQUAL "windows" )
add_c_compiler_flag_if_supported ( OUR_FLAGS_LINK -Wl,--no-insert-timestamp )
endif ( )
2018-01-22 18:10:57 +00:00
if ( TARGET_OS STREQUAL "mac" )
add_c_compiler_flag_if_supported ( OUR_FLAGS -stdlib=libc++ )
endif ( )
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wall )
if ( CMAKE_VERSION VERSION_GREATER 3.3 OR CMAKE_VERSION VERSION_EQUAL 3.3 )
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN
$ < $ < C O M P I L E _ L A N G U A G E : C > : - W d e c l a r a t i o n - a f t e r - s t a t e m e n t >
- W d e c l a r a t i o n - a f t e r - s t a t e m e n t
)
endif ( )
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wextra )
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wno-unused-parameter )
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wno-missing-field-initializers )
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wformat=2 ) # Warn about format strings.
2018-02-12 20:29:43 +00:00
add_c_compiler_flag_if_supported ( OUR_FLAGS_DEP -Wno-implicit-function-declaration )
2020-04-08 09:56:47 +00:00
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wno-nullability-completeness ) # Mac OS build on github
2019-04-09 19:42:24 +00:00
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wduplicated-cond )
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wduplicated-branches )
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wlogical-op )
add_c_compiler_flag_if_supported ( OUR_FLAGS_OWN -Wrestrict )
2019-04-11 10:21:42 +00:00
# TODO: Enable for C++ code except gtest
#add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN "-Wuseless-cast")
2018-01-22 18:10:57 +00:00
endif ( )
2018-02-12 22:14:14 +00:00
if ( NOT MSVC )
check_c_compiler_flag ( "-O2;-Wp,-Werror;-D_FORTIFY_SOURCE=2" DEFINE_FORTIFY_SOURCE ) # Some distributions define _FORTIFY_SOURCE by themselves.
endif ( )
########################################################################
# COMMON FUNCTIONS
########################################################################
2020-01-19 19:32:54 +00:00
function ( set_glob VAR GLOBBING EXTS DIRECTORY ) # ...
set ( GLOBS )
foreach ( ext ${ EXTS } )
list ( APPEND GLOBS "${DIRECTORY}/*.${ext}" )
endforeach ( )
file ( ${ GLOBBING } GLOB_RESULT ${ GLOBS } )
2018-02-12 22:14:14 +00:00
list ( SORT GLOB_RESULT )
set ( FILES )
foreach ( file ${ ARGN } )
list ( APPEND FILES "${PROJECT_SOURCE_DIR}/${DIRECTORY}/${file}" )
endforeach ( )
if ( NOT FILES STREQUAL GLOB_RESULT )
message ( AUTHOR_WARNING "${VAR} does not contain every file from directory ${DIRECTORY}" )
set ( LIST_BUT_NOT_GLOB )
if ( POLICY CMP0057 )
cmake_policy ( SET CMP0057 NEW )
foreach ( file ${ FILES } )
if ( NOT file IN_LIST GLOB_RESULT )
list ( APPEND LIST_BUT_NOT_GLOB ${ file } )
endif ( )
endforeach ( )
if ( LIST_BUT_NOT_GLOB )
message ( AUTHOR_WARNING "Entries only present in ${VAR}: ${LIST_BUT_NOT_GLOB}" )
endif ( )
set ( GLOB_BUT_NOT_LIST )
foreach ( file ${ GLOB_RESULT } )
if ( NOT file IN_LIST FILES )
list ( APPEND GLOB_BUT_NOT_LIST ${ file } )
endif ( )
endforeach ( )
if ( GLOB_BUT_NOT_LIST )
message ( AUTHOR_WARNING "Entries only present in ${DIRECTORY}: ${GLOB_BUT_NOT_LIST}" )
endif ( )
2019-03-07 11:23:54 +00:00
if ( NOT LIST_BUT_NOT_GLOB AND NOT GLOB_BUT_NOT_LIST )
message ( AUTHOR_WARNING "${VAR} is not alphabetically sorted" )
endif ( )
2018-02-12 22:14:14 +00:00
endif ( )
endif ( )
set ( ${ VAR } ${ FILES } PARENT_SCOPE )
endfunction ( )
2020-01-19 19:32:54 +00:00
function ( set_src VAR GLOBBING DIRECTORY ) # ...
set_glob ( ${ VAR } ${ GLOBBING } "c;cpp;h" ${ DIRECTORY } ${ ARGN } )
set ( ${ VAR } ${ ${VAR } } PARENT_SCOPE )
endfunction ( )
2020-08-20 10:17:44 +00:00
function ( set_own_rpath TARGET )
if ( NOT TARGET_OS STREQUAL "windows" AND NOT TARGET_OS STREQUAL "mac" )
if ( CMAKE_VERSION VERSION_GREATER 3.14 OR CMAKE_VERSION VERSION_EQUAL 3.14 )
set_property ( TARGET ${ TARGET } PROPERTY BUILD_RPATH_USE_ORIGIN TRUE )
elseif ( CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8 )
set_property ( TARGET ${ TARGET } PROPERTY BUILD_RPATH "$ORIGIN" )
endif ( )
set_property ( TARGET ${ TARGET } PROPERTY INSTALL_RPATH "$ORIGIN/../lib/ddnet" )
endif ( )
endfunction ( )
if ( NOT TARGET_OS STREQUAL "windows" AND NOT TARGET_OS STREQUAL "mac" AND CMAKE_VERSION VERSION_LESS 3.8 )
2020-08-31 10:25:53 +00:00
if ( ( CLIENT AND STEAM ) OR ANTIBOT )
2020-08-20 10:17:44 +00:00
message ( STATUS "Can't set BUILD_RPATH in CMake before 3.8, pass -Wl,-rpath,'$ORIGIN' manually if you wish to emulate this. Or just install a newer version of CMake..." )
endif ( )
endif ( )
2018-02-12 22:14:14 +00:00
########################################################################
2018-07-10 09:29:02 +00:00
# INITIALIZE TARGET LISTS
2018-02-12 22:14:14 +00:00
########################################################################
set ( TARGETS_OWN )
set ( TARGETS_DEP )
set ( TARGETS_LINK ) # Targets with a linking stage.
2017-02-23 14:41:42 +00:00
########################################################################
# DEPENDENCIES
########################################################################
2017-02-23 13:16:32 +00:00
2017-10-24 10:10:46 +00:00
function ( set_extra_dirs_lib VARIABLE NAME )
2017-07-31 16:30:24 +00:00
set ( "PATHS_${VARIABLE}_LIBDIR" PARENT_SCOPE )
set ( "HINTS_${VARIABLE}_LIBDIR" PARENT_SCOPE )
if ( PREFER_BUNDLED_LIBS )
set ( TYPE HINTS )
else ( )
set ( TYPE PATHS )
endif ( )
2017-02-28 23:51:22 +00:00
if ( TARGET_BITS AND TARGET_OS )
2017-07-31 16:30:24 +00:00
set ( DIR "ddnet-libs/${NAME}/${TARGET_OS}/lib${TARGET_BITS}" )
set ( "${TYPE}_${VARIABLE}_LIBDIR" "${DIR}" PARENT_SCOPE )
set ( "EXTRA_${VARIABLE}_LIBDIR" "${DIR}" PARENT_SCOPE )
2017-02-28 23:51:22 +00:00
endif ( )
endfunction ( )
2017-10-24 10:10:46 +00:00
function ( set_extra_dirs_include VARIABLE NAME LIBRARY )
set ( "PATHS_${VARIABLE}_INCLUDEDIR" PARENT_SCOPE )
set ( "HINTS_${VARIABLE}_INCLUDEDIR" PARENT_SCOPE )
2017-10-24 13:29:53 +00:00
is_bundled ( IS_BUNDLED "${LIBRARY}" )
if ( IS_BUNDLED )
2017-10-25 14:57:25 +00:00
set ( "HINTS_${VARIABLE}_INCLUDEDIR" "ddnet-libs/${NAME}/include" "ddnet-libs/${NAME}/include/${TARGET_OS}" PARENT_SCOPE )
2017-10-24 13:29:53 +00:00
endif ( )
endfunction ( )
2017-10-25 14:57:25 +00:00
if ( CMAKE_CROSSCOMPILING )
set ( CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH NO_CMAKE_SYSTEM_PATH )
else ( )
set ( CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH )
endif ( )
2017-10-24 13:29:53 +00:00
function ( is_bundled VARIABLE PATH )
if ( PATH )
string ( FIND "${PATH}" "${PROJECT_SOURCE_DIR}" LOCAL_PATH_POS )
if ( LOCAL_PATH_POS EQUAL 0 AND TARGET_BITS AND TARGET_OS )
set ( "${VARIABLE}" ON PARENT_SCOPE )
else ( )
set ( "${VARIABLE}" OFF PARENT_SCOPE )
2017-10-24 10:10:46 +00:00
endif ( )
2017-10-24 13:29:53 +00:00
else ( )
set ( "${VARIABLE}" OFF PARENT_SCOPE )
2017-10-24 10:10:46 +00:00
endif ( )
endfunction ( )
2017-10-25 14:57:25 +00:00
if ( NOT CMAKE_CROSSCOMPILING )
# Check for PkgConfig once so all the other `find_package` calls can do it
# quietly.
find_package ( PkgConfig )
endif ( )
2018-02-12 22:14:14 +00:00
find_package ( ZLIB )
2018-06-27 08:02:29 +00:00
find_package ( Crypto )
2017-02-23 13:16:32 +00:00
find_package ( Curl )
2020-07-09 19:10:54 +00:00
if ( VIDEORECORDER )
find_package ( FFMPEG )
endif ( )
2020-04-06 10:23:22 +00:00
find_package ( Freetype )
2017-11-27 01:14:05 +00:00
if ( DOWNLOAD_GTEST )
find_package ( Git )
endif ( )
2018-02-12 22:14:14 +00:00
find_package ( GLEW )
2017-08-30 19:57:55 +00:00
find_package ( GTest )
2020-07-09 19:10:54 +00:00
if ( UPNP )
find_package ( Miniupnpc )
endif ( )
2017-02-23 14:41:42 +00:00
if ( MYSQL )
find_package ( MySQL )
2017-03-02 10:46:00 +00:00
else ( )
set ( MYSQL_LIBRARIES )
2017-02-23 14:41:42 +00:00
endif ( )
2017-02-28 23:51:22 +00:00
find_package ( Ogg )
find_package ( Opus )
2017-02-23 13:16:32 +00:00
find_package ( Opusfile )
2018-02-12 22:14:14 +00:00
find_package ( Pnglite )
2020-06-16 16:33:57 +00:00
find_package ( PythonInterp 3 )
2017-02-23 13:16:32 +00:00
find_package ( SDL2 )
2020-07-07 17:29:44 +00:00
find_package ( SQLite3 )
2020-12-30 13:50:36 +00:00
if ( UNIX )
# Use -pthread instead of -lpthread to draw dependencies other than libpthread
set ( THREADS_PREFER_PTHREAD_FLAG TRUE )
endif ( )
2017-02-23 13:16:32 +00:00
find_package ( Threads )
2018-02-12 22:14:14 +00:00
find_package ( Wavpack )
2018-02-14 11:55:04 +00:00
if ( WEBSOCKETS )
find_package ( Websockets )
else ( )
set ( WEBSOCKETS_LIBRARIES )
set ( WEBSOCKETS_INCLUDE_DIRS )
endif ( )
2017-02-23 13:16:32 +00:00
2017-11-08 23:16:52 +00:00
if ( TARGET_OS AND TARGET_OS STREQUAL "mac" )
2020-04-15 15:31:33 +00:00
find_program ( CMAKE_OTOOL otool )
2017-11-08 23:16:52 +00:00
find_program ( DMG dmg )
find_program ( HFSPLUS hfsplus )
find_program ( NEWFS_HFS newfs_hfs )
if ( DMG AND HFSPLUS AND NEWFS_HFS )
set ( DMGTOOLS_FOUND ON )
else ( )
set ( DMGTOOLS_FOUND OFF )
endif ( )
2017-11-09 12:35:59 +00:00
find_program ( HDIUTIL hdiutil )
2020-01-05 16:46:47 +00:00
if ( HDIUTIL )
set ( HDIUTIL_FOUND ON )
else ( )
set ( HDIUTIL_FOUND OFF )
endif ( )
2017-11-08 23:16:52 +00:00
endif ( )
2017-02-23 14:41:42 +00:00
message ( STATUS "******** DDNet ********" )
2020-04-13 08:46:30 +00:00
if ( NOT TARGET_OS STREQUAL "mac" )
message ( STATUS "Target OS: ${TARGET_OS} ${TARGET_BITS}bit" )
else ( )
message ( STATUS "Target OS: ${TARGET_OS} ${TARGET_BITS}bit (SDK: ${CMAKE_OSX_SYSROOT})" )
endif ( )
2017-02-23 14:41:42 +00:00
message ( STATUS "Compiler: ${CMAKE_CXX_COMPILER}" )
2017-07-26 02:30:56 +00:00
message ( STATUS "Build type: ${CMAKE_BUILD_TYPE}" )
2017-02-23 14:41:42 +00:00
2017-02-28 23:51:22 +00:00
message ( STATUS "Dependencies:" )
2018-02-12 22:14:14 +00:00
function ( show_dependency_status OUTPUT_NAME NAME )
if ( ${ NAME } _FOUND )
if ( ${ NAME } _BUNDLED )
message ( STATUS " * ${OUTPUT_NAME} not found (using bundled version)" )
2017-02-28 23:51:22 +00:00
else ( )
2018-02-12 22:14:14 +00:00
message ( STATUS " * ${OUTPUT_NAME} found" )
2017-02-28 23:51:22 +00:00
endif ( )
2017-02-23 14:41:42 +00:00
else ( )
2018-02-12 22:14:14 +00:00
message ( STATUS " * ${OUTPUT_NAME} not found" )
2017-02-23 14:41:42 +00:00
endif ( )
endfunction ( )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "Curl" CURL )
2017-11-08 23:16:52 +00:00
if ( TARGET_OS AND TARGET_OS STREQUAL "mac" )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "Dmg tools" DMGTOOLS )
2017-11-08 23:16:52 +00:00
endif ( )
2020-07-09 19:10:54 +00:00
if ( VIDEORECORDER )
show_dependency_status ( "FFmpeg" FFMPEG )
endif ( )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "Freetype" FREETYPE )
2017-11-27 01:14:05 +00:00
if ( DOWNLOAD_GTEST )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "Git" GIT )
2017-11-27 01:14:05 +00:00
endif ( )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "Glew" GLEW )
show_dependency_status ( "GTest" GTEST )
2017-11-09 12:35:59 +00:00
if ( TARGET_OS AND TARGET_OS STREQUAL "mac" )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "Hdiutil" HDIUTIL )
2017-11-09 12:35:59 +00:00
endif ( )
2020-07-09 19:10:54 +00:00
if ( UPNP )
show_dependency_status ( "Miniupnpc" MINIUPNPC )
endif ( )
2017-02-23 14:41:42 +00:00
if ( MYSQL )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "MySQL" MYSQL )
2017-03-01 12:40:11 +00:00
endif ( )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "Ogg" OGG )
2018-06-05 19:22:40 +00:00
show_dependency_status ( "OpenSSL Crypto" CRYPTO )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "Opus" OPUS )
show_dependency_status ( "Opusfile" OPUSFILE )
show_dependency_status ( "Pnglite" PNGLITE )
2020-06-16 16:33:57 +00:00
show_dependency_status ( "PythonInterp" PYTHONINTERP )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "SDL2" SDL2 )
2020-07-07 17:29:44 +00:00
show_dependency_status ( "SQLite3" SQLite3 )
2018-02-12 22:14:14 +00:00
show_dependency_status ( "Wavpack" WAVPACK )
show_dependency_status ( "Zlib" ZLIB )
2018-02-14 11:55:04 +00:00
if ( WEBSOCKETS )
show_dependency_status ( "Websockets" WEBSOCKETS )
endif ( )
2017-02-23 14:41:42 +00:00
2018-12-12 08:59:42 +00:00
if ( CLIENT AND NOT(CURL_FOUND ) )
message ( SEND_ERROR "You must install Curl to compile DDNet" )
2018-06-19 12:45:53 +00:00
endif ( )
2020-06-16 16:33:57 +00:00
if ( NOT(PYTHONINTERP_FOUND ) )
2017-08-03 16:44:36 +00:00
message ( SEND_ERROR "You must install Python to compile DDNet" )
endif ( )
2020-07-07 17:29:44 +00:00
if ( NOT(SQLite3_FOUND ) )
2020-07-08 19:31:34 +00:00
message ( SEND_ERROR "You must install SQLite3 to compile DDNet" )
2020-07-07 17:29:44 +00:00
endif ( )
2017-08-03 16:44:36 +00:00
2017-02-23 14:41:42 +00:00
if ( MYSQL AND NOT(MYSQL_FOUND ) )
2017-03-01 12:40:11 +00:00
message ( SEND_ERROR "You must install MySQL to compile the DDNet server with MySQL support" )
2017-02-23 14:02:23 +00:00
endif ( )
2018-02-14 11:55:04 +00:00
if ( WEBSOCKETS AND NOT(WEBSOCKETS_FOUND ) )
message ( SEND_ERROR "You must install libwebsockets to compile the DDNet server with websocket support" )
endif ( )
2020-04-14 10:11:50 +00:00
if ( UPNP AND NOT(MINIUPNPC_FOUND ) )
message ( SEND_ERROR "You must install miniupnpc to compile the DDNet server with UPnP support" )
endif ( )
2017-02-23 14:41:42 +00:00
if ( CLIENT AND NOT(FREETYPE_FOUND ) )
2017-02-28 23:51:22 +00:00
message ( SEND_ERROR "You must install Freetype to compile the DDNet client" )
endif ( )
if ( CLIENT AND NOT(OGG_FOUND ) )
message ( SEND_ERROR "You must install Ogg to compile the DDNet client" )
endif ( )
if ( CLIENT AND NOT(OPUS_FOUND ) )
message ( SEND_ERROR "You must install Opus to compile the DDNet client" )
2017-02-23 14:41:42 +00:00
endif ( )
if ( CLIENT AND NOT(OPUSFILE_FOUND ) )
2017-02-28 23:51:22 +00:00
message ( SEND_ERROR "You must install Opusfile to compile the DDNet client" )
2017-02-23 14:41:42 +00:00
endif ( )
if ( CLIENT AND NOT(SDL2_FOUND ) )
2017-02-28 23:51:22 +00:00
message ( SEND_ERROR "You must install SDL2 to compile the DDNet client" )
2017-02-23 14:41:42 +00:00
endif ( )
2017-08-30 19:57:55 +00:00
if ( NOT(GTEST_FOUND ) )
2017-10-15 07:57:21 +00:00
if ( DOWNLOAD_GTEST )
2017-11-27 01:14:05 +00:00
if ( GIT_FOUND )
message ( STATUS "Automatically downloading GTest to be able to run tests" )
else ( )
set ( DOWNLOAD_GTEST OFF )
message ( WARNING "To automatically download GTest, you have to install Git" )
endif ( )
2017-10-15 07:57:21 +00:00
else ( )
message ( STATUS "To run the tests, you have to install GTest" )
endif ( )
2017-08-30 19:57:55 +00:00
endif ( )
2017-02-23 14:41:42 +00:00
2017-03-03 14:04:13 +00:00
if ( TARGET_OS STREQUAL "windows" )
2017-07-26 02:30:56 +00:00
set ( PLATFORM_CLIENT )
2020-04-08 13:55:10 +00:00
set ( PLATFORM_CLIENT_LIBS opengl32 winmm )
2017-03-03 14:04:13 +00:00
set ( PLATFORM_LIBS ws2_32 ) # Windows sockets
2017-07-26 02:30:56 +00:00
elseif ( TARGET_OS STREQUAL "mac" )
find_library ( CARBON Carbon )
find_library ( COCOA Cocoa )
find_library ( OPENGL OpenGL )
2017-09-16 09:39:09 +00:00
find_library ( SECURITY Security )
2017-07-26 02:30:56 +00:00
set ( PLATFORM_CLIENT
2020-04-30 19:30:21 +00:00
s r c / o s x / n o t i f i c a t i o n s . m m
2017-07-26 02:30:56 +00:00
s r c / o s x l a u n c h / c l i e n t . m
)
2018-06-27 10:35:01 +00:00
set ( PLATFORM_CLIENT_LIBS ${ COCOA } ${ OPENGL } )
set ( PLATFORM_LIBS ${ CARBON } ${ SECURITY } )
2017-03-03 14:04:13 +00:00
else ( )
2020-04-14 15:53:53 +00:00
find_package ( Notify )
2019-04-22 16:33:52 +00:00
find_package ( OpenGL )
find_package ( X11 )
2020-04-14 15:53:53 +00:00
set ( PLATFORM_CLIENT_LIBS ${ OPENGL_gl_LIBRARY } ${ X11_X11_LIB } ${ NOTIFY_LIBRARIES } )
set ( PLATFORM_CLIENT_INCLUDE_DIRS ${ OPENGL_INCLUDE_DIR } ${ X11_X11_INCLUDE_PATH } ${ NOTIFY_INCLUDE_DIRS } )
set ( PLATFORM_CLIENT )
2017-03-18 00:20:55 +00:00
if ( TARGET_OS STREQUAL "linux" )
set ( PLATFORM_LIBS rt ) # clock_gettime for glibc < 2.17
else ( )
set ( PLATFORM_LIBS )
endif ( )
2017-03-03 14:04:13 +00:00
endif ( )
2017-10-15 07:57:21 +00:00
########################################################################
# DOWNLOAD GTEST
########################################################################
if ( NOT(GTEST_FOUND ) A N D D O W N L O A D _ G T E S T )
2020-12-08 09:04:29 +00:00
set ( DDNET_GTEST_VERSION release-1.10.0 ) # 703bd9caab50b139428cea1aaff9974ebee5742e
2017-10-15 07:57:21 +00:00
configure_file ( cmake/Download_GTest_CMakeLists.txt.in googletest-download/CMakeLists.txt )
execute_process ( COMMAND ${ CMAKE_COMMAND } -G "${CMAKE_GENERATOR}" .
R E S U L T _ V A R I A B L E r e s u l t
2018-02-12 22:14:14 +00:00
W O R K I N G _ D I R E C T O R Y $ { P R O J E C T _ B I N A R Y _ D I R } / g o o g l e t e s t - d o w n l o a d
2017-10-15 07:57:21 +00:00
)
2017-11-27 01:14:05 +00:00
if ( result )
message ( WARNING "CMake step for googletest failed: ${result}" )
set ( DOWNLOAD_GTEST OFF )
else ( )
execute_process ( COMMAND ${ CMAKE_COMMAND } --build .
R E S U L T _ V A R I A B L E r e s u l t
2018-02-12 22:14:14 +00:00
W O R K I N G _ D I R E C T O R Y $ { P R O J E C T _ B I N A R Y _ D I R } / g o o g l e t e s t - d o w n l o a d
2017-11-27 01:14:05 +00:00
)
if ( result )
message ( WARNING "Build step for googletest failed: ${result}" )
set ( DOWNLOAD_GTEST OFF )
else ( )
2020-12-08 09:04:59 +00:00
file ( GLOB_RECURSE DDNET_GTEST_CMAKELISTS ${ CMAKE_BINARY_DIR } /googletest-src/CMakeLists.txt )
foreach ( file ${ DDNET_GTEST_CMAKELISTS } )
file ( READ ${ file } CONTENTS )
string ( REPLACE "cmake_minimum_required(VERSION 2.6.4)" "cmake_minimum_required(VERSION 2.8.12...3.19.1)" CONTENTS "${CONTENTS}" )
string ( REPLACE "cmake_minimum_required(VERSION 2.6.4)" "cmake_minimum_required(VERSION 2.8.12...3.19.1)" CONTENTS "${CONTENTS}" )
string ( REPLACE "cmake_minimum_required(VERSION 2.8.8)" "cmake_minimum_required(VERSION 2.8.12...3.19.1)" CONTENTS "${CONTENTS}" )
file ( WRITE ${ file } "${CONTENTS}" )
endforeach ( )
2017-11-27 01:14:05 +00:00
# Prevent overriding the parent project's compiler/linker settings on Windows
set ( gtest_force_shared_crt ON CACHE BOOL "" FORCE )
# Add googletest directly to our build. This defines the gtest target.
add_subdirectory (
2018-02-12 22:14:14 +00:00
$ { P R O J E C T _ B I N A R Y _ D I R } / g o o g l e t e s t - s r c
$ { P R O J E C T _ B I N A R Y _ D I R } / g o o g l e t e s t - b u i l d
2017-11-27 01:14:05 +00:00
E X C L U D E _ F R O M _ A L L
)
if ( MSVC )
foreach ( target gtest )
2018-01-05 14:59:06 +00:00
# `/w` disables all warnings. This is needed because `gtest` enables
# `/WX` (equivalent of `-Werror`) for some reason, breaking builds
# when MSVS adds new warnings.
target_compile_options ( ${ target } PRIVATE $< $<NOT:${DBG} > :/MT> $< ${DBG}:/MTd > /w )
2017-11-27 01:14:05 +00:00
endforeach ( )
endif ( )
set ( GTEST_LIBRARIES gtest )
set ( GTEST_INCLUDE_DIRS )
if ( CMAKE_VERSION VERSION_LESS 2.8.11 )
set ( GTEST_INCLUDE_DIRS "${gtest_SOURCE_DIR}/include" )
endif ( )
endif ( )
2017-10-15 07:57:21 +00:00
endif ( )
endif ( )
2017-03-07 15:47:27 +00:00
2017-03-03 14:04:13 +00:00
########################################################################
# DEPENDENCY COMPILATION
########################################################################
2017-02-23 14:41:42 +00:00
2020-01-19 19:32:54 +00:00
set_src ( DEP_JSON_SRC GLOB src/engine/external/json-parser json.c json.h )
2018-07-11 18:17:21 +00:00
add_library ( json EXCLUDE_FROM_ALL OBJECT ${ DEP_JSON_SRC } )
2017-03-03 14:04:13 +00:00
2020-01-19 19:32:54 +00:00
set_src ( DEP_MD5_SRC GLOB src/engine/external/md5 md5.c md5.h )
2018-07-11 18:17:21 +00:00
add_library ( md5 EXCLUDE_FROM_ALL OBJECT ${ DEP_MD5_SRC } )
list ( APPEND TARGETS_DEP json md5 )
set ( DEP_JSON $< TARGET_OBJECTS:json > )
2019-04-06 00:46:56 +00:00
set ( DEP_MD5 )
if ( NOT CRYPTO_FOUND )
set ( DEP_MD5 $< TARGET_OBJECTS:md5 > )
endif ( )
2017-03-02 11:31:20 +00:00
2020-06-23 08:29:32 +00:00
########################################################################
# DATA
########################################################################
set ( EXPECTED_DATA
a r r o w . p n g
2020-10-07 03:11:38 +00:00
a s s e t s / e n t i t i e s / c o m f o r t / d d n e t . p n g
a s s e t s / e n t i t i e s / l i c e n s e . t x t
2020-09-25 07:58:16 +00:00
a s s e t s / g a m e / g a m e _ 0 6 . p n g
2020-06-23 08:29:32 +00:00
a u d i o / f o l e y _ b o d y _ i m p a c t - 0 1 . w v
a u d i o / f o l e y _ b o d y _ i m p a c t - 0 2 . w v
a u d i o / f o l e y _ b o d y _ i m p a c t - 0 3 . w v
a u d i o / f o l e y _ b o d y _ s p l a t - 0 1 . w v
a u d i o / f o l e y _ b o d y _ s p l a t - 0 2 . w v
a u d i o / f o l e y _ b o d y _ s p l a t - 0 3 . w v
a u d i o / f o l e y _ b o d y _ s p l a t - 0 4 . w v
a u d i o / f o l e y _ d b l j u m p - 0 1 . w v
a u d i o / f o l e y _ d b l j u m p - 0 2 . w v
a u d i o / f o l e y _ d b l j u m p - 0 3 . w v
a u d i o / f o l e y _ f o o t _ l e f t - 0 1 . w v
a u d i o / f o l e y _ f o o t _ l e f t - 0 2 . w v
a u d i o / f o l e y _ f o o t _ l e f t - 0 3 . w v
a u d i o / f o l e y _ f o o t _ l e f t - 0 4 . w v
a u d i o / f o l e y _ f o o t _ r i g h t - 0 1 . w v
a u d i o / f o l e y _ f o o t _ r i g h t - 0 2 . w v
a u d i o / f o l e y _ f o o t _ r i g h t - 0 3 . w v
a u d i o / f o l e y _ f o o t _ r i g h t - 0 4 . w v
a u d i o / f o l e y _ l a n d - 0 1 . w v
a u d i o / f o l e y _ l a n d - 0 2 . w v
a u d i o / f o l e y _ l a n d - 0 3 . w v
a u d i o / f o l e y _ l a n d - 0 4 . w v
a u d i o / h o o k _ a t t a c h - 0 1 . w v
a u d i o / h o o k _ a t t a c h - 0 2 . w v
a u d i o / h o o k _ a t t a c h - 0 3 . w v
a u d i o / h o o k _ l o o p - 0 1 . w v
a u d i o / h o o k _ l o o p - 0 2 . w v
a u d i o / h o o k _ n o a t t a c h - 0 1 . w v
a u d i o / h o o k _ n o a t t a c h - 0 2 . w v
a u d i o / h o o k _ n o a t t a c h - 0 3 . w v
a u d i o / m u s i c _ m e n u . w v
a u d i o / s f x _ c t f _ c a p _ p l . w v
a u d i o / s f x _ c t f _ d r o p . w v
a u d i o / s f x _ c t f _ g r a b _ e n . w v
a u d i o / s f x _ c t f _ g r a b _ p l . w v
a u d i o / s f x _ c t f _ r t n . w v
a u d i o / s f x _ h i t _ s t r o n g - 0 1 . w v
a u d i o / s f x _ h i t _ s t r o n g - 0 2 . w v
a u d i o / s f x _ h i t _ w e a k - 0 1 . w v
a u d i o / s f x _ h i t _ w e a k - 0 2 . w v
a u d i o / s f x _ h i t _ w e a k - 0 3 . w v
a u d i o / s f x _ m s g - c l i e n t . w v
a u d i o / s f x _ m s g - h i g h l i g h t . w v
a u d i o / s f x _ m s g - s e r v e r . w v
a u d i o / s f x _ p i c k u p _ a r m - 0 1 . w v
a u d i o / s f x _ p i c k u p _ a r m - 0 2 . w v
a u d i o / s f x _ p i c k u p _ a r m - 0 3 . w v
a u d i o / s f x _ p i c k u p _ a r m - 0 4 . w v
a u d i o / s f x _ p i c k u p _ g u n . w v
a u d i o / s f x _ p i c k u p _ h r t - 0 1 . w v
a u d i o / s f x _ p i c k u p _ h r t - 0 2 . w v
a u d i o / s f x _ p i c k u p _ l a u n c h e r . w v
a u d i o / s f x _ p i c k u p _ n i n j a . w v
a u d i o / s f x _ p i c k u p _ s g . w v
a u d i o / s f x _ s k i d - 0 1 . w v
a u d i o / s f x _ s k i d - 0 2 . w v
a u d i o / s f x _ s k i d - 0 3 . w v
a u d i o / s f x _ s k i d - 0 4 . w v
a u d i o / s f x _ s p a w n _ w p n - 0 1 . w v
a u d i o / s f x _ s p a w n _ w p n - 0 2 . w v
a u d i o / s f x _ s p a w n _ w p n - 0 3 . w v
a u d i o / v o _ t e e f a u l t _ c r y - 0 1 . w v
a u d i o / v o _ t e e f a u l t _ c r y - 0 2 . w v
a u d i o / v o _ t e e f a u l t _ n i n j a - 0 1 . w v
a u d i o / v o _ t e e f a u l t _ n i n j a - 0 2 . w v
a u d i o / v o _ t e e f a u l t _ n i n j a - 0 3 . w v
a u d i o / v o _ t e e f a u l t _ n i n j a - 0 4 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ l o n g - 0 1 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ l o n g - 0 2 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 0 1 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 0 2 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 0 3 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 0 4 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 0 5 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 0 6 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 0 7 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 0 8 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 0 9 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 1 0 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 1 1 . w v
a u d i o / v o _ t e e f a u l t _ p a i n _ s h o r t - 1 2 . w v
a u d i o / v o _ t e e f a u l t _ s l e d g e - 0 1 . w v
a u d i o / v o _ t e e f a u l t _ s l e d g e - 0 2 . w v
a u d i o / v o _ t e e f a u l t _ s l e d g e - 0 3 . w v
a u d i o / v o _ t e e f a u l t _ s p a w n - 0 1 . w v
a u d i o / v o _ t e e f a u l t _ s p a w n - 0 2 . w v
a u d i o / v o _ t e e f a u l t _ s p a w n - 0 3 . w v
a u d i o / v o _ t e e f a u l t _ s p a w n - 0 4 . w v
a u d i o / v o _ t e e f a u l t _ s p a w n - 0 5 . w v
a u d i o / v o _ t e e f a u l t _ s p a w n - 0 6 . w v
a u d i o / v o _ t e e f a u l t _ s p a w n - 0 7 . w v
a u d i o / w p _ f l u m p _ e x p l o - 0 1 . w v
a u d i o / w p _ f l u m p _ e x p l o - 0 2 . w v
a u d i o / w p _ f l u m p _ e x p l o - 0 3 . w v
a u d i o / w p _ f l u m p _ l a u n c h - 0 1 . w v
a u d i o / w p _ f l u m p _ l a u n c h - 0 2 . w v
a u d i o / w p _ f l u m p _ l a u n c h - 0 3 . w v
a u d i o / w p _ g u n _ f i r e - 0 1 . w v
a u d i o / w p _ g u n _ f i r e - 0 2 . w v
a u d i o / w p _ g u n _ f i r e - 0 3 . w v
a u d i o / w p _ h a m m e r _ h i t - 0 1 . w v
a u d i o / w p _ h a m m e r _ h i t - 0 2 . w v
a u d i o / w p _ h a m m e r _ h i t - 0 3 . w v
a u d i o / w p _ h a m m e r _ s w i n g - 0 1 . w v
a u d i o / w p _ h a m m e r _ s w i n g - 0 2 . w v
a u d i o / w p _ h a m m e r _ s w i n g - 0 3 . w v
a u d i o / w p _ l a s e r _ b n c e - 0 1 . w v
a u d i o / w p _ l a s e r _ b n c e - 0 2 . w v
a u d i o / w p _ l a s e r _ b n c e - 0 3 . w v
a u d i o / w p _ l a s e r _ f i r e - 0 1 . w v
a u d i o / w p _ l a s e r _ f i r e - 0 2 . w v
a u d i o / w p _ l a s e r _ f i r e - 0 3 . w v
a u d i o / w p _ n i n j a _ a t t a c k - 0 1 . w v
a u d i o / w p _ n i n j a _ a t t a c k - 0 2 . w v
a u d i o / w p _ n i n j a _ a t t a c k - 0 3 . w v
a u d i o / w p _ n i n j a _ a t t a c k - 0 4 . w v
a u d i o / w p _ n i n j a _ h i t - 0 1 . w v
a u d i o / w p _ n i n j a _ h i t - 0 2 . w v
a u d i o / w p _ n i n j a _ h i t - 0 3 . w v
a u d i o / w p _ n i n j a _ h i t - 0 4 . w v
a u d i o / w p _ n o a m m o - 0 1 . w v
a u d i o / w p _ n o a m m o - 0 2 . w v
a u d i o / w p _ n o a m m o - 0 3 . w v
a u d i o / w p _ n o a m m o - 0 4 . w v
a u d i o / w p _ n o a m m o - 0 5 . w v
a u d i o / w p _ s h o t t y _ f i r e - 0 1 . w v
a u d i o / w p _ s h o t t y _ f i r e - 0 2 . w v
a u d i o / w p _ s h o t t y _ f i r e - 0 3 . w v
a u d i o / w p _ s w i t c h - 0 1 . w v
a u d i o / w p _ s w i t c h - 0 2 . w v
a u d i o / w p _ s w i t c h - 0 3 . w v
b l o b . p n g
b r o w s e _ i c o n s . p n g
2020-09-18 15:37:27 +00:00
c e n s o r l i s t . t x t
2020-06-23 08:29:32 +00:00
c o n s o l e . p n g
c o n s o l e _ b a r . p n g
c o u n t r y f l a g s / A D . p n g
c o u n t r y f l a g s / A E . p n g
c o u n t r y f l a g s / A F . p n g
c o u n t r y f l a g s / A G . p n g
c o u n t r y f l a g s / A I . p n g
c o u n t r y f l a g s / A L . p n g
c o u n t r y f l a g s / A M . p n g
c o u n t r y f l a g s / A O . p n g
c o u n t r y f l a g s / A R . p n g
c o u n t r y f l a g s / A S . p n g
c o u n t r y f l a g s / A T . p n g
c o u n t r y f l a g s / A U . p n g
c o u n t r y f l a g s / A W . p n g
c o u n t r y f l a g s / A X . p n g
c o u n t r y f l a g s / A Z . p n g
c o u n t r y f l a g s / B A . p n g
c o u n t r y f l a g s / B B . p n g
c o u n t r y f l a g s / B D . p n g
c o u n t r y f l a g s / B E . p n g
c o u n t r y f l a g s / B F . p n g
c o u n t r y f l a g s / B G . p n g
c o u n t r y f l a g s / B H . p n g
c o u n t r y f l a g s / B I . p n g
c o u n t r y f l a g s / B J . p n g
c o u n t r y f l a g s / B L . p n g
c o u n t r y f l a g s / B M . p n g
c o u n t r y f l a g s / B N . p n g
c o u n t r y f l a g s / B O . p n g
c o u n t r y f l a g s / B R . p n g
c o u n t r y f l a g s / B S . p n g
c o u n t r y f l a g s / B T . p n g
c o u n t r y f l a g s / B W . p n g
c o u n t r y f l a g s / B Y . p n g
c o u n t r y f l a g s / B Z . p n g
c o u n t r y f l a g s / C A . p n g
c o u n t r y f l a g s / C C . p n g
c o u n t r y f l a g s / C D . p n g
c o u n t r y f l a g s / C F . p n g
c o u n t r y f l a g s / C G . p n g
c o u n t r y f l a g s / C H . p n g
c o u n t r y f l a g s / C I . p n g
c o u n t r y f l a g s / C K . p n g
c o u n t r y f l a g s / C L . p n g
c o u n t r y f l a g s / C M . p n g
c o u n t r y f l a g s / C N . p n g
c o u n t r y f l a g s / C O . p n g
c o u n t r y f l a g s / C R . p n g
c o u n t r y f l a g s / C U . p n g
c o u n t r y f l a g s / C V . p n g
c o u n t r y f l a g s / C W . p n g
c o u n t r y f l a g s / C X . p n g
c o u n t r y f l a g s / C Y . p n g
c o u n t r y f l a g s / C Z . p n g
c o u n t r y f l a g s / D E . p n g
c o u n t r y f l a g s / D J . p n g
c o u n t r y f l a g s / D K . p n g
c o u n t r y f l a g s / D M . p n g
c o u n t r y f l a g s / D O . p n g
c o u n t r y f l a g s / D Z . p n g
c o u n t r y f l a g s / E C . p n g
c o u n t r y f l a g s / E E . p n g
c o u n t r y f l a g s / E G . p n g
c o u n t r y f l a g s / E H . p n g
c o u n t r y f l a g s / E R . p n g
c o u n t r y f l a g s / E S . p n g
c o u n t r y f l a g s / E T . p n g
c o u n t r y f l a g s / F I . p n g
c o u n t r y f l a g s / F J . p n g
c o u n t r y f l a g s / F K . p n g
c o u n t r y f l a g s / F M . p n g
c o u n t r y f l a g s / F O . p n g
c o u n t r y f l a g s / F R . p n g
c o u n t r y f l a g s / G A . p n g
c o u n t r y f l a g s / G B . p n g
c o u n t r y f l a g s / G D . p n g
c o u n t r y f l a g s / G E . p n g
c o u n t r y f l a g s / G F . p n g
c o u n t r y f l a g s / G G . p n g
c o u n t r y f l a g s / G H . p n g
c o u n t r y f l a g s / G I . p n g
c o u n t r y f l a g s / G L . p n g
c o u n t r y f l a g s / G M . p n g
c o u n t r y f l a g s / G N . p n g
c o u n t r y f l a g s / G P . p n g
c o u n t r y f l a g s / G Q . p n g
c o u n t r y f l a g s / G R . p n g
c o u n t r y f l a g s / G S . p n g
c o u n t r y f l a g s / G T . p n g
c o u n t r y f l a g s / G U . p n g
c o u n t r y f l a g s / G W . p n g
c o u n t r y f l a g s / G Y . p n g
c o u n t r y f l a g s / H K . p n g
c o u n t r y f l a g s / H N . p n g
c o u n t r y f l a g s / H R . p n g
c o u n t r y f l a g s / H T . p n g
c o u n t r y f l a g s / H U . p n g
c o u n t r y f l a g s / I D . p n g
c o u n t r y f l a g s / I E . p n g
c o u n t r y f l a g s / I L . p n g
c o u n t r y f l a g s / I M . p n g
c o u n t r y f l a g s / I N . p n g
c o u n t r y f l a g s / I O . p n g
c o u n t r y f l a g s / I Q . p n g
c o u n t r y f l a g s / I R . p n g
c o u n t r y f l a g s / I S . p n g
c o u n t r y f l a g s / I T . p n g
c o u n t r y f l a g s / J E . p n g
c o u n t r y f l a g s / J M . p n g
c o u n t r y f l a g s / J O . p n g
c o u n t r y f l a g s / J P . p n g
c o u n t r y f l a g s / K E . p n g
c o u n t r y f l a g s / K G . p n g
c o u n t r y f l a g s / K H . p n g
c o u n t r y f l a g s / K I . p n g
c o u n t r y f l a g s / K M . p n g
c o u n t r y f l a g s / K N . p n g
c o u n t r y f l a g s / K P . p n g
c o u n t r y f l a g s / K R . p n g
c o u n t r y f l a g s / K W . p n g
c o u n t r y f l a g s / K Y . p n g
c o u n t r y f l a g s / K Z . p n g
c o u n t r y f l a g s / L A . p n g
c o u n t r y f l a g s / L B . p n g
c o u n t r y f l a g s / L C . p n g
c o u n t r y f l a g s / L I . p n g
c o u n t r y f l a g s / L K . p n g
c o u n t r y f l a g s / L R . p n g
c o u n t r y f l a g s / L S . p n g
c o u n t r y f l a g s / L T . p n g
c o u n t r y f l a g s / L U . p n g
c o u n t r y f l a g s / L V . p n g
c o u n t r y f l a g s / L Y . p n g
c o u n t r y f l a g s / M A . p n g
c o u n t r y f l a g s / M C . p n g
c o u n t r y f l a g s / M D . p n g
c o u n t r y f l a g s / M E . p n g
c o u n t r y f l a g s / M F . p n g
c o u n t r y f l a g s / M G . p n g
c o u n t r y f l a g s / M H . p n g
c o u n t r y f l a g s / M K . p n g
c o u n t r y f l a g s / M L . p n g
c o u n t r y f l a g s / M M . p n g
c o u n t r y f l a g s / M N . p n g
c o u n t r y f l a g s / M O . p n g
c o u n t r y f l a g s / M P . p n g
c o u n t r y f l a g s / M Q . p n g
c o u n t r y f l a g s / M R . p n g
c o u n t r y f l a g s / M S . p n g
c o u n t r y f l a g s / M T . p n g
c o u n t r y f l a g s / M U . p n g
c o u n t r y f l a g s / M V . p n g
c o u n t r y f l a g s / M W . p n g
c o u n t r y f l a g s / M X . p n g
c o u n t r y f l a g s / M Y . p n g
c o u n t r y f l a g s / M Z . p n g
c o u n t r y f l a g s / N A . p n g
c o u n t r y f l a g s / N C . p n g
c o u n t r y f l a g s / N E . p n g
c o u n t r y f l a g s / N F . p n g
c o u n t r y f l a g s / N G . p n g
c o u n t r y f l a g s / N I . p n g
c o u n t r y f l a g s / N L . p n g
c o u n t r y f l a g s / N O . p n g
c o u n t r y f l a g s / N P . p n g
c o u n t r y f l a g s / N R . p n g
c o u n t r y f l a g s / N U . p n g
c o u n t r y f l a g s / N Z . p n g
c o u n t r y f l a g s / O M . p n g
c o u n t r y f l a g s / P A . p n g
c o u n t r y f l a g s / P E . p n g
c o u n t r y f l a g s / P F . p n g
c o u n t r y f l a g s / P G . p n g
c o u n t r y f l a g s / P H . p n g
c o u n t r y f l a g s / P K . p n g
c o u n t r y f l a g s / P L . p n g
c o u n t r y f l a g s / P M . p n g
c o u n t r y f l a g s / P N . p n g
c o u n t r y f l a g s / P R . p n g
c o u n t r y f l a g s / P S . p n g
c o u n t r y f l a g s / P T . p n g
c o u n t r y f l a g s / P W . p n g
c o u n t r y f l a g s / P Y . p n g
c o u n t r y f l a g s / Q A . p n g
c o u n t r y f l a g s / R E . p n g
c o u n t r y f l a g s / R O . p n g
c o u n t r y f l a g s / R S . p n g
c o u n t r y f l a g s / R U . p n g
c o u n t r y f l a g s / R W . p n g
c o u n t r y f l a g s / S A . p n g
c o u n t r y f l a g s / S B . p n g
c o u n t r y f l a g s / S C . p n g
c o u n t r y f l a g s / S D . p n g
c o u n t r y f l a g s / S E . p n g
c o u n t r y f l a g s / S G . p n g
c o u n t r y f l a g s / S H . p n g
c o u n t r y f l a g s / S I . p n g
c o u n t r y f l a g s / S K . p n g
c o u n t r y f l a g s / S L . p n g
c o u n t r y f l a g s / S M . p n g
c o u n t r y f l a g s / S N . p n g
c o u n t r y f l a g s / S O . p n g
c o u n t r y f l a g s / S R . p n g
c o u n t r y f l a g s / S S . p n g
c o u n t r y f l a g s / S T . p n g
c o u n t r y f l a g s / S V . p n g
c o u n t r y f l a g s / S X . p n g
c o u n t r y f l a g s / S Y . p n g
c o u n t r y f l a g s / S Z . p n g
c o u n t r y f l a g s / T C . p n g
c o u n t r y f l a g s / T D . p n g
c o u n t r y f l a g s / T F . p n g
c o u n t r y f l a g s / T G . p n g
c o u n t r y f l a g s / T H . p n g
c o u n t r y f l a g s / T J . p n g
c o u n t r y f l a g s / T K . p n g
c o u n t r y f l a g s / T L . p n g
c o u n t r y f l a g s / T M . p n g
c o u n t r y f l a g s / T N . p n g
c o u n t r y f l a g s / T O . p n g
c o u n t r y f l a g s / T R . p n g
c o u n t r y f l a g s / T T . p n g
c o u n t r y f l a g s / T V . p n g
c o u n t r y f l a g s / T W . p n g
c o u n t r y f l a g s / T Z . p n g
c o u n t r y f l a g s / U A . p n g
c o u n t r y f l a g s / U G . p n g
c o u n t r y f l a g s / U S . p n g
c o u n t r y f l a g s / U Y . p n g
c o u n t r y f l a g s / U Z . p n g
c o u n t r y f l a g s / V A . p n g
c o u n t r y f l a g s / V C . p n g
c o u n t r y f l a g s / V E . p n g
c o u n t r y f l a g s / V G . p n g
c o u n t r y f l a g s / V I . p n g
c o u n t r y f l a g s / V N . p n g
c o u n t r y f l a g s / V U . p n g
c o u n t r y f l a g s / W F . p n g
c o u n t r y f l a g s / W S . p n g
c o u n t r y f l a g s / X C A . p n g
c o u n t r y f l a g s / X E N . p n g
c o u n t r y f l a g s / X E U . p n g
c o u n t r y f l a g s / X N I . p n g
c o u n t r y f l a g s / X S C . p n g
c o u n t r y f l a g s / X W A . p n g
c o u n t r y f l a g s / Y E . p n g
c o u n t r y f l a g s / Z A . p n g
c o u n t r y f l a g s / Z M . p n g
c o u n t r y f l a g s / Z W . p n g
c o u n t r y f l a g s / d e f a u l t . p n g
c o u n t r y f l a g s / i n d e x . t x t
d e b u g _ f o n t . p n g
d e m o _ b u t t o n s . p n g
d e m o _ b u t t o n s 2 . p n g
e d i t o r / a u d i o _ s o u r c e . p n g
e d i t o r / b a c k g r o u n d . p n g
e d i t o r / b a s i c _ f r e e z e . r u l e s
e d i t o r / c h e c k e r . p n g
e d i t o r / c u r s o r . p n g
e d i t o r / d d m a x _ f r e e z e . r u l e s
e d i t o r / d d n e t _ t i l e s . r u l e s
e d i t o r / d d n e t _ w a l l s . r u l e s
e d i t o r / d e s e r t _ m a i n . r u l e s
e d i t o r / e n t i t i e s / D D N e t . p n g
e d i t o r / e n t i t i e s / F N G . p n g
e d i t o r / e n t i t i e s / R a c e . p n g
e d i t o r / e n t i t i e s / V a n i l l a . p n g
e d i t o r / e n t i t i e s / b l o c k w o r l d s . p n g
e d i t o r / e n t i t i e s _ c l e a r / b l o c k w o r l d s . p n g
e d i t o r / e n t i t i e s _ c l e a r / d d n e t . p n g
e d i t o r / e n t i t i e s _ c l e a r / d d r a c e . p n g
2020-12-21 15:45:19 +00:00
e d i t o r / e n t i t i e s _ c l e a r / f - d d r a c e . p n g
2020-06-23 08:29:32 +00:00
e d i t o r / e n t i t i e s _ c l e a r / f n g . p n g
e d i t o r / e n t i t i e s _ c l e a r / r a c e . p n g
e d i t o r / e n t i t i e s _ c l e a r / v a n i l l a . p n g
e d i t o r / f a d e o u t . r u l e s
e d i t o r / f r o n t . p n g
e d i t o r / g e n e r i c _ c l e a r . r u l e s
e d i t o r / g e n e r i c _ u n h o o k a b l e . r u l e s
e d i t o r / g e n e r i c _ u n h o o k a b l e _ 0 . 7 . r u l e s
e d i t o r / g r a s s _ m a i n . r u l e s
e d i t o r / g r a s s _ m a i n _ 0 . 7 . r u l e s
e d i t o r / j u n g l e _ m a i n . r u l e s
e d i t o r / j u n g l e _ m i d g r o u n d . r u l e s
e d i t o r / r o u n d _ t i l e s . r u l e s
e d i t o r / s p e e d _ a r r o w . p n g
e d i t o r / s p e e d u p . p n g
e d i t o r / s w i t c h . p n g
e d i t o r / t e l e . p n g
e d i t o r / t u n e . p n g
e d i t o r / w a t e r . r u l e s
e d i t o r / w i n t e r _ m a i n . r u l e s
e m o t i c o n s . p n g
f i l e _ i c o n s . p n g
2020-08-20 09:21:45 +00:00
f o n t s / D e j a V u S a n s . t t f
2020-06-23 08:29:32 +00:00
f o n t s / I c o n s . t t f
2020-08-20 09:21:45 +00:00
f o n t s / S o u r c e H a n S a n s S C - R e g u l a r . o t f
2020-06-23 08:29:32 +00:00
g a m e . p n g
g u i _ b u t t o n s . p n g
g u i _ c u r s o r . p n g
g u i _ i c o n s . p n g
g u i _ l o g o . p n g
l a n g u a g e s / b e l a r u s i a n . t x t
l a n g u a g e s / b o s n i a n . t x t
l a n g u a g e s / b r a z i l i a n _ p o r t u g u e s e . t x t
l a n g u a g e s / b u l g a r i a n . t x t
l a n g u a g e s / c a t a l a n . t x t
l a n g u a g e s / c h u v a s h . t x t
l a n g u a g e s / c z e c h . t x t
l a n g u a g e s / d a n i s h . t x t
l a n g u a g e s / d u t c h . t x t
l a n g u a g e s / f i n n i s h . t x t
l a n g u a g e s / f r e n c h . t x t
l a n g u a g e s / g e r m a n . t x t
l a n g u a g e s / g r e e k . t x t
l a n g u a g e s / h u n g a r i a n . t x t
l a n g u a g e s / i n d e x . t x t
l a n g u a g e s / i t a l i a n . t x t
l a n g u a g e s / j a p a n e s e . t x t
l a n g u a g e s / k o r e a n . t x t
l a n g u a g e s / k y r g y z . t x t
l a n g u a g e s / l i c e n s e . t x t
l a n g u a g e s / n o r w e g i a n . t x t
l a n g u a g e s / p e r s i a n . t x t
l a n g u a g e s / p o l i s h . t x t
l a n g u a g e s / p o r t u g u e s e . t x t
l a n g u a g e s / r o m a n i a n . t x t
l a n g u a g e s / r u s s i a n . t x t
l a n g u a g e s / s e r b i a n . t x t
2020-10-03 21:50:27 +00:00
l a n g u a g e s / s e r b i a n _ c y r i l l i c . t x t
2020-06-23 08:29:32 +00:00
l a n g u a g e s / s i m p l i f i e d _ c h i n e s e . t x t
l a n g u a g e s / s l o v a k . t x t
l a n g u a g e s / s p a n i s h . t x t
l a n g u a g e s / s w e d i s h . t x t
l a n g u a g e s / t r a d i t i o n a l _ c h i n e s e . t x t
l a n g u a g e s / t u r k i s h . t x t
l a n g u a g e s / u k r a i n i a n . t x t
m a p r e s / b a s i c _ f r e e z e . p n g
m a p r e s / b g _ c l o u d 1 . p n g
m a p r e s / b g _ c l o u d 2 . p n g
m a p r e s / b g _ c l o u d 3 . p n g
m a p r e s / d d m a x _ f r e e z e . p n g
m a p r e s / d d n e t _ s t a r t . p n g
m a p r e s / d d n e t _ t i l e s . p n g
m a p r e s / d d n e t _ w a l l s . p n g
m a p r e s / d e s e r t _ b a c k g r o u n d . p n g
m a p r e s / d e s e r t _ d o o d a d s . p n g
m a p r e s / d e s e r t _ m a i n . p n g
m a p r e s / d e s e r t _ m o u n t a i n s . p n g
m a p r e s / d e s e r t _ m o u n t a i n s 2 . p n g
m a p r e s / d e s e r t _ m o u n t a i n s _ n e w _ b a c k g r o u n d . p n g
m a p r e s / d e s e r t _ m o u n t a i n s _ n e w _ f o r e g r o u n d . p n g
m a p r e s / d e s e r t _ s u n . p n g
m a p r e s / e n t i t i e s . p n g
m a p r e s / f a d e o u t . p n g
m a p r e s / f o n t _ t e e w o r l d s . p n g
m a p r e s / f o n t _ t e e w o r l d s _ a l t . p n g
m a p r e s / g e n e r i c _ c l e a r . p n g
m a p r e s / g e n e r i c _ d e a t h t i l e s . p n g
m a p r e s / g e n e r i c _ l a m p s . p n g
m a p r e s / g e n e r i c _ u n h o o k a b l e . p n g
m a p r e s / g e n e r i c _ u n h o o k a b l e _ 0 . 7 . p n g
m a p r e s / g r a s s _ d o o d a d s . p n g
m a p r e s / g r a s s _ d o o d a d s _ 0 . 7 . p n g
m a p r e s / g r a s s _ m a i n . p n g
m a p r e s / g r a s s _ m a i n _ 0 . 7 . p n g
m a p r e s / j u n g l e _ b a c k g r o u n d . p n g
m a p r e s / j u n g l e _ d e a t h t i l e s . p n g
m a p r e s / j u n g l e _ d o o d a d s . p n g
m a p r e s / j u n g l e _ m a i n . p n g
m a p r e s / j u n g l e _ m i d g r o u n d . p n g
m a p r e s / j u n g l e _ u n h o o k a b l e s . p n g
m a p r e s / l i g h t . p n g
m a p r e s / m i x e d _ t i l e s . p n g
m a p r e s / m o o n . p n g
m a p r e s / m o u n t a i n s . p n g
m a p r e s / r o u n d _ t i l e s . p n g
m a p r e s / s n o w . p n g
m a p r e s / s n o w _ m o u n t a i n . p n g
m a p r e s / s t a r s . p n g
m a p r e s / s u n . p n g
m a p r e s / w a t e r . p n g
m a p r e s / w i n t e r _ d o o d a d s . p n g
m a p r e s / w i n t e r _ m a i n . p n g
m a p r e s / w i n t e r _ m o u n t a i n s . p n g
m a p r e s / w i n t e r _ m o u n t a i n s 2 . p n g
m a p r e s / w i n t e r _ m o u n t a i n s 3 . p n g
2020-08-16 21:21:59 +00:00
m a p s / G o l d \ M i n e . m a p
2020-09-22 12:07:33 +00:00
m a p s / L e a r n T o P l a y . m a p
2020-09-22 13:20:56 +00:00
m a p s / S u n n y \ S i d e \ U p . m a p
2020-09-22 13:18:21 +00:00
m a p s / T s u n a m i . m a p
2018-08-07 06:39:08 +00:00
m a p s / c t f 1 . m a p
m a p s / c t f 2 . m a p
m a p s / c t f 3 . m a p
m a p s / c t f 4 . m a p
m a p s / c t f 5 . m a p
m a p s / c t f 6 . m a p
m a p s / c t f 7 . m a p
m a p s / d m 1 . m a p
m a p s / d m 2 . m a p
m a p s / d m 6 . m a p
m a p s / d m 7 . m a p
m a p s / d m 8 . m a p
m a p s / d m 9 . m a p
2020-08-16 21:21:59 +00:00
m a p s / l i c e n s e . t x t
m a p s 7 / G o l d \ M i n e . m a p
2020-09-22 12:07:33 +00:00
m a p s 7 / L e a r n T o P l a y . m a p
2020-09-22 13:20:56 +00:00
m a p s 7 / S u n n y \ S i d e \ U p . m a p
2020-09-22 13:18:21 +00:00
m a p s 7 / T s u n a m i . m a p
2020-08-16 21:21:59 +00:00
m a p s 7 / r e a d m e . t x t
2020-09-03 12:08:26 +00:00
m e n u i m a g e s / d e m o s . p n g
m e n u i m a g e s / e d i t o r . p n g
m e n u i m a g e s / l o c a l _ s e r v e r . p n g
m e n u i m a g e s / p l a y _ g a m e . p n g
m e n u i m a g e s / s e t t i n g s . p n g
2020-06-23 08:29:32 +00:00
p a r t i c l e s . p n g
2020-08-29 10:10:38 +00:00
s h a d e r / p i p e l i n e . f r a g
s h a d e r / p i p e l i n e . v e r t
2020-06-23 08:29:32 +00:00
s h a d e r / p r i m . f r a g
s h a d e r / p r i m . v e r t
2020-10-20 16:45:03 +00:00
s h a d e r / p r i m e x . f r a g
s h a d e r / p r i m e x . v e r t
2020-06-23 08:29:32 +00:00
s h a d e r / q u a d . f r a g
s h a d e r / q u a d . v e r t
s h a d e r / s p r i t e m u l t i . f r a g
s h a d e r / s p r i t e m u l t i . v e r t
s h a d e r / t e x t . f r a g
s h a d e r / t e x t . v e r t
s h a d e r / t i l e . f r a g
s h a d e r / t i l e . v e r t
s k i n s / A o e 4 l e g . p n g
s k i n s / P a l a d i N . p n g
s k i n s / a n t i a n t e y . p n g
s k i n s / b e a s t . p n g
s k i n s / b l a c k t e e . p n g
s k i n s / b l u e k i t t y . p n g
s k i n s / b l u e s t r i p e . p n g
2020-08-19 21:06:37 +00:00
s k i n s / b o m b . p n g
2020-06-23 08:29:32 +00:00
s k i n s / b r o w n b e a r . p n g
s k i n s / c a m m o . p n g
s k i n s / c a m m o s t r i p e s . p n g
s k i n s / c h i n e s e _ b y _ w h i s . p n g
s k i n s / c o a l a . p n g
s k i n s / c o a l a _ b l u e k i t t y . p n g
s k i n s / c o a l a _ b l u e s t r i p e . p n g
s k i n s / c o a l a _ c a m m o . p n g
s k i n s / c o a l a _ c a m m o s t r i p e s . p n g
s k i n s / c o a l a _ d e f a u l t . p n g
s k i n s / c o a l a _ l i m e k i t t y . p n g
s k i n s / c o a l a _ p i n k y . p n g
s k i n s / c o a l a _ r e d b o p p . p n g
s k i n s / c o a l a _ r e d s t r i p e . p n g
s k i n s / c o a l a _ s a d d o . p n g
s k i n s / c o a l a _ t o p t r i . p n g
s k i n s / c o a l a _ t w i n b o p . p n g
s k i n s / c o a l a _ t w i n t r i . p n g
s k i n s / c o a l a _ w a r p a i n t . p n g
s k i n s / c o a l a _ x _ n i n j a . p n g
s k i n s / d e f a u l t . p n g
s k i n s / d e m o n l i m e k i t t y . p n g
s k i n s / d i n o . p n g
s k i n s / d r a g o n . p n g
s k i n s / e v i l . p n g
s k i n s / e v i l w o l f e . p n g
s k i n s / g h o s t . p n g
s k i n s / g h o s t j t j . p n g
s k i n s / g i r a f f e . p n g
s k i n s / g r e e n s w a r d . p n g
s k i n s / g r e y f o x . p n g
s k i n s / g r e y f o x _ 2 . p n g
s k i n s / h a m m i e - c h e w . p n g
s k i n s / h a m m i e - w h i s . p n g
s k i n s / j e e t . p n g
s k i n s / k i n t a r o _ 2 . p n g
s k i n s / k i t t y _ b l u e s t r i p e . p n g
s k i n s / k i t t y _ b r o w n b e a r . p n g
s k i n s / k i t t y _ c a m m o . p n g
s k i n s / k i t t y _ c a m m o s t r i p e s . p n g
s k i n s / k i t t y _ c o a l a . p n g
s k i n s / k i t t y _ d e f a u l t . p n g
s k i n s / k i t t y _ p i n k y . p n g
s k i n s / k i t t y _ r e d b o p p . p n g
s k i n s / k i t t y _ r e d s t r i p e . p n g
s k i n s / k i t t y _ s a d d o . p n g
s k i n s / k i t t y _ t o p t r i . p n g
s k i n s / k i t t y _ t w i n b o p . p n g
s k i n s / k i t t y _ t w i n t r i . p n g
s k i n s / k i t t y _ w a r p a i n t . p n g
s k i n s / k i t t y _ x _ n i n j a . p n g
2020-08-10 15:57:02 +00:00
s k i n s / l i c e n s e . t x t
2020-06-23 08:29:32 +00:00
s k i n s / l i m e k i t t y . p n g
s k i n s / m e r m y d o n - c o a l a . p n g
s k i n s / m e r m y d o n . p n g
s k i n s / m o u s e . p n g
s k i n s / m u s m a n n . p n g
s k i n s / n a n a m i . p n g
s k i n s / n a n a s . p n g
s k i n s / n e r s i f . p n g
s k i n s / o l d m a n . p n g
s k i n s / o l d s c h o o l . p n g
s k i n s / p e n g u i n . p n g
s k i n s / p i n k y . p n g
s k i n s / r a n d o m . p n g
s k i n s / r e d b o p p . p n g
s k i n s / r e d s t r i p e . p n g
s k i n s / s a d d o . p n g
s k i n s / s a n t a _ b l u e k i t t y . p n g
s k i n s / s a n t a _ b l u e s t r i p e . p n g
s k i n s / s a n t a _ b r o w n b e a r . p n g
s k i n s / s a n t a _ c a m m o . p n g
s k i n s / s a n t a _ c a m m o s t r i p e s . p n g
s k i n s / s a n t a _ c o a l a . p n g
s k i n s / s a n t a _ d e f a u l t . p n g
s k i n s / s a n t a _ l i m e k i t t y . p n g
s k i n s / s a n t a _ p i n k y . p n g
s k i n s / s a n t a _ r e d b o p p . p n g
s k i n s / s a n t a _ r e d s t r i p e . p n g
s k i n s / s a n t a _ s a d d o . p n g
s k i n s / s a n t a _ t o p t r i . p n g
s k i n s / s a n t a _ t w i n b o p . p n g
s k i n s / s a n t a _ t w i n t r i . p n g
s k i n s / s a n t a _ w a r p a i n t . p n g
s k i n s / t e e r a s t a . p n g
s k i n s / t o p t r i . p n g
s k i n s / t w i n b o p . p n g
s k i n s / t w i n t r i . p n g
s k i n s / v e t e r a n . p n g
s k i n s / v o o d o o _ t e e . p n g
s k i n s / w a r p a i n t . p n g
s k i n s / w a r t e e . p n g
s k i n s / w h i s . p n g
s k i n s / x _ n i n j a . p n g
2020-06-24 07:55:17 +00:00
s k i n s / x _ s p e c . p n g
2020-09-18 16:45:42 +00:00
t h e m e s / a u t o . p n g
2020-09-19 06:46:33 +00:00
t h e m e s / a u t u m n . p n g
t h e m e s / a u t u m n _ d a y . m a p
t h e m e s / a u t u m n _ n i g h t . m a p
2020-09-18 16:45:42 +00:00
t h e m e s / h e a v e n s . p n g
t h e m e s / h e a v e n s _ d a y . m a p
t h e m e s / h e a v e n s _ n i g h t . m a p
t h e m e s / j u n g l e . p n g
t h e m e s / j u n g l e _ d a y . m a p
t h e m e s / j u n g l e _ n i g h t . m a p
2020-12-28 16:20:29 +00:00
t h e m e s / n e w y e a r . m a p
t h e m e s / n e w y e a r . p n g
2020-09-18 16:45:42 +00:00
t h e m e s / n o n e . p n g
t h e m e s / r a n d . p n g
t h e m e s / w i n t e r . p n g
t h e m e s / w i n t e r _ d a y . m a p
t h e m e s / w i n t e r _ n i g h t . m a p
2020-06-23 08:29:32 +00:00
w o r d l i s t . t x t
)
2020-08-20 09:21:45 +00:00
set_glob ( DATA GLOB_RECURSE "frag;json;map;otf;png;rules;ttf;txt;vert;wv" data ${ EXPECTED_DATA } )
2020-06-23 08:29:32 +00:00
2017-03-07 14:24:08 +00:00
########################################################################
# COPY DATA AND DLLS
########################################################################
2020-06-23 08:29:32 +00:00
foreach ( datafile ${ DATA } )
file ( RELATIVE_PATH OUT ${ PROJECT_SOURCE_DIR } /data ${ datafile } )
get_filename_component ( DESTINATION data/ ${ OUT } PATH )
file ( MAKE_DIRECTORY ${ DESTINATION } )
file ( COPY ${ datafile } DESTINATION ${ DESTINATION } )
endforeach ( )
2017-08-01 19:55:49 +00:00
set ( COPY_FILES
$ { C U R L _ C O P Y _ F I L E S }
$ { F R E E T Y P E _ C O P Y _ F I L E S }
$ { O P U S F I L E _ C O P Y _ F I L E S }
$ { S D L 2 _ C O P Y _ F I L E S }
2020-08-10 21:43:10 +00:00
$ { S Q L i t e 3 _ C O P Y _ F I L E S }
2017-10-26 22:42:33 +00:00
$ { F F M P E G _ C O P Y _ F I L E S }
2020-09-16 15:16:13 +00:00
$ { W E B S O C K E T S _ C O P Y _ F I L E S }
2017-08-01 19:55:49 +00:00
)
file ( COPY ${ COPY_FILES } DESTINATION . )
2017-03-07 14:24:08 +00:00
2017-02-23 14:41:42 +00:00
########################################################################
# CODE GENERATION
########################################################################
2017-02-23 13:16:32 +00:00
function ( generate_source output_file script_parameter )
2018-02-05 19:22:54 +00:00
add_custom_command ( OUTPUT ${ output_file }
2020-06-16 16:33:57 +00:00
C O M M A N D $ { P Y T H O N _ E X E C U T A B L E } d a t a s r c / c o m p i l e . p y $ { s c r i p t _ p a r a m e t e r }
2018-02-05 19:22:54 +00:00
> " $ { P R O J E C T _ B I N A R Y _ D I R } / $ { o u t p u t _ f i l e } "
2017-02-23 13:16:32 +00:00
D E P E N D S
d a t a s r c / c o m p i l e . p y
d a t a s r c / c o n t e n t . p y
d a t a s r c / d a t a t y p e s . p y
d a t a s r c / n e t w o r k . p y
2017-03-03 12:29:35 +00:00
W O R K I N G _ D I R E C T O R Y $ { P R O J E C T _ S O U R C E _ D I R }
2017-02-23 13:16:32 +00:00
)
2017-10-25 14:57:25 +00:00
endfunction ( )
2017-02-23 13:16:32 +00:00
2020-04-16 08:46:43 +00:00
function ( generate_source7 output_file script_parameter )
add_custom_command ( OUTPUT ${ output_file }
2020-06-16 16:33:57 +00:00
C O M M A N D $ { P Y T H O N _ E X E C U T A B L E } - m d a t a s r c . s e v e n . c o m p i l e $ { s c r i p t _ p a r a m e t e r }
2020-04-16 08:46:43 +00:00
> " $ { P R O J E C T _ B I N A R Y _ D I R } / $ { o u t p u t _ f i l e } "
D E P E N D S
d a t a s r c / s e v e n / c o m p i l e . p y
d a t a s r c / s e v e n / c o n t e n t . p y
d a t a s r c / s e v e n / d a t a t y p e s . p y
d a t a s r c / s e v e n / n e t w o r k . p y
W O R K I N G _ D I R E C T O R Y $ { P R O J E C T _ S O U R C E _ D I R }
)
endfunction ( )
function ( generate_maps output_file )
add_custom_command ( OUTPUT ${ output_file }
2020-06-16 16:33:57 +00:00
C O M M A N D $ { P Y T H O N _ E X E C U T A B L E } d a t a s r c / c r o s s c o m p i l e . p y
2020-04-16 08:46:43 +00:00
> " $ { P R O J E C T _ B I N A R Y _ D I R } / $ { o u t p u t _ f i l e } "
D E P E N D S
d a t a s r c / c o m p i l e . p y
d a t a s r c / c o n t e n t . p y
d a t a s r c / d a t a t y p e s . p y
d a t a s r c / n e t w o r k . p y
d a t a s r c / s e v e n / c o m p i l e . p y
d a t a s r c / s e v e n / c o n t e n t . p y
d a t a s r c / s e v e n / d a t a t y p e s . p y
d a t a s r c / s e v e n / n e t w o r k . p y
W O R K I N G _ D I R E C T O R Y $ { P R O J E C T _ S O U R C E _ D I R }
)
endfunction ( )
2018-02-12 22:14:14 +00:00
file ( MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/src/game/generated/" )
2018-03-01 15:50:29 +00:00
execute_process ( COMMAND git rev-parse --git-dir
E R R O R _ Q U I E T
2020-06-20 09:08:59 +00:00
W O R K I N G _ D I R E C T O R Y " $ { P R O J E C T _ S O U R C E _ D I R } "
2018-03-01 15:50:29 +00:00
O U T P U T _ V A R I A B L E P R O J E C T _ G I T _ D I R
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E
R E S U L T _ V A R I A B L E P R O J E C T _ G I T _ D I R _ E R R O R
)
if ( NOT PROJECT_GIT_DIR_ERROR )
set ( GIT_REVISION_EXTRA_DEPS
$ { P R O J E C T _ G I T _ D I R } / i n d e x
$ { P R O J E C T _ G I T _ D I R } / l o g s / H E A D
)
endif ( )
2018-03-09 23:58:10 +00:00
add_custom_command ( OUTPUT ${ PROJECT_BINARY_DIR } /src/game/generated/git_revision.cpp
2020-06-16 16:33:57 +00:00
C O M M A N D $ { P Y T H O N _ E X E C U T A B L E }
2018-03-09 23:58:10 +00:00
s c r i p t s / g i t _ r e v i s i o n . p y
> $ { P R O J E C T _ B I N A R Y _ D I R } / s r c / g a m e / g e n e r a t e d / g i t _ r e v i s i o n . c p p
W O R K I N G _ D I R E C T O R Y $ { P R O J E C T _ S O U R C E _ D I R }
2018-03-01 15:50:29 +00:00
D E P E N D S
$ { G I T _ R E V I S I O N _ E X T R A _ D E P S }
s c r i p t s / g i t _ r e v i s i o n . p y
2017-02-23 13:16:32 +00:00
)
2017-02-23 15:29:13 +00:00
generate_source ( "src/game/generated/client_data.cpp" "client_content_source" )
generate_source ( "src/game/generated/client_data.h" "client_content_header" )
2017-02-23 13:16:32 +00:00
generate_source ( "src/game/generated/protocol.cpp" "network_source" )
generate_source ( "src/game/generated/protocol.h" "network_header" )
generate_source ( "src/game/generated/server_data.cpp" "server_content_source" )
generate_source ( "src/game/generated/server_data.h" "server_content_header" )
2020-04-16 08:46:43 +00:00
generate_source7 ( "src/game/generated/protocol7.cpp" "network_source" )
generate_source7 ( "src/game/generated/protocol7.h" "network_header" )
2020-10-09 07:07:05 +00:00
generate_source7 ( "src/game/generated/client_data7.cpp" "client_content_source" )
generate_source7 ( "src/game/generated/client_data7.h" "client_content_header" )
2020-04-16 08:46:43 +00:00
generate_maps ( "src/game/generated/protocolglue.h" )
2017-02-23 14:41:42 +00:00
2020-11-03 13:48:24 +00:00
add_custom_command ( OUTPUT "src/game/generated/wordlist.h"
C O M M A N D $ { P Y T H O N _ E X E C U T A B L E } s c r i p t s / w o r d l i s t . p y > $ { P R O J E C T _ B I N A R Y _ D I R } / s r c / g a m e / g e n e r a t e d / w o r d l i s t . h
W O R K I N G _ D I R E C T O R Y $ { P R O J E C T _ S O U R C E _ D I R }
D E P E N D S
s c r i p t s / w o r d l i s t . p y
)
2017-02-23 14:41:42 +00:00
########################################################################
# SHARED
########################################################################
2017-03-01 12:40:11 +00:00
# Sources
2020-01-19 19:32:54 +00:00
set_src ( BASE GLOB_RECURSE src/base
2017-07-27 14:13:28 +00:00
c o l o r . h
d e t e c t . h
2020-08-20 10:17:44 +00:00
d y n a m i c . h
2018-06-05 19:22:40 +00:00
h a s h . c
h a s h . h
2019-04-06 00:46:56 +00:00
h a s h _ b u n d l e d . c
2018-06-05 19:22:40 +00:00
h a s h _ c t x t . h
h a s h _ l i b t o m c r y p t . c
h a s h _ o p e n s s l . c
2017-07-27 14:13:28 +00:00
m a t h . h
s y s t e m . c
s y s t e m . h
t l / a l g o r i t h m . h
t l / a l l o c a t o r . h
t l / a r r a y . h
t l / b a s e . h
t l / r a n g e . h
t l / s o r t e d _ a r r a y . h
t l / s t r i n g . h
t l / t h r e a d i n g . h
2019-01-07 22:49:20 +00:00
u n i c o d e / c o n f u s a b l e s . c
u n i c o d e / c o n f u s a b l e s _ d a t a . h
u n i c o d e / t o l o w e r . c
u n i c o d e / t o l o w e r _ d a t a . h
2017-07-27 14:13:28 +00:00
v m a t h . h
)
2020-01-19 19:32:54 +00:00
set_src ( ENGINE_INTERFACE GLOB src/engine
2020-05-13 20:27:49 +00:00
a n t i b o t . h
2017-11-27 00:16:11 +00:00
c l i e n t . h
c o n f i g . h
c o n s o l e . h
d e m o . h
e d i t o r . h
e n g i n e . h
f r i e n d s . h
g h o s t . h
g r a p h i c s . h
i n p u t . h
k e r n e l . h
k e y s . h
m a p . h
m a s t e r s e r v e r . h
m e s s a g e . h
s e r v e r . h
s e r v e r b r o w s e r . h
s o u n d . h
2020-08-20 10:17:44 +00:00
s t e a m . h
2017-11-27 00:16:11 +00:00
s t o r a g e . h
t e x t r e n d e r . h
u p d a t e r . h
u u i d . h
2020-10-02 13:43:52 +00:00
w a r n i n g . h
2017-11-27 00:16:11 +00:00
)
2020-01-19 19:32:54 +00:00
set_src ( ENGINE_SHARED GLOB src/engine/shared
2017-07-27 14:13:28 +00:00
c o m p r e s s i o n . c p p
c o m p r e s s i o n . h
c o n f i g . c p p
c o n f i g . h
c o n f i g _ v a r i a b l e s . h
c o n s o l e . c p p
c o n s o l e . h
2020-06-22 20:16:58 +00:00
c s v . c p p
c s v . h
2017-07-27 14:13:28 +00:00
d a t a f i l e . c p p
d a t a f i l e . h
d e m o . c p p
d e m o . h
e c o n . c p p
e c o n . h
e n g i n e . c p p
f i f o . c p p
f i f o . h
f i l e c o l l e c t i o n . c p p
f i l e c o l l e c t i o n . h
g l o b a l _ u u i d _ m a n a g e r . c p p
h u f f m a n . c p p
h u f f m a n . h
2020-11-18 06:36:19 +00:00
i m a g e _ m a n i p u l a t i o n . c p p
i m a g e _ m a n i p u l a t i o n . h
2017-07-27 14:13:28 +00:00
j o b s . c p p
j o b s . h
2018-12-12 08:59:42 +00:00
j s o n . c p p
j s o n . h
2017-07-27 14:13:28 +00:00
k e r n e l . c p p
l i n e r e a d e r . c p p
l i n e r e a d e r . h
m a p . c p p
2020-09-18 16:45:42 +00:00
m a p . h
2017-07-27 14:13:28 +00:00
m a s t e r s e r v e r . c p p
m e m h e a p . c p p
m e m h e a p . h
m e s s a g e . h
n e t b a n . c p p
n e t b a n . h
n e t w o r k . c p p
n e t w o r k . h
n e t w o r k _ c l i e n t . c p p
n e t w o r k _ c o n n . c p p
n e t w o r k _ c o n s o l e . c p p
n e t w o r k _ c o n s o l e _ c o n n . c p p
n e t w o r k _ s e r v e r . c p p
p a c k e r . c p p
p a c k e r . h
p r o t o c o l . h
p r o t o c o l _ e x . c p p
p r o t o c o l _ e x . h
p r o t o c o l _ e x _ m s g s . h
r i n g b u f f e r . c p p
r i n g b u f f e r . h
s e r v e r b r o w s e r . c p p
s n a p s h o t . c p p
s n a p s h o t . h
s t o r a g e . c p p
2018-01-11 15:01:13 +00:00
t e e h i s t o r i a n _ e x . c p p
t e e h i s t o r i a n _ e x . h
t e e h i s t o r i a n _ e x _ c h u n k s . h
2017-07-27 14:13:28 +00:00
u u i d _ m a n a g e r . c p p
u u i d _ m a n a g e r . h
2017-10-26 22:42:33 +00:00
v i d e o . c p p
v i d e o . h
2017-07-27 14:13:28 +00:00
w e b s o c k e t s . c p p
w e b s o c k e t s . h
)
2020-01-19 19:32:54 +00:00
set_src ( GAME_SHARED GLOB src/game
2020-06-30 22:19:17 +00:00
b e z i e r . c p p
b e z i e r . h
2017-07-27 14:13:28 +00:00
c o l l i s i o n . c p p
c o l l i s i o n . h
d d r a c e c o m m a n d s . h
e x t r a i n f o . c p p
e x t r a i n f o . h
g a m e c o r e . c p p
g a m e c o r e . h
l a y e r s . c p p
l a y e r s . h
l o c a l i z a t i o n . c p p
l o c a l i z a t i o n . h
2018-03-24 13:00:41 +00:00
m a p b u g s . c p p
m a p b u g s . h
2018-05-01 10:38:33 +00:00
m a p b u g s _ l i s t . h
2017-07-27 14:13:28 +00:00
m a p i t e m s . c p p
m a p i t e m s . h
2018-10-05 09:20:30 +00:00
m a p i t e m s _ e x . c p p
m a p i t e m s _ e x . h
m a p i t e m s _ e x _ t y p e s . h
2020-05-25 13:19:25 +00:00
p r n g . c p p
p r n g . h
2017-07-27 14:13:28 +00:00
t e a m s c o r e . c p p
t e a m s c o r e . h
t u n i n g . h
v a r i a b l e s . h
v e r s i o n . h
v o t i n g . h
)
2018-10-05 09:20:30 +00:00
# A bit hacky, but these are needed to register all the UUIDs, even for stuff
# that doesn't link game.
set ( ENGINE_UUID_SHARED
2020-04-16 08:46:43 +00:00
s r c / g a m e / g e n e r a t e d / p r o t o c o l g l u e . h
s r c / g a m e / g e n e r a t e d / p r o t o c o l 7 . c p p
s r c / g a m e / g e n e r a t e d / p r o t o c o l 7 . h
2018-10-05 09:20:30 +00:00
s r c / g a m e / g e n e r a t e d / p r o t o c o l . c p p
s r c / g a m e / g e n e r a t e d / p r o t o c o l . h
s r c / g a m e / m a p i t e m s _ e x . c p p
s r c / g a m e / m a p i t e m s _ e x . h
s r c / g a m e / m a p i t e m s _ e x _ t y p e s . h
)
foreach ( s ${ GAME_SHARED } )
if ( s MATCHES "mapitems_(ex.cpp|ex.h|ex_types.h)$" )
list ( REMOVE_ITEM GAME_SHARED ${ s } )
endif ( )
endforeach ( )
list ( REMOVE_ITEM GAME_SHARED ${ ENGINE_UUID_SHARED } )
2018-03-02 02:42:35 +00:00
set ( GAME_GENERATED_SHARED
s r c / g a m e / g e n e r a t e d / g i t _ r e v i s i o n . c p p
s r c / g a m e / g e n e r a t e d / p r o t o c o l . h
2020-04-16 08:46:43 +00:00
s r c / g a m e / g e n e r a t e d / p r o t o c o l 7 . h
s r c / g a m e / g e n e r a t e d / p r o t o c o l g l u e . h
2018-03-02 02:42:35 +00:00
)
2017-02-23 13:16:32 +00:00
2018-07-11 18:17:21 +00:00
set ( DEPS ${ DEP_JSON } ${ DEP_MD5 } ${ ZLIB_DEP } )
2017-02-23 14:41:42 +00:00
# Libraries
2018-12-23 22:18:56 +00:00
set ( LIBS
$ { C R Y P T O _ L I B R A R I E S }
$ { W E B S O C K E T S _ L I B R A R I E S }
$ { Z L I B _ L I B R A R I E S }
$ { P L A T F O R M _ L I B S }
# Add pthreads (on non-Windows) at the end, so that other libraries can depend
# on it.
$ { C M A K E _ T H R E A D _ L I B S _ I N I T }
)
2017-02-23 13:16:32 +00:00
2017-02-23 14:41:42 +00:00
# Targets
2018-10-05 09:20:30 +00:00
add_library ( engine-shared EXCLUDE_FROM_ALL OBJECT ${ ENGINE_INTERFACE } ${ ENGINE_SHARED } ${ ENGINE_UUID_SHARED } ${ BASE } )
2017-03-03 14:17:12 +00:00
add_library ( game-shared EXCLUDE_FROM_ALL OBJECT ${ GAME_SHARED } ${ GAME_GENERATED_SHARED } )
2017-03-03 14:04:13 +00:00
list ( APPEND TARGETS_OWN engine-shared game-shared )
2017-02-23 13:16:32 +00:00
2017-02-23 14:41:42 +00:00
########################################################################
# CLIENT
########################################################################
if ( CLIENT )
# Sources
2020-08-20 10:17:44 +00:00
set_src ( STEAMAPI_SRC GLOB_RECURSE src/steam
s t e a m _ a p i _ f l a t . h
s t e a m _ a p i _ s t u b . c p p
)
2020-08-31 10:25:53 +00:00
if ( STEAM OR TARGET_OS STREQUAL "windows" OR TARGET_OS STREQUAL "mac" )
set ( STEAMAPI_KIND SHARED )
else ( )
set ( STEAMAPI_KIND STATIC )
endif ( )
2020-08-20 10:17:44 +00:00
set ( TARGET_STEAMAPI steam_api )
2020-08-31 10:25:53 +00:00
add_library ( ${ TARGET_STEAMAPI } ${ STEAMAPI_KIND } ${ STEAMAPI_SRC } )
2020-08-20 10:17:44 +00:00
list ( APPEND TARGETS_OWN ${ TARGET_STEAMAPI } )
2020-01-19 19:32:54 +00:00
set_src ( ENGINE_CLIENT GLOB src/engine/client
2017-07-27 14:13:28 +00:00
b a c k e n d _ s d l . c p p
b a c k e n d _ s d l . h
2020-11-06 17:18:55 +00:00
b l o c k l i s t _ d r i v e r . c p p
b l o c k l i s t _ d r i v e r . h
2017-07-27 14:13:28 +00:00
c l i e n t . c p p
c l i e n t . h
2019-06-02 13:34:01 +00:00
d e m o e d i t . c p p
d e m o e d i t . h
2017-07-27 14:13:28 +00:00
f r i e n d s . c p p
f r i e n d s . h
2020-10-10 21:01:57 +00:00
g h o s t . c p p
g h o s t . h
2017-07-27 14:13:28 +00:00
g r a p h i c s _ t h r e a d e d . c p p
g r a p h i c s _ t h r e a d e d . h
2018-12-12 08:59:42 +00:00
h t t p . c p p
h t t p . h
2017-07-27 14:13:28 +00:00
i n p u t . c p p
i n p u t . h
k e y n a m e s . h
2020-04-14 15:53:53 +00:00
n o t i f i c a t i o n s . c p p
n o t i f i c a t i o n s . h
2017-09-16 16:58:24 +00:00
o p e n g l _ s l . c p p
o p e n g l _ s l . h
o p e n g l _ s l _ p r o g r a m . c p p
o p e n g l _ s l _ p r o g r a m . h
2017-07-27 14:13:28 +00:00
s e r v e r b r o w s e r . c p p
s e r v e r b r o w s e r . h
s o u n d . c p p
s o u n d . h
2020-08-20 10:17:44 +00:00
s t e a m . c p p
2017-07-27 14:13:28 +00:00
t e x t . c p p
u p d a t e r . c p p
u p d a t e r . h
2017-10-26 22:42:33 +00:00
v i d e o . c p p
v i d e o . h
2017-07-27 14:13:28 +00:00
)
2020-01-19 19:32:54 +00:00
set_src ( GAME_CLIENT GLOB_RECURSE src/game/client
2017-07-27 14:13:28 +00:00
a n i m s t a t e . c p p
a n i m s t a t e . h
c o m p o n e n t . h
c o m p o n e n t s / b a c k g r o u n d . c p p
c o m p o n e n t s / b a c k g r o u n d . h
c o m p o n e n t s / b i n d s . c p p
c o m p o n e n t s / b i n d s . h
c o m p o n e n t s / b r o a d c a s t . c p p
c o m p o n e n t s / b r o a d c a s t . h
c o m p o n e n t s / c a m e r a . c p p
c o m p o n e n t s / c a m e r a . h
c o m p o n e n t s / c h a t . c p p
c o m p o n e n t s / c h a t . h
c o m p o n e n t s / c o n s o l e . c p p
c o m p o n e n t s / c o n s o l e . h
c o m p o n e n t s / c o n t r o l s . c p p
c o m p o n e n t s / c o n t r o l s . h
c o m p o n e n t s / c o u n t r y f l a g s . c p p
c o m p o n e n t s / c o u n t r y f l a g s . h
c o m p o n e n t s / d a m a g e i n d . c p p
c o m p o n e n t s / d a m a g e i n d . h
c o m p o n e n t s / d e b u g h u d . c p p
c o m p o n e n t s / d e b u g h u d . h
c o m p o n e n t s / e f f e c t s . c p p
c o m p o n e n t s / e f f e c t s . h
c o m p o n e n t s / e m o t i c o n . c p p
c o m p o n e n t s / e m o t i c o n . h
c o m p o n e n t s / f l o w . c p p
c o m p o n e n t s / f l o w . h
c o m p o n e n t s / g h o s t . c p p
c o m p o n e n t s / g h o s t . h
c o m p o n e n t s / h u d . c p p
c o m p o n e n t s / h u d . h
c o m p o n e n t s / i t e m s . c p p
c o m p o n e n t s / i t e m s . h
c o m p o n e n t s / k i l l m e s s a g e s . c p p
c o m p o n e n t s / k i l l m e s s a g e s . h
c o m p o n e n t s / m a p i m a g e s . c p p
c o m p o n e n t s / m a p i m a g e s . h
c o m p o n e n t s / m a p l a y e r s . c p p
c o m p o n e n t s / m a p l a y e r s . h
c o m p o n e n t s / m a p s o u n d s . c p p
c o m p o n e n t s / m a p s o u n d s . h
2020-09-18 16:45:42 +00:00
c o m p o n e n t s / m e n u _ b a c k g r o u n d . c p p
c o m p o n e n t s / m e n u _ b a c k g r o u n d . h
2017-07-27 14:13:28 +00:00
c o m p o n e n t s / m e n u s . c p p
c o m p o n e n t s / m e n u s . h
c o m p o n e n t s / m e n u s _ b r o w s e r . c p p
c o m p o n e n t s / m e n u s _ d e m o . c p p
c o m p o n e n t s / m e n u s _ i n g a m e . c p p
c o m p o n e n t s / m e n u s _ s e t t i n g s . c p p
2020-09-26 07:37:35 +00:00
c o m p o n e n t s / m e n u s _ s e t t i n g s _ a s s e t s . c p p
2020-09-03 12:08:26 +00:00
c o m p o n e n t s / m e n u s _ s t a r t . c p p
2017-07-27 14:13:28 +00:00
c o m p o n e n t s / m o t d . c p p
c o m p o n e n t s / m o t d . h
c o m p o n e n t s / n a m e p l a t e s . c p p
c o m p o n e n t s / n a m e p l a t e s . h
c o m p o n e n t s / p a r t i c l e s . c p p
c o m p o n e n t s / p a r t i c l e s . h
c o m p o n e n t s / p l a y e r s . c p p
c o m p o n e n t s / p l a y e r s . h
c o m p o n e n t s / r a c e _ d e m o . c p p
c o m p o n e n t s / r a c e _ d e m o . h
c o m p o n e n t s / s c o r e b o a r d . c p p
c o m p o n e n t s / s c o r e b o a r d . h
c o m p o n e n t s / s k i n s . c p p
c o m p o n e n t s / s k i n s . h
c o m p o n e n t s / s o u n d s . c p p
c o m p o n e n t s / s o u n d s . h
c o m p o n e n t s / s p e c t a t o r . c p p
c o m p o n e n t s / s p e c t a t o r . h
c o m p o n e n t s / s t a t b o a r d . c p p
c o m p o n e n t s / s t a t b o a r d . h
c o m p o n e n t s / v o t i n g . c p p
c o m p o n e n t s / v o t i n g . h
g a m e c l i e n t . c p p
g a m e c l i e n t . h
l i n e i n p u t . c p p
l i n e i n p u t . h
2019-04-11 22:46:54 +00:00
p r e d i c t i o n / e n t i t i e s / c h a r a c t e r . c p p
p r e d i c t i o n / e n t i t i e s / c h a r a c t e r . h
p r e d i c t i o n / e n t i t i e s / l a s e r . c p p
p r e d i c t i o n / e n t i t i e s / l a s e r . h
p r e d i c t i o n / e n t i t i e s / p i c k u p . c p p
p r e d i c t i o n / e n t i t i e s / p i c k u p . h
p r e d i c t i o n / e n t i t i e s / p r o j e c t i l e . c p p
p r e d i c t i o n / e n t i t i e s / p r o j e c t i l e . h
p r e d i c t i o n / e n t i t y . c p p
p r e d i c t i o n / e n t i t y . h
p r e d i c t i o n / g a m e w o r l d . c p p
p r e d i c t i o n / g a m e w o r l d . h
2017-10-06 20:10:29 +00:00
r a c e . c p p
r a c e . h
2017-07-27 14:13:28 +00:00
r e n d e r . c p p
r e n d e r . h
r e n d e r _ m a p . c p p
2020-10-09 07:07:05 +00:00
s k i n . h
2017-07-27 14:13:28 +00:00
u i . c p p
u i . h
)
2020-01-19 19:32:54 +00:00
set_src ( GAME_EDITOR GLOB src/game/editor
2017-07-27 14:13:28 +00:00
a u t o _ m a p . c p p
a u t o _ m a p . h
e d i t o r . c p p
e d i t o r . h
2019-04-08 17:39:55 +00:00
e x p l a n a t i o n s . c p p
2017-07-27 14:13:28 +00:00
i o . c p p
l a y e r _ g a m e . c p p
l a y e r _ q u a d s . c p p
l a y e r _ s o u n d s . c p p
l a y e r _ t i l e s . c p p
p o p u p s . c p p
)
set ( GAME_GENERATED_CLIENT
s r c / g a m e / g e n e r a t e d / c l i e n t _ d a t a . c p p
s r c / g a m e / g e n e r a t e d / c l i e n t _ d a t a . h
2020-10-09 07:07:05 +00:00
s r c / g a m e / g e n e r a t e d / c l i e n t _ d a t a 7 . c p p
s r c / g a m e / g e n e r a t e d / c l i e n t _ d a t a 7 . h
2017-07-27 14:13:28 +00:00
)
2017-07-26 02:30:56 +00:00
set ( CLIENT_SRC ${ ENGINE_CLIENT } ${ PLATFORM_CLIENT } ${ GAME_CLIENT } ${ GAME_EDITOR } ${ GAME_GENERATED_CLIENT } )
2017-02-23 14:41:42 +00:00
2018-07-11 18:17:21 +00:00
set ( DEPS_CLIENT ${ DEPS } ${ GLEW_DEP } ${ PNGLITE_DEP } ${ WAVPACK_DEP } )
2017-02-23 14:41:42 +00:00
# Libraries
set ( LIBS_CLIENT
2017-03-01 12:40:11 +00:00
$ { L I B S }
2018-12-12 08:59:42 +00:00
$ { C U R L _ L I B R A R I E S }
2017-02-23 14:41:42 +00:00
$ { F R E E T Y P E _ L I B R A R I E S }
2018-02-12 22:14:14 +00:00
$ { G L E W _ L I B R A R I E S }
$ { P N G L I T E _ L I B R A R I E S }
2017-03-18 00:20:55 +00:00
$ { S D L 2 _ L I B R A R I E S }
2018-02-12 22:14:14 +00:00
$ { W A V P A C K _ L I B R A R I E S }
2017-10-26 22:42:33 +00:00
$ { F F M P E G _ L I B R A R I E S }
2017-03-18 00:20:55 +00:00
# Order of these three is important.
2017-02-23 14:41:42 +00:00
$ { O P U S F I L E _ L I B R A R I E S }
2017-03-07 12:39:23 +00:00
$ { O P U S _ L I B R A R I E S }
2017-03-18 00:20:55 +00:00
$ { O G G _ L I B R A R I E S }
2020-08-20 10:17:44 +00:00
$ { T A R G E T _ S T E A M A P I }
2017-03-02 11:31:20 +00:00
$ { P L A T F O R M _ C L I E N T _ L I B S }
2018-12-23 22:13:41 +00:00
# Add pthreads (on non-Windows) at the end, so that other libraries can depend
# on it.
$ { C M A K E _ T H R E A D _ L I B S _ I N I T }
2017-02-23 14:41:42 +00:00
)
2017-02-23 13:16:32 +00:00
2017-03-18 00:45:50 +00:00
if ( TARGET_OS STREQUAL "windows" )
2017-08-01 19:43:56 +00:00
set ( CLIENT_ICON "other/icons/DDNet.rc" )
2018-05-09 20:06:52 +00:00
if ( NOT MINGW )
set ( CLIENT_MANIFEST "other/manifest/DDNet.manifest" )
else ( )
set ( CLIENT_MANIFEST "other/manifest/DDNet.rc" )
2020-08-29 12:51:14 +00:00
set_target_properties ( ${ TARGET_STEAMAPI } PROPERTIES PREFIX "" )
2018-05-09 20:06:52 +00:00
endif ( )
2017-03-18 00:45:50 +00:00
else ( )
set ( CLIENT_ICON )
2018-05-09 20:06:52 +00:00
set ( CLIENT_MANIFEST )
2017-03-18 00:45:50 +00:00
endif ( )
2017-02-23 14:41:42 +00:00
# Target
2017-03-01 12:40:11 +00:00
set ( TARGET_CLIENT ${ CLIENT_EXECUTABLE } )
add_executable ( ${ TARGET_CLIENT }
$ { C L I E N T _ S R C }
2017-03-18 00:45:50 +00:00
$ { C L I E N T _ I C O N }
2018-05-09 20:06:52 +00:00
$ { C L I E N T _ M A N I F E S T }
2017-03-01 12:40:11 +00:00
$ { D E P S _ C L I E N T }
$ < T A R G E T _ O B J E C T S : e n g i n e - s h a r e d >
$ < T A R G E T _ O B J E C T S : g a m e - s h a r e d >
)
target_link_libraries ( ${ TARGET_CLIENT } ${ LIBS_CLIENT } )
2017-02-23 14:41:42 +00:00
2017-02-28 23:51:22 +00:00
target_include_directories ( ${ TARGET_CLIENT } PRIVATE
2018-12-12 08:59:42 +00:00
$ { C U R L _ I N C L U D E _ D I R S }
2017-02-28 23:51:22 +00:00
$ { F R E E T Y P E _ I N C L U D E _ D I R S }
2018-02-12 22:14:14 +00:00
$ { G L E W _ I N C L U D E _ D I R S }
2017-02-28 23:51:22 +00:00
$ { O G G _ I N C L U D E _ D I R S }
$ { O P U S F I L E _ I N C L U D E _ D I R S }
$ { O P U S _ I N C L U D E _ D I R S }
2018-02-12 22:14:14 +00:00
$ { P N G L I T E _ I N C L U D E _ D I R S }
2017-02-28 23:51:22 +00:00
$ { S D L 2 _ I N C L U D E _ D I R S }
2018-02-12 22:14:14 +00:00
$ { W A V P A C K _ I N C L U D E _ D I R S }
2017-10-26 22:42:33 +00:00
$ { F F M P E G _ I N C L U D E _ D I R S }
2020-04-14 15:53:53 +00:00
$ { P L A T F O R M _ C L I E N T _ I N C L U D E _ D I R S }
2017-02-28 23:51:22 +00:00
)
2018-02-12 22:14:14 +00:00
2020-09-01 13:23:56 +00:00
if ( STEAMAPI_KIND STREQUAL SHARED )
2020-08-31 10:25:53 +00:00
set_own_rpath ( ${ TARGET_CLIENT } )
endif ( )
2020-06-23 13:25:53 +00:00
2018-02-20 16:10:52 +00:00
set ( PARAMS "${WAVPACK_INCLUDE_DIRS};${WAVPACK_INCLUDE_DIRS}" )
if ( NOT(WAVPACK_OPEN_FILE_INPUT_EX_PARAMS STREQUAL PARAMS ) )
unset ( WAVPACK_OPEN_FILE_INPUT_EX CACHE )
endif ( )
set ( WAVPACK_OPEN_FILE_INPUT_EX_PARAMS "${PARAMS}" CACHE INTERNAL "" )
2018-02-17 00:31:40 +00:00
set ( CMAKE_REQUIRED_INCLUDES ${ ORIGINAL_CMAKE_REQUIRED_INCLUDES } ${ WAVPACK_INCLUDE_DIRS } )
set ( CMAKE_REQUIRED_LIBRARIES ${ ORIGINAL_CMAKE_REQUIRED_LIBRARIES } ${ WAVPACK_LIBRARIES } )
2018-02-18 14:35:20 +00:00
check_symbol_exists ( WavpackOpenFileInputEx wavpack.h WAVPACK_OPEN_FILE_INPUT_EX )
2020-04-11 11:17:14 +00:00
check_symbol_exists ( WavpackCloseFile wavpack.h WAVPACK_CLOSE_FILE )
2018-02-17 00:31:40 +00:00
set ( CMAKE_REQUIRED_INCLUDES ${ ORIGINAL_CMAKE_REQUIRED_INCLUDES } )
set ( CMAKE_REQUIRED_LIBRARIES ${ ORIGINAL_CMAKE_REQUIRED_LIBRARIES } )
2018-02-18 14:35:20 +00:00
if ( WAVPACK_OPEN_FILE_INPUT_EX )
target_compile_definitions ( ${ TARGET_CLIENT } PRIVATE CONF_WAVPACK_OPEN_FILE_INPUT_EX )
2018-02-12 22:14:14 +00:00
endif ( )
2020-04-11 11:17:14 +00:00
if ( WAVPACK_CLOSE_FILE )
target_compile_definitions ( ${ TARGET_CLIENT } PRIVATE CONF_WAVPACK_CLOSE_FILE )
endif ( )
2017-03-03 14:04:13 +00:00
list ( APPEND TARGETS_OWN ${ TARGET_CLIENT } )
2017-07-26 02:30:56 +00:00
list ( APPEND TARGETS_LINK ${ TARGET_CLIENT } )
2017-02-23 13:16:32 +00:00
endif ( )
2017-03-07 14:32:11 +00:00
2017-02-23 14:41:42 +00:00
########################################################################
# SERVER
########################################################################
2017-03-01 12:40:11 +00:00
# Sources
2020-03-11 00:58:50 +00:00
set_src ( ANTIBOT_SRC GLOB src/antibot
a n t i b o t _ d a t a . h
a n t i b o t _ i n t e r f a c e . h
a n t i b o t _ n u l l . c p p
)
2020-07-04 08:13:21 +00:00
set_src ( ENGINE_SERVER GLOB_RECURSE src/engine/server
2020-05-13 20:27:49 +00:00
a n t i b o t . c p p
a n t i b o t . h
2017-07-27 14:13:28 +00:00
a u t h m a n a g e r . c p p
a u t h m a n a g e r . h
2020-07-09 17:02:28 +00:00
d a t a b a s e s / c o n n e c t i o n . c p p
2020-07-04 08:13:21 +00:00
d a t a b a s e s / c o n n e c t i o n . h
2020-07-04 10:09:40 +00:00
d a t a b a s e s / c o n n e c t i o n _ p o o l . c p p
d a t a b a s e s / c o n n e c t i o n _ p o o l . h
2020-07-04 08:13:21 +00:00
d a t a b a s e s / m y s q l . c p p
d a t a b a s e s / m y s q l . h
2020-07-07 17:29:44 +00:00
d a t a b a s e s / s q l i t e . c p p
d a t a b a s e s / s q l i t e . h
2018-03-14 01:35:31 +00:00
n a m e _ b a n . c p p
n a m e _ b a n . h
2017-07-27 14:13:28 +00:00
r e g i s t e r . c p p
r e g i s t e r . h
s e r v e r . c p p
s e r v e r . h
s q l _ s t r i n g _ h e l p e r s . c p p
s q l _ s t r i n g _ h e l p e r s . h
2020-04-19 13:14:21 +00:00
u p n p . c p p
u p n p . h
2017-07-27 14:13:28 +00:00
)
2020-01-19 19:32:54 +00:00
set_src ( GAME_SERVER GLOB_RECURSE src/game/server
2021-01-09 13:35:00 +00:00
a l l o c . h
2017-07-27 14:13:28 +00:00
d d r a c e c h a t . c p p
d d r a c e c h a t . h
d d r a c e c o m m a n d s . c p p
e n t i t i e s / c h a r a c t e r . c p p
e n t i t i e s / c h a r a c t e r . h
e n t i t i e s / d o o r . c p p
e n t i t i e s / d o o r . h
e n t i t i e s / d r a g g e r . c p p
e n t i t i e s / d r a g g e r . h
e n t i t i e s / f l a g . c p p
e n t i t i e s / f l a g . h
e n t i t i e s / g u n . c p p
e n t i t i e s / g u n . h
e n t i t i e s / l a s e r . c p p
e n t i t i e s / l a s e r . h
e n t i t i e s / l i g h t . c p p
e n t i t i e s / l i g h t . h
e n t i t i e s / p i c k u p . c p p
e n t i t i e s / p i c k u p . h
e n t i t i e s / p l a s m a . c p p
e n t i t i e s / p l a s m a . h
e n t i t i e s / p r o j e c t i l e . c p p
e n t i t i e s / p r o j e c t i l e . h
e n t i t y . c p p
e n t i t y . h
e v e n t h a n d l e r . c p p
e v e n t h a n d l e r . h
g a m e c o n t e x t . c p p
g a m e c o n t e x t . h
g a m e c o n t r o l l e r . c p p
g a m e c o n t r o l l e r . h
g a m e m o d e s / D D R a c e . c p p
g a m e m o d e s / D D R a c e . h
g a m e m o d e s / g a m e m o d e . h
g a m e w o r l d . c p p
g a m e w o r l d . h
p l a y e r . c p p
p l a y e r . h
s a v e . c p p
s a v e . h
2020-06-24 21:14:09 +00:00
s c o r e . c p p
2017-07-27 14:13:28 +00:00
s c o r e . h
t e a m s . c p p
t e a m s . h
2017-09-12 12:58:44 +00:00
t e e h i s t o r i a n . c p p
t e e h i s t o r i a n . h
2020-06-10 16:12:10 +00:00
t e e i n f o . c p p
t e e i n f o . h
2017-07-27 14:13:28 +00:00
)
set ( GAME_GENERATED_SERVER
" s r c / g a m e / g e n e r a t e d / s e r v e r _ d a t a . c p p "
" s r c / g a m e / g e n e r a t e d / s e r v e r _ d a t a . h "
2020-11-03 13:48:24 +00:00
" s r c / g a m e / g e n e r a t e d / w o r d l i s t . h "
2017-07-27 14:13:28 +00:00
)
2017-03-01 12:40:11 +00:00
set ( SERVER_SRC ${ ENGINE_SERVER } ${ GAME_SERVER } ${ GAME_GENERATED_SERVER } )
2017-03-18 00:45:50 +00:00
if ( TARGET_OS STREQUAL "windows" )
2017-08-01 19:43:56 +00:00
set ( SERVER_ICON "other/icons/DDNet-Server.rc" )
2017-03-18 00:45:50 +00:00
else ( )
set ( SERVER_ICON )
endif ( )
2017-02-23 14:41:42 +00:00
2020-03-11 00:58:50 +00:00
# Antibot
if ( ANTIBOT )
2020-08-23 10:15:06 +00:00
set ( TARGET_ANTIBOT antibot )
2020-03-11 00:58:50 +00:00
add_library ( ${ TARGET_ANTIBOT } SHARED ${ ANTIBOT_SRC } )
list ( APPEND TARGETS_OWN ${ TARGET_ANTIBOT } )
endif ( )
2017-03-01 12:40:11 +00:00
# Libraries
2018-12-23 22:13:41 +00:00
set ( LIBS_SERVER
$ { L I B S }
$ { M Y S Q L _ L I B R A R I E S }
2020-07-07 17:29:44 +00:00
$ { S Q L i t e 3 _ L I B R A R I E S }
2020-03-11 00:58:50 +00:00
$ { T A R G E T _ A N T I B O T }
2020-04-14 10:11:50 +00:00
$ { M I N I U P N P C _ L I B R A R I E S }
2018-12-23 22:13:41 +00:00
# Add pthreads (on non-Windows) at the end, so that other libraries can depend
# on it.
$ { C M A K E _ T H R E A D _ L I B S _ I N I T }
)
2017-03-01 12:40:11 +00:00
# Target
set ( TARGET_SERVER ${ SERVER_EXECUTABLE } )
add_executable ( ${ TARGET_SERVER }
2017-03-03 14:04:13 +00:00
$ { D E P S }
2017-03-01 12:40:11 +00:00
$ { S E R V E R _ S R C }
2017-03-18 00:45:50 +00:00
$ { S E R V E R _ I C O N }
2017-03-01 12:40:11 +00:00
$ < T A R G E T _ O B J E C T S : e n g i n e - s h a r e d >
$ < T A R G E T _ O B J E C T S : g a m e - s h a r e d >
)
target_link_libraries ( ${ TARGET_SERVER } ${ LIBS_SERVER } )
2017-03-03 14:04:13 +00:00
list ( APPEND TARGETS_OWN ${ TARGET_SERVER } )
2017-07-26 02:30:56 +00:00
list ( APPEND TARGETS_LINK ${ TARGET_SERVER } )
2017-02-23 14:41:42 +00:00
2017-11-17 13:37:29 +00:00
if ( TARGET_OS AND TARGET_OS STREQUAL "mac" )
set ( SERVER_LAUNCHER_SRC src/osxlaunch/server.mm )
set ( TARGET_SERVER_LAUNCHER ${ TARGET_SERVER } -Launcher )
add_executable ( ${ TARGET_SERVER_LAUNCHER } ${ SERVER_LAUNCHER_SRC } )
target_link_libraries ( ${ TARGET_SERVER_LAUNCHER } ${ COCOA } )
list ( APPEND TARGETS_OWN ${ TARGET_SERVER_LAUNCHER } )
list ( APPEND TARGETS_LINK ${ TARGET_SERVER_LAUNCHER } )
endif ( )
2017-03-01 12:40:11 +00:00
########################################################################
# VARIOUS TARGETS
########################################################################
2020-01-19 19:32:54 +00:00
set_src ( MASTERSRV_SRC GLOB src/mastersrv mastersrv.cpp mastersrv.h )
set_src ( TWPING_SRC GLOB src/twping twping.cpp )
2017-03-01 12:40:11 +00:00
set ( TARGET_MASTERSRV mastersrv )
set ( TARGET_TWPING twping )
2017-03-03 14:04:13 +00:00
add_executable ( ${ TARGET_MASTERSRV } EXCLUDE_FROM_ALL ${ MASTERSRV_SRC } $< TARGET_OBJECTS:engine-shared > ${ DEPS } )
add_executable ( ${ TARGET_TWPING } EXCLUDE_FROM_ALL ${ TWPING_SRC } $< TARGET_OBJECTS:engine-shared > ${ DEPS } )
2017-03-01 12:40:11 +00:00
target_link_libraries ( ${ TARGET_MASTERSRV } ${ LIBS } )
target_link_libraries ( ${ TARGET_TWPING } ${ LIBS } )
2017-09-03 15:36:51 +00:00
list ( APPEND TARGETS_OWN ${ TARGET_MASTERSRV } ${ TARGET_TWPING } )
list ( APPEND TARGETS_LINK ${ TARGET_MASTERSRV } ${ TARGET_TWPING } )
2017-03-01 14:49:22 +00:00
2017-03-03 14:23:18 +00:00
set ( TARGETS_TOOLS )
2020-01-19 19:32:54 +00:00
set_src ( TOOLS GLOB src/tools
2017-07-27 14:13:28 +00:00
c o n f i g _ c o m m o n . h
c o n f i g _ r e t r i e v e . c p p
c o n f i g _ s t o r e . c p p
c r a p n e t . c p p
d i l a t e . c p p
d u m m y _ m a p . c p p
f a k e _ s e r v e r . c p p
2019-12-08 19:27:17 +00:00
m a p _ c o n v e r t _ 0 7 . c p p
2017-07-27 14:13:28 +00:00
m a p _ d i f f . c p p
m a p _ e x t r a c t . c p p
2020-10-26 16:05:57 +00:00
m a p _ o p t i m i z e . c p p
2017-08-28 16:06:19 +00:00
m a p _ r e p l a c e _ i m a g e . c p p
2017-07-27 14:13:28 +00:00
m a p _ r e s a v e . c p p
p a c k e t g e n . c p p
2019-01-07 22:49:20 +00:00
u n i c o d e _ c o n f u s a b l e s . c p p
2017-07-27 14:13:28 +00:00
u u i d . c p p
)
foreach ( ABS_T ${ TOOLS } )
file ( RELATIVE_PATH T "${PROJECT_SOURCE_DIR}/src/tools/" ${ ABS_T } )
if ( T MATCHES "\\.cpp$" )
string ( REGEX REPLACE "\\.cpp$" "" TOOL "${T}" )
2018-02-12 22:14:14 +00:00
set ( TOOL_DEPS ${ DEPS } )
set ( TOOL_LIBS ${ LIBS } )
2020-11-24 12:08:59 +00:00
if ( TOOL MATCHES "^(dilate|map_convert_07|map_optimize|map_extract|map_replace_image)$" )
2018-02-12 22:14:14 +00:00
list ( APPEND TOOL_DEPS ${ PNGLITE_DEP } )
list ( APPEND TOOL_LIBS ${ PNGLITE_LIBRARIES } )
list ( APPEND TOOL_INCLUDE_DIRS ${ PNGLITE_INCLUDE_DIRS } )
2017-07-27 14:13:28 +00:00
endif ( )
if ( TOOL MATCHES "^config_" )
list ( APPEND EXTRA_TOOL_SRC "src/tools/config_common.h" )
endif ( )
2018-08-26 19:44:31 +00:00
set ( EXCLUDE_FROM_ALL )
if ( DEV )
set ( EXCLUDE_FROM_ALL EXCLUDE_FROM_ALL )
2017-08-01 19:55:49 +00:00
endif ( )
add_executable ( ${ TOOL } ${ EXCLUDE_FROM_ALL }
2018-02-12 22:14:14 +00:00
$ { T O O L _ D E P S }
2017-07-27 14:13:28 +00:00
s r c / t o o l s / $ { T O O L } . c p p
$ { E X T R A _ T O O L _ S R C }
$ < T A R G E T _ O B J E C T S : e n g i n e - s h a r e d >
)
2018-02-12 22:14:14 +00:00
target_include_directories ( ${ TOOL } PRIVATE ${ TOOL_INCLUDE_DIRS } )
target_link_libraries ( ${ TOOL } ${ TOOL_LIBS } )
2017-07-27 14:13:28 +00:00
list ( APPEND TARGETS_TOOLS ${ TOOL } )
2017-03-18 00:45:50 +00:00
endif ( )
2017-03-01 14:49:22 +00:00
endforeach ( )
2017-03-03 14:23:18 +00:00
list ( APPEND TARGETS_OWN ${ TARGETS_TOOLS } )
2017-07-26 02:30:56 +00:00
list ( APPEND TARGETS_LINK ${ TARGETS_TOOLS } )
2017-03-03 14:23:18 +00:00
add_custom_target ( tools DEPENDS ${ TARGETS_TOOLS } )
2017-03-03 14:04:13 +00:00
add_custom_target ( everything DEPENDS ${ TARGETS_OWN } )
2017-03-03 12:29:35 +00:00
2017-08-30 19:57:55 +00:00
########################################################################
# TESTS
########################################################################
2017-10-15 07:57:21 +00:00
if ( GTEST_FOUND OR DOWNLOAD_GTEST )
2020-01-19 19:32:54 +00:00
set_src ( TESTS GLOB src/test
2017-10-13 00:48:42 +00:00
a i o . c p p
2020-07-02 09:07:30 +00:00
b e z i e r . c p p
2020-11-06 17:18:55 +00:00
b l o c k l i s t _ d r i v e r . c p p
2019-04-24 20:47:03 +00:00
c o l o r . c p p
2020-06-22 20:16:58 +00:00
c s v . c p p
2018-10-05 09:20:30 +00:00
d a t a f i l e . c p p
2017-10-22 22:13:53 +00:00
f s . c p p
2018-03-01 15:50:29 +00:00
g i t _ r e v i s i o n . c p p
2018-06-05 19:22:40 +00:00
h a s h . c p p
2017-11-24 09:33:42 +00:00
j o b s . c p p
2018-06-19 12:45:53 +00:00
j s o n . c p p
2018-03-24 13:00:41 +00:00
m a p b u g s . c p p
2018-03-14 01:35:31 +00:00
n a m e _ b a n . c p p
2020-09-03 16:50:23 +00:00
p a c k e r . c p p
2020-05-25 13:19:25 +00:00
p r n g . c p p
2018-03-06 17:41:18 +00:00
s t r . c p p
2017-08-30 19:57:55 +00:00
s t r i p _ p a t h _ a n d _ e x t e n s i o n . c p p
2017-09-28 00:03:30 +00:00
t e e h i s t o r i a n . c p p
2017-10-22 22:13:53 +00:00
t e s t . c p p
t e s t . h
2017-10-09 22:08:24 +00:00
t h r e a d . c p p
2017-12-20 15:56:44 +00:00
u n i x . c p p
2017-09-28 00:03:30 +00:00
)
set ( TESTS_EXTRA
2020-11-06 17:18:55 +00:00
s r c / e n g i n e / c l i e n t / b l o c k l i s t _ d r i v e r . c p p
s r c / e n g i n e / c l i e n t / b l o c k l i s t _ d r i v e r . h
2018-03-14 01:35:31 +00:00
s r c / e n g i n e / s e r v e r / n a m e _ b a n . c p p
s r c / e n g i n e / s e r v e r / n a m e _ b a n . h
2017-09-28 00:03:30 +00:00
s r c / g a m e / s e r v e r / t e e h i s t o r i a n . c p p
s r c / g a m e / s e r v e r / t e e h i s t o r i a n . h
2017-08-30 19:57:55 +00:00
)
set ( TARGET_TESTRUNNER testrunner )
add_executable ( ${ TARGET_TESTRUNNER } EXCLUDE_FROM_ALL
$ { T E S T S }
2017-09-28 00:03:30 +00:00
$ { T E S T S _ E X T R A }
2017-08-30 19:57:55 +00:00
$ < T A R G E T _ O B J E C T S : e n g i n e - s h a r e d >
$ < T A R G E T _ O B J E C T S : g a m e - s h a r e d >
2017-10-15 07:57:21 +00:00
$ { D E P S }
2017-08-30 19:57:55 +00:00
)
2017-11-24 09:51:46 +00:00
target_link_libraries ( ${ TARGET_TESTRUNNER } ${ LIBS } ${ GTEST_LIBRARIES } )
2017-08-30 19:57:55 +00:00
target_include_directories ( ${ TARGET_TESTRUNNER } PRIVATE ${ GTEST_INCLUDE_DIRS } )
list ( APPEND TARGETS_OWN ${ TARGET_TESTRUNNER } )
list ( APPEND TARGETS_LINK ${ TARGET_TESTRUNNER } )
add_custom_target ( run_tests
2019-01-06 06:16:53 +00:00
C O M M A N D $ < T A R G E T _ F I L E : $ { T A R G E T _ T E S T R U N N E R } > $ { T E S T R U N N E R _ A R G S }
2017-08-30 19:57:55 +00:00
C O M M E N T R u n n i n g t e s t s
D E P E N D S $ { T A R G E T _ T E S T R U N N E R }
U S E S _ T E R M I N A L
)
endif ( )
2017-08-01 19:55:49 +00:00
########################################################################
# INSTALLATION
########################################################################
function ( escape_regex VAR STRING )
string ( REGEX REPLACE "([][^$.+*?|()\\\\])" "\\\\\\1" ESCAPED "${STRING}" )
set ( ${ VAR } ${ ESCAPED } PARENT_SCOPE )
endfunction ( )
2017-09-13 20:38:25 +00:00
function ( escape_backslashes VAR STRING )
string ( REGEX REPLACE "\\\\" "\\\\\\\\" ESCAPED "${STRING}" )
set ( ${ VAR } ${ ESCAPED } PARENT_SCOPE )
endfunction ( )
2017-08-01 19:55:49 +00:00
function ( max_length VAR )
set ( MAX_LENGTH 0 )
foreach ( str ${ ARGN } )
string ( LENGTH ${ str } LENGTH )
if ( LENGTH GREATER MAX_LENGTH )
set ( MAX_LENGTH ${ LENGTH } )
endif ( )
endforeach ( )
set ( ${ VAR } ${ MAX_LENGTH } PARENT_SCOPE )
endfunction ( )
# Tries to generate a list of regex that matches everything except the given
# parameters.
function ( regex_inverted VAR )
max_length ( MAX_LENGTH ${ ARGN } )
math ( EXPR UPPER_BOUND "${MAX_LENGTH}-1" )
set ( REMAINING ${ ARGN } )
set ( RESULT )
foreach ( i RANGE ${ UPPER_BOUND } )
set ( TEMP ${ REMAINING } )
set ( REMAINING )
foreach ( str ${ TEMP } )
string ( LENGTH ${ str } LENGTH )
if ( i LESS LENGTH )
list ( APPEND REMAINING ${ str } )
endif ( )
endforeach ( )
set ( ADDITIONAL )
foreach ( outer ${ REMAINING } )
string ( SUBSTRING ${ outer } 0 ${ i } OUTER_PREFIX )
set ( CHARS "" )
foreach ( inner ${ REMAINING } )
string ( SUBSTRING ${ inner } 0 ${ i } INNER_PREFIX )
if ( OUTER_PREFIX STREQUAL INNER_PREFIX )
string ( SUBSTRING ${ inner } ${ i } 1 INNER_NEXT )
set ( CHARS "${CHARS}${INNER_NEXT}" )
endif ( )
endforeach ( )
escape_regex ( OUTER_PREFIX_ESCAPED "${OUTER_PREFIX}" )
list ( APPEND ADDITIONAL "${OUTER_PREFIX_ESCAPED}([^${CHARS}]|$)" )
endforeach ( )
list ( REMOVE_DUPLICATES ADDITIONAL )
list ( APPEND RESULT ${ ADDITIONAL } )
endforeach ( )
set ( ${ VAR } ${ RESULT } PARENT_SCOPE )
endfunction ( )
set ( CPACK_PACKAGE_NAME ${ PROJECT_NAME } )
set ( CPACK_GENERATOR TGZ TXZ )
set ( CPACK_ARCHIVE_COMPONENT_INSTALL ON )
2018-01-14 07:42:15 +00:00
set ( CPACK_STRIP_FILES TRUE )
2017-08-01 19:55:49 +00:00
set ( CPACK_COMPONENTS_ALL portable )
set ( CPACK_SOURCE_GENERATOR ZIP TGZ TBZ2 TXZ )
set ( CPACK_PACKAGE_VERSION_MAJOR ${ PROJECT_VERSION_MAJOR } )
set ( CPACK_PACKAGE_VERSION_MINOR ${ PROJECT_VERSION_MINOR } )
set ( CPACK_PACKAGE_VERSION_PATCH ${ PROJECT_VERSION_PATCH } )
2020-09-24 15:06:03 +00:00
set ( CPACK_PACKAGE_VERSION ${ VERSION } )
2017-08-01 19:55:49 +00:00
set ( CPACK_SYSTEM_NAME ${ CMAKE_SYSTEM_NAME } )
if ( TARGET_OS AND TARGET_BITS )
if ( TARGET_OS STREQUAL "windows" )
set ( CPACK_SYSTEM_NAME "win${TARGET_BITS}" )
set ( CPACK_GENERATOR ZIP )
elseif ( TARGET_OS STREQUAL "linux" )
2018-12-23 03:43:12 +00:00
# Let compiler tell its arch
# Both gcc and clang support -dumpmachine
execute_process (
C O M M A N D $ { C M A K E _ C _ C O M P I L E R } - d u m p m a c h i n e
O U T P U T _ V A R I A B L E A R C H I T E C T U R E _ T U P L E
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E
)
if ( NOT ARCHITECTURE_TUPLE )
# If you're really using a weird compiler, then assume Intel here.
message ( WARNING "Your compiler doesn't support -dumpmachine, this is weird" )
if ( TARGET_BITS EQUAL 32 )
set ( ARCHITECTURE "x86" )
elseif ( TARGET_BITS EQUAL 64 )
set ( ARCHITECTURE "x86_64" )
endif ( )
else ( )
string ( REGEX MATCH "^[^-]*" ARCHITECTURE "${ARCHITECTURE_TUPLE}" )
if ( ARCHITECTURE MATCHES "i.86" )
set ( ARCHITECTURE "x86" )
endif ( )
2017-08-01 19:55:49 +00:00
endif ( )
2018-12-23 03:43:12 +00:00
set ( CPACK_SYSTEM_NAME "linux_${ARCHITECTURE}" )
2017-08-01 19:55:49 +00:00
elseif ( TARGET_OS STREQUAL "mac" )
set ( CPACK_SYSTEM_NAME "osx" )
2017-10-25 14:57:25 +00:00
set ( CPACK_GENERATOR DMG )
2017-08-01 19:55:49 +00:00
endif ( )
endif ( )
set ( CPACK_PACKAGE_FILE_NAME ${ CPACK_PACKAGE_NAME } - ${ CPACK_PACKAGE_VERSION } - ${ CPACK_SYSTEM_NAME } )
2017-11-08 23:16:52 +00:00
set ( CPACK_ARCHIVE_PORTABLE_FILE_NAME ${ CPACK_PACKAGE_FILE_NAME } )
2017-08-01 19:55:49 +00:00
set ( CPACK_SOURCE_PACKAGE_FILE_NAME ${ CPACK_PACKAGE_NAME } - ${ CPACK_PACKAGE_VERSION } -src )
set ( CPACK_SOURCE_FILES
C M a k e L i s t s . t x t
R E A D M E . m d
a u t o e x e c _ s e r v e r . c f g
c m a k e /
d a t a /
d a t a s r c /
d d n e t - l i b s /
l i c e n s e . t x t
o t h e r /
s c r i p t s /
s r c /
s t o r a g e . c f g
)
set ( CPACK_SOURCE_IGNORE_FILES
2017-09-13 20:38:25 +00:00
" \ \ \ \ . p y c $ "
" / \ \ \ \ . g i t "
2017-08-01 19:55:49 +00:00
" / _ _ p y c a c h e _ _ / "
)
regex_inverted ( CPACK_SOURCE_FILES_INVERTED ${ CPACK_SOURCE_FILES } )
escape_regex ( PROJECT_SOURCE_DIR_ESCAPED ${ PROJECT_SOURCE_DIR } )
foreach ( str ${ CPACK_SOURCE_FILES_INVERTED } )
2017-09-13 20:38:25 +00:00
escape_backslashes ( STR_ESCAPED "${PROJECT_SOURCE_DIR_ESCAPED}/${str}" )
list ( APPEND CPACK_SOURCE_IGNORE_FILES "${STR_ESCAPED}" )
2017-08-01 19:55:49 +00:00
endforeach ( )
set ( CMAKE_INSTALL_DEFAULT_COMPONENT_NAME ${ PROJECT_NAME } )
2017-09-05 14:00:50 +00:00
set ( CPACK_TARGETS
$ { T A R G E T _ C L I E N T }
$ { T A R G E T _ S E R V E R }
c o n f i g _ r e t r i e v e
c o n f i g _ s t o r e
d i l a t e
2020-08-16 20:43:56 +00:00
m a p _ c o n v e r t _ 0 7
2017-09-05 14:00:50 +00:00
m a p _ d i f f
m a p _ e x t r a c t
)
2020-09-01 13:23:56 +00:00
if ( STEAMAPI_KIND STREQUAL SHARED )
2020-08-31 10:25:53 +00:00
list ( APPEND CPACK_TARGETS ${ TARGET_STEAMAPI } )
endif ( )
2017-11-08 21:19:47 +00:00
set ( CPACK_DIRS data )
2017-09-05 14:00:50 +00:00
set ( CPACK_FILES
l i c e n s e . t x t
s t o r a g e . c f g
a u t o e x e c _ s e r v e r . c f g
$ { C O P Y _ F I L E S }
)
2017-08-01 19:55:49 +00:00
if ( TARGET_OS STREQUAL "windows" )
2017-09-05 14:00:50 +00:00
list ( APPEND CPACK_FILES other/config_directory.bat )
endif ( )
2018-08-26 19:44:31 +00:00
if ( NOT DEV )
2019-12-06 10:13:18 +00:00
include ( GNUInstallDirs )
install ( DIRECTORY data DESTINATION ${ CMAKE_INSTALL_DATAROOTDIR } /ddnet COMPONENT data )
install ( TARGETS ${ TARGET_CLIENT } DESTINATION ${ CMAKE_INSTALL_BINDIR } COMPONENT client )
2020-09-01 13:23:56 +00:00
if ( STEAMAPI_KIND STREQUAL SHARED )
2020-08-31 10:25:53 +00:00
install ( TARGETS ${ TARGET_STEAMAPI } DESTINATION ${ CMAKE_INSTALL_LIBDIR } /ddnet COMPONENT client )
endif ( )
2019-12-06 10:13:18 +00:00
install ( TARGETS ${ TARGET_SERVER } DESTINATION ${ CMAKE_INSTALL_BINDIR } COMPONENT server )
2020-04-12 15:03:49 +00:00
if ( ANTIBOT )
2020-08-20 10:17:44 +00:00
install ( TARGETS ${ TARGET_ANTIBOT } DESTINATION ${ CMAKE_INSTALL_LIBDIR } /ddnet COMPONENT server )
2020-04-12 15:03:49 +00:00
endif ( )
2019-12-06 10:13:18 +00:00
install ( TARGETS ${ TARGETS_TOOLS } DESTINATION ${ CMAKE_INSTALL_LIBDIR } /ddnet COMPONENT tools )
install ( FILES other/ddnet.desktop DESTINATION ${ CMAKE_INSTALL_DATAROOTDIR } /applications COMPONENT client )
2019-12-31 07:00:41 +00:00
install ( FILES other/ddnet.appdata.xml DESTINATION ${ CMAKE_INSTALL_DATAROOTDIR } /metainfo COMPONENT client )
2019-05-23 14:28:25 +00:00
foreach ( SIZE 16 32 48 128 256 512 )
2019-12-06 10:13:18 +00:00
install ( FILES other/icons/DDNet_ ${ SIZE } x ${ SIZE } x32.png DESTINATION ${ CMAKE_INSTALL_DATAROOTDIR } /icons/hicolor/ ${ SIZE } x ${ SIZE } /apps RENAME ddnet.png COMPONENT client )
2019-05-23 14:28:25 +00:00
endforeach ( )
2018-08-26 19:44:31 +00:00
endif ( )
2018-08-21 19:53:08 +00:00
2018-08-26 19:44:31 +00:00
if ( DEV )
# Don't generate CPack targets.
elseif ( CMAKE_VERSION VERSION_LESS 3.6 OR CMAKE_VERSION VERSION_EQUAL 3.6 )
message ( WARNING "Cannot create CPack targets, CMake version too old. Use CMake 3.6 or newer." )
else ( )
2017-11-17 16:43:52 +00:00
set ( EXTRA_ARGS DESTINATION ${ CPACK_PACKAGE_FILE_NAME } COMPONENT portable EXCLUDE_FROM_ALL )
2017-09-05 14:00:50 +00:00
install ( TARGETS ${ CPACK_TARGETS } ${ EXTRA_ARGS } )
install ( DIRECTORY ${ CPACK_DIRS } ${ EXTRA_ARGS } )
install ( FILES ${ CPACK_FILES } ${ EXTRA_ARGS } )
2017-08-01 19:55:49 +00:00
endif ( )
2017-11-17 21:32:56 +00:00
set ( PACKAGE_TARGETS )
2018-03-06 18:25:07 +00:00
if ( CLIENT AND ( DMGTOOLS_FOUND OR HDIUTIL ) )
2018-02-05 19:22:54 +00:00
file ( MAKE_DIRECTORY bundle/client/ )
file ( MAKE_DIRECTORY bundle/server/ )
2017-11-17 21:32:44 +00:00
configure_file ( other/bundle/client/Info.plist.in bundle/client/Info.plist )
configure_file ( other/bundle/server/Info.plist.in bundle/server/Info.plist )
2017-11-09 12:35:59 +00:00
if ( HDIUTIL )
set ( DMG_PARAMS --hdiutil ${ HDIUTIL } )
elseif ( DMGTOOLS_FOUND )
set ( DMG_PARAMS --dmgtools ${ DMG } ${ HFSPLUS } ${ NEWFS_HFS } )
endif ( )
set ( DMG_TMPDIR pack_ ${ CPACK_PACKAGE_FILE_NAME } _dmg )
2017-11-08 23:16:52 +00:00
set ( DMG_MKDIRS
$ { T A R G E T _ C L I E N T } . a p p
$ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s
$ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s
$ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S
$ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / R e s o u r c e s
2017-11-16 09:28:55 +00:00
$ { T A R G E T _ S E R V E R } . a p p
$ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s
$ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / M a c O S
$ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / R e s o u r c e s
$ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / R e s o u r c e s / d a t a
$ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / R e s o u r c e s / d a t a / m a p r e s
2017-11-08 23:16:52 +00:00
)
set ( DMG_MKDIR_COMMANDS )
foreach ( dir ${ DMG_MKDIRS } )
2017-11-17 14:55:22 +00:00
list ( APPEND DMG_MKDIR_COMMANDS COMMAND ${ CMAKE_COMMAND } -E make_directory ${ DMG_TMPDIR } / ${ dir } )
2017-11-08 23:16:52 +00:00
endforeach ( )
add_custom_command ( OUTPUT ${ CPACK_PACKAGE_FILE_NAME } .dmg
2017-11-17 14:55:22 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E r e m o v e _ d i r e c t o r y $ { D M G _ T M P D I R }
2017-11-08 23:16:52 +00:00
$ { D M G _ M K D I R _ C O M M A N D S }
2017-11-16 09:28:55 +00:00
# CLIENT
2017-11-17 14:55:22 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ d i r e c t o r y $ { P R O J E C T _ S O U R C E _ D I R } / d a t a $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / R e s o u r c e s / d a t a
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / o t h e r / i c o n s / $ { T A R G E T _ C L I E N T } . i c n s $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / R e s o u r c e s /
2017-11-17 21:32:44 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y b u n d l e / c l i e n t / I n f o . p l i s t $ { P R O J E C T _ S O U R C E _ D I R } / o t h e r / b u n d l e / c l i e n t / P k g I n f o $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s /
2017-11-17 14:55:22 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ < T A R G E T _ F I L E : $ { T A R G E T _ C L I E N T } > $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S /
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ d i r e c t o r y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / s d l / m a c / l i b 6 4 / S D L 2 . f r a m e w o r k $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / S D L 2 . f r a m e w o r k
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / f r e e t y p e / m a c / l i b 6 4 / l i b f r e e t y p e . 6 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s /
2020-09-04 23:16:12 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / f f m p e g / m a c / l i b 6 4 / l i b a v c o d e c . 5 8 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s /
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / f f m p e g / m a c / l i b 6 4 / l i b a v f o r m a t . 5 8 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s /
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / f f m p e g / m a c / l i b 6 4 / l i b a v u t i l . 5 6 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s /
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / f f m p e g / m a c / l i b 6 4 / l i b s w r e s a m p l e . 3 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s /
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / f f m p e g / m a c / l i b 6 4 / l i b s w s c a l e . 5 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s /
2020-09-17 11:35:07 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / w e b s o c k e t s / m a c / l i b 6 4 / l i b w e b s o c k e t s . 1 7 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s /
2020-08-25 20:41:13 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ B I N A R Y _ D I R } / l i b s t e a m _ a p i . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s /
2020-04-15 15:31:33 +00:00
C O M M A N D $ { P Y T H O N _ E X E C U T A B L E } $ { P R O J E C T _ S O U R C E _ D I R } / s c r i p t s / d a r w i n _ s t r i p _ r p a t h . p y $ { C M A K E _ O T O O L } $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
2020-04-13 08:46:30 +00:00
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - a d d _ r p a t h @ l o a d e r _ p a t h / . . / F r a m e w o r k s $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
2020-09-08 05:48:25 +00:00
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - a d d _ r p a t h @ l o a d e r _ p a t h / . . / F r a m e w o r k s $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b a v c o d e c . 5 8 . d y l i b
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - a d d _ r p a t h @ l o a d e r _ p a t h / . . / F r a m e w o r k s $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b a v f o r m a t . 5 8 . d y l i b
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - a d d _ r p a t h @ l o a d e r _ p a t h / . . / F r a m e w o r k s $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b s w s c a l e . 5 . d y l i b
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - a d d _ r p a t h @ l o a d e r _ p a t h / . . / F r a m e w o r k s $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b s w r e s a m p l e . 3 . d y l i b
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b a v c o d e c . 5 8 . d y l i b @ r p a t h / l i b a v c o d e c . 5 8 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b a v c o d e c . 5 8 . d y l i b @ r p a t h / l i b a v c o d e c . 5 8 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b a v f o r m a t . 5 8 . d y l i b
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b a v f o r m a t . 5 8 . d y l i b @ r p a t h / l i b a v f o r m a t . 5 8 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b a v u t i l . 5 6 . d y l i b @ r p a t h / l i b a v u t i l . 5 6 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b a v u t i l . 5 6 . d y l i b @ r p a t h / l i b a v u t i l . 5 6 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b a v c o d e c . 5 8 . d y l i b
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b a v u t i l . 5 6 . d y l i b @ r p a t h / l i b a v u t i l . 5 6 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b a v f o r m a t . 5 8 . d y l i b
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b a v u t i l . 5 6 . d y l i b @ r p a t h / l i b a v u t i l . 5 6 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b s w s c a l e . 5 . d y l i b
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b a v u t i l . 5 6 . d y l i b @ r p a t h / l i b a v u t i l . 5 6 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b s w r e s a m p l e . 3 . d y l i b
2020-09-08 06:12:42 +00:00
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b s w s c a l e . 5 . d y l i b @ r p a t h / l i b s w s c a l e . 5 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
2020-09-08 05:48:25 +00:00
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b s w r e s a m p l e . 3 . d y l i b @ r p a t h / l i b s w r e s a m p l e . 3 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
2020-08-25 20:41:13 +00:00
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b f r e e t y p e . 6 . d y l i b @ r p a t h / l i b f r e e t y p e . 6 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
2020-09-17 16:29:01 +00:00
# TODO: Cleaner solution than hardcoding paths
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / h o m e / d e e n / i s o s / d d n e t / d e b i a n 6 / m a c 6 4 / l i b w e b s o c k e t s - 4 . 1 . 1 / l i b / l i b w e b s o c k e t s . 1 7 . d y l i b @ r p a t h / l i b w e b s o c k e t s . 1 7 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
2020-08-25 20:41:13 +00:00
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e $ { P R O J E C T _ B I N A R Y _ D I R } / l i b s t e a m _ a p i . d y l i b @ r p a t h / l i b s t e a m _ a p i . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ C L I E N T }
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e $ { P R O J E C T _ B I N A R Y _ D I R } / l i b s t e a m _ a p i . d y l i b @ r p a t h / l i b s t e a m _ a p i . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ C L I E N T } . a p p / C o n t e n t s / F r a m e w o r k s / l i b s t e a m _ a p i . d y l i b
2017-11-16 09:28:55 +00:00
# SERVER
2017-11-17 14:55:22 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ d i r e c t o r y $ { P R O J E C T _ S O U R C E _ D I R } / d a t a / m a p s $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / R e s o u r c e s / d a t a / m a p s
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / o t h e r / i c o n s / $ { T A R G E T _ S E R V E R } . i c n s $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / R e s o u r c e s /
2017-11-17 21:32:44 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y b u n d l e / s e r v e r / I n f o . p l i s t $ { P R O J E C T _ S O U R C E _ D I R } / o t h e r / b u n d l e / s e r v e r / P k g I n f o $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s /
2017-11-17 14:55:22 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ < T A R G E T _ F I L E : $ { T A R G E T _ S E R V E R } > $ < T A R G E T _ F I L E : $ { T A R G E T _ S E R V E R _ L A U N C H E R } > $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / M a c O S /
2020-08-25 20:41:13 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E m a k e _ d i r e c t o r y $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / F r a m e w o r k s /
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / s q l i t e 3 / m a c / l i b 6 4 / l i b s q l i t e 3 . 0 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / F r a m e w o r k s /
2020-09-17 16:29:01 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { P R O J E C T _ S O U R C E _ D I R } / d d n e t - l i b s / w e b s o c k e t s / m a c / l i b 6 4 / l i b w e b s o c k e t s . 1 7 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / F r a m e w o r k s /
2020-08-25 20:41:13 +00:00
C O M M A N D $ { P Y T H O N _ E X E C U T A B L E } $ { P R O J E C T _ S O U R C E _ D I R } / s c r i p t s / d a r w i n _ s t r i p _ r p a t h . p y $ { C M A K E _ O T O O L } $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ S E R V E R }
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - a d d _ r p a t h @ l o a d e r _ p a t h / . . / F r a m e w o r k s $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ S E R V E R }
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / u s r / l o c a l / l i b / l i b s q l i t e 3 . 0 . d y l i b @ r p a t h / l i b s q l i t e 3 . 0 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ S E R V E R }
2020-09-17 16:58:45 +00:00
C O M M A N D $ { C M A K E _ I N S T A L L _ N A M E _ T O O L } - c h a n g e / h o m e / d e e n / i s o s / d d n e t / d e b i a n 6 / m a c 6 4 / l i b w e b s o c k e t s - 4 . 1 . 1 / l i b / l i b w e b s o c k e t s . 1 7 . d y l i b @ r p a t h / l i b w e b s o c k e t s . 1 7 . d y l i b $ { D M G _ T M P D I R } / $ { T A R G E T _ S E R V E R } . a p p / C o n t e n t s / M a c O S / $ { T A R G E T _ S E R V E R }
2017-11-16 09:28:55 +00:00
# DMG
2020-06-16 16:33:57 +00:00
C O M M A N D $ { P Y T H O N _ E X E C U T A B L E } $ { P R O J E C T _ S O U R C E _ D I R } / s c r i p t s / d m g . p y c r e a t e $ { D M G _ P A R A M S } $ { C P A C K _ P A C K A G E _ F I L E _ N A M E } . d m g $ { C P A C K _ P A C K A G E _ F I L E _ N A M E } $ { D M G _ T M P D I R }
2017-11-17 13:37:29 +00:00
2017-11-17 21:32:44 +00:00
D E P E N D S
$ { T A R G E T _ C L I E N T }
2020-08-25 20:41:13 +00:00
$ { T A R G E T _ S T E A M A P I }
2017-11-17 21:32:44 +00:00
$ { T A R G E T _ S E R V E R _ L A U N C H E R }
$ { T A R G E T _ S E R V E R }
2018-02-12 22:14:14 +00:00
$ { P R O J E C T _ B I N A R Y _ D I R } / b u n d l e / c l i e n t / I n f o . p l i s t
$ { P R O J E C T _ B I N A R Y _ D I R } / b u n d l e / s e r v e r / I n f o . p l i s t
2017-11-17 21:32:44 +00:00
d a t a
o t h e r / b u n d l e / c l i e n t / P k g I n f o
o t h e r / b u n d l e / s e r v e r / P k g I n f o
o t h e r / i c o n s / $ { T A R G E T _ C L I E N T } . i c n s
o t h e r / i c o n s / $ { T A R G E T _ S E R V E R } . i c n s
s c r i p t s / d m g . p y
2017-11-08 23:16:52 +00:00
)
add_custom_target ( package_dmg DEPENDS ${ CPACK_PACKAGE_FILE_NAME } .dmg )
2017-11-17 21:32:56 +00:00
list ( APPEND PACKAGE_TARGETS package_dmg )
2017-11-08 23:16:52 +00:00
endif ( )
2017-09-05 14:00:50 +00:00
foreach ( ext zip tar.gz tar.xz )
set ( TAR_MODE c )
2017-09-05 19:42:09 +00:00
set ( TAR_EXTRA_ARGS )
2017-09-05 14:00:50 +00:00
string ( REPLACE . _ EXT_SLUG ${ ext } )
2017-11-09 12:35:59 +00:00
set ( TMPDIR pack_ ${ CPACK_PACKAGE_FILE_NAME } _ ${ EXT_SLUG } / ${ CPACK_PACKAGE_FILE_NAME } )
set ( COPY_FILE_COMMANDS )
set ( COPY_DIR_COMMANDS )
set ( COPY_TARGET_COMMANDS )
2018-01-14 14:57:02 +00:00
set ( STRIP_TARGET_COMMANDS )
2017-11-09 12:35:59 +00:00
foreach ( file ${ CPACK_FILES } )
2017-11-17 14:55:22 +00:00
list ( APPEND COPY_FILE_COMMANDS COMMAND ${ CMAKE_COMMAND } -E copy ${ PROJECT_SOURCE_DIR } / ${ file } ${ TMPDIR } / )
2017-11-09 12:35:59 +00:00
endforeach ( )
foreach ( dir ${ CPACK_DIRS } )
2017-11-17 14:55:22 +00:00
list ( APPEND COPY_DIR_COMMANDS COMMAND ${ CMAKE_COMMAND } -E copy_directory ${ PROJECT_SOURCE_DIR } / ${ dir } ${ TMPDIR } / ${ dir } )
2017-11-09 12:35:59 +00:00
endforeach ( )
foreach ( target ${ CPACK_TARGETS } )
2017-11-17 14:55:22 +00:00
list ( APPEND COPY_TARGET_COMMANDS COMMAND ${ CMAKE_COMMAND } -E copy $< TARGET_FILE:${target} > ${ TMPDIR } / )
2018-01-14 15:11:09 +00:00
list ( APPEND STRIP_TARGET_COMMANDS COMMAND strip -s ${ TMPDIR } / $< TARGET_FILE_NAME:${target} > )
2017-11-09 12:35:59 +00:00
endforeach ( )
2017-09-05 14:00:50 +00:00
if ( ext STREQUAL zip )
2017-09-05 19:42:09 +00:00
set ( TAR_EXTRA_ARGS --format=zip )
2017-09-05 14:00:50 +00:00
elseif ( ext STREQUAL tar.gz )
set ( TAR_MODE cz )
elseif ( ext STREQUAL tar.xz )
set ( TAR_MODE cJ )
endif ( )
add_custom_command ( OUTPUT ${ CPACK_PACKAGE_FILE_NAME } . ${ ext }
2017-11-17 14:55:22 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E r e m o v e _ d i r e c t o r y $ { T M P D I R }
C O M M A N D $ { C M A K E _ C O M M A N D } - E m a k e _ d i r e c t o r y $ { T M P D I R }
2017-09-05 19:42:09 +00:00
$ { C O P Y _ F I L E _ C O M M A N D S }
$ { C O P Y _ D I R _ C O M M A N D S }
$ { C O P Y _ T A R G E T _ C O M M A N D S }
2018-01-14 14:57:02 +00:00
$ { S T R I P _ T A R G E T _ C O M M A N D S }
2017-11-17 14:55:22 +00:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E c h d i r p a c k _ $ { C P A C K _ P A C K A G E _ F I L E _ N A M E } _ $ { E X T _ S L U G } $ { C M A K E _ C O M M A N D } - E t a r $ { T A R _ M O D E } . . / $ { C P A C K _ P A C K A G E _ F I L E _ N A M E } . $ { e x t } $ { T A R _ E X T R A _ A R G S } - - $ { C P A C K _ P A C K A G E _ F I L E _ N A M E } /
2017-11-17 13:37:29 +00:00
D E P E N D S $ { C P A C K _ T A R G E T S }
2017-09-05 14:00:50 +00:00
)
add_custom_target ( package_ ${ EXT_SLUG } DEPENDS ${ CPACK_PACKAGE_FILE_NAME } . ${ ext } )
2017-11-17 21:32:56 +00:00
list ( APPEND PACKAGE_TARGETS package_ ${ EXT_SLUG } )
2017-09-05 14:00:50 +00:00
endforeach ( )
set ( PACKAGE_DEFAULT tar_xz )
if ( TARGET_OS STREQUAL "windows" )
set ( PACKAGE_DEFAULT zip )
2017-11-08 23:16:52 +00:00
elseif ( TARGET_OS STREQUAL "mac" )
set ( PACKAGE_DEFAULT dmg )
2017-09-05 14:00:50 +00:00
endif ( )
add_custom_target ( package_default DEPENDS package_ ${ PACKAGE_DEFAULT } )
2017-11-17 21:32:56 +00:00
add_custom_target ( package_all DEPENDS ${ PACKAGE_TARGETS } )
2017-09-05 14:00:50 +00:00
# Unset these variables, they might do something in the future of CPack.
unset ( CPACK_SOURCE_FILES )
unset ( CPACK_SOURCE_FILES_INVERTED )
unset ( CPACK_TARGETS )
unset ( CPACK_DIRS )
unset ( CPACK_FILES )
2017-08-01 19:55:49 +00:00
include ( CPack )
2017-03-03 12:39:06 +00:00
########################################################################
2017-03-03 14:23:18 +00:00
# COMPILER-SPECIFICS
2017-03-03 12:39:06 +00:00
########################################################################
2017-03-03 12:29:35 +00:00
# In the future (CMake 3.8.0+), use source_group(TREE ...)
macro ( source_group_tree dir )
file ( GLOB ents RELATIVE ${ PROJECT_SOURCE_DIR } / ${ dir } ${ PROJECT_SOURCE_DIR } / ${ dir } /* )
foreach ( ent ${ ents } )
if ( IS_DIRECTORY ${ PROJECT_SOURCE_DIR } / ${ dir } / ${ ent } )
source_group_tree ( ${ dir } / ${ ent } )
else ( )
string ( REPLACE "/" "\\" group ${ dir } )
source_group ( ${ group } FILES ${ PROJECT_SOURCE_DIR } / ${ dir } / ${ ent } )
endif ( )
endforeach ( )
endmacro ( )
source_group_tree ( src )
2017-03-03 12:39:06 +00:00
2020-08-20 10:17:44 +00:00
if ( ANTIBOT )
2020-12-09 09:17:11 +00:00
# Allow the antibot library to use functions from the server binary.
add_c_compiler_flag_if_supported ( OUR_FLAGS_LINK -rdynamic )
2020-08-20 10:17:44 +00:00
set_own_rpath ( ${ TARGET_SERVER } )
endif ( )
2017-03-03 14:04:13 +00:00
set ( TARGETS ${ TARGETS_OWN } ${ TARGETS_DEP } )
foreach ( target ${ TARGETS } )
if ( MSVC )
2017-03-12 15:28:04 +00:00
target_compile_options ( ${ target } PRIVATE $< $<NOT:${DBG} > :/MT> $< ${DBG}:/MTd > ) # Use static CRT
2017-03-12 15:27:34 +00:00
target_compile_options ( ${ target } PRIVATE /MP ) # Use multiple cores
2017-03-07 14:24:08 +00:00
target_compile_options ( ${ target } PRIVATE /EHsc ) # Only catch C++ exceptions with catch.
2017-03-03 14:04:13 +00:00
target_compile_options ( ${ target } PRIVATE /GS ) # Protect the stack pointer.
2017-03-03 14:10:21 +00:00
target_compile_options ( ${ target } PRIVATE /wd4996 ) # Use of non-_s functions.
2017-03-03 14:04:13 +00:00
endif ( )
2020-09-08 12:13:24 +00:00
if ( OUR_FLAGS_LINK )
target_link_libraries ( ${ target } ${ OUR_FLAGS_LINK } )
endif ( )
2018-01-22 18:10:57 +00:00
if ( OUR_FLAGS )
target_compile_options ( ${ target } PRIVATE ${ OUR_FLAGS } )
endif ( )
if ( DEFINE_FORTIFY_SOURCE )
2019-12-17 21:04:21 +00:00
if ( MINGW )
target_compile_definitions ( ${ target } PRIVATE $< $<NOT:$<CONFIG:Debug > >:_FORTIFY_SOURCE=0> ) # Currently broken in MinGW, see https://sourceforge.net/p/mingw-w64/discussion/723798/thread/b9d24f041f/
else ( )
target_compile_definitions ( ${ target } PRIVATE $< $<NOT:$<CONFIG:Debug > >:_FORTIFY_SOURCE=2> ) # Detect some buffer overflows.
endif ( )
2017-07-26 02:30:56 +00:00
endif ( )
endforeach ( )
foreach ( target ${ TARGETS_LINK } )
2018-06-19 12:45:53 +00:00
if ( MSVC )
set_property ( TARGET ${ target } APPEND PROPERTY LINK_FLAGS /SAFESEH:NO ) # Disable SafeSEH because the shipped libraries don't support it (would cause error LNK2026 otherwise).
endif ( )
2017-07-26 02:30:56 +00:00
if ( TARGET_OS STREQUAL "mac" )
target_link_libraries ( ${ target } -stdlib=libc++ )
endif ( )
2018-09-19 05:58:17 +00:00
if ( ( MINGW OR TARGET_OS STREQUAL "linux" ) AND PREFER_BUNDLED_LIBS )
2018-05-22 17:42:48 +00:00
# Statically link the standard libraries with on MinGW/Linux so we don't
# have to ship them as DLLs.
2017-07-31 23:21:34 +00:00
target_link_libraries ( ${ target } -static-libgcc )
target_link_libraries ( ${ target } -static-libstdc++ )
endif ( )
2017-03-03 14:04:13 +00:00
endforeach ( )
foreach ( target ${ TARGETS_OWN } )
2018-01-14 13:36:25 +00:00
if ( ( CMAKE_VERSION VERSION_GREATER 3.1 OR CMAKE_VERSION VERSION_EQUAL 3.1 ) AND NOT TARGET_OS STREQUAL "mac" )
2017-11-23 02:10:25 +00:00
set_property ( TARGET ${ target } PROPERTY CXX_STANDARD 11 )
2018-01-14 13:36:25 +00:00
set_property ( TARGET ${ target } PROPERTY CXX_STANDARD_REQUIRED ON )
2017-11-23 02:10:25 +00:00
endif ( )
2017-03-03 14:04:13 +00:00
if ( MSVC )
target_compile_options ( ${ target } PRIVATE /wd4244 ) # Possible loss of data (float -> int, int -> float, etc.).
2017-03-12 15:23:17 +00:00
target_compile_options ( ${ target } PRIVATE /wd4267 ) # Possible loss of data (size_t - int on win64).
2017-03-03 14:04:13 +00:00
target_compile_options ( ${ target } PRIVATE /wd4800 ) # Implicit conversion of int to bool.
2018-01-22 18:10:57 +00:00
endif ( )
if ( OUR_FLAGS_OWN )
target_compile_options ( ${ target } PRIVATE ${ OUR_FLAGS_OWN } )
2017-03-03 14:04:13 +00:00
endif ( )
2018-02-12 22:14:14 +00:00
target_include_directories ( ${ target } PRIVATE ${ PROJECT_BINARY_DIR } /src )
2018-02-20 16:11:18 +00:00
target_include_directories ( ${ target } PRIVATE src )
2017-03-03 14:04:13 +00:00
target_compile_definitions ( ${ target } PRIVATE $< $<CONFIG:Debug > :CONF_DEBUG> )
2020-08-03 14:07:36 +00:00
target_include_directories ( ${ target } PRIVATE ${ SQLite3_INCLUDE_DIRS } ${ ZLIB_INCLUDE_DIRS } )
2017-10-20 09:52:18 +00:00
target_compile_definitions ( ${ target } PRIVATE GLEW_STATIC )
2018-06-05 19:22:40 +00:00
if ( CRYPTO_FOUND )
target_compile_definitions ( ${ target } PRIVATE CONF_OPENSSL )
2019-04-11 20:00:33 +00:00
target_include_directories ( ${ target } PRIVATE ${ CRYPTO_INCLUDE_DIRS } )
2018-06-05 19:22:40 +00:00
endif ( )
2017-03-03 14:04:13 +00:00
if ( WEBSOCKETS )
2017-03-07 12:03:37 +00:00
target_compile_definitions ( ${ target } PRIVATE CONF_WEBSOCKETS )
2018-02-14 11:55:04 +00:00
target_include_directories ( ${ target } PRIVATE ${ WEBSOCKETS_INCLUDE_DIRS } )
2017-03-03 14:04:13 +00:00
endif ( )
2020-04-14 10:11:50 +00:00
if ( UPNP )
target_compile_definitions ( ${ target } PRIVATE CONF_UPNP )
2020-04-19 13:14:21 +00:00
target_include_directories ( ${ target } PRIVATE ${ MINIUPNPC_INCLUDE_DIRS } )
2020-04-14 10:11:50 +00:00
endif ( )
2020-01-01 15:56:48 +00:00
if ( VIDEORECORDER )
2017-10-26 22:42:33 +00:00
target_compile_definitions ( ${ target } PRIVATE CONF_VIDEORECORDER )
endif ( )
2020-03-11 00:58:50 +00:00
if ( ANTIBOT )
target_compile_definitions ( ${ target } PRIVATE CONF_ANTIBOT )
endif ( )
2017-07-22 23:36:36 +00:00
if ( MYSQL )
target_compile_definitions ( ${ target } PRIVATE CONF_SQL )
target_include_directories ( ${ target } PRIVATE ${ MYSQL_INCLUDE_DIRS } )
endif ( )
2020-09-24 15:11:02 +00:00
if ( AUTOUPDATE AND NOT STEAM )
2018-09-20 01:01:31 +00:00
target_compile_definitions ( ${ target } PRIVATE CONF_AUTOUPDATE )
endif ( )
2020-09-24 15:11:02 +00:00
if ( INFORM_UPDATE AND NOT STEAM )
2020-09-23 20:42:54 +00:00
target_compile_definitions ( ${ target } PRIVATE CONF_INFORM_UPDATE )
endif ( )
2020-09-24 15:11:02 +00:00
if ( STEAM )
target_compile_definitions ( ${ target } PRIVATE PLATFORM_SUFFIX= "-steam" )
endif ( )
2020-09-24 15:06:03 +00:00
if ( VERSION )
target_compile_definitions ( ${ target } PRIVATE GAME_RELEASE_VERSION= "${VERSION}" )
endif ( )
2017-03-03 14:04:13 +00:00
endforeach ( )
2017-03-12 14:56:44 +00:00
foreach ( target ${ TARGETS_DEP } )
2017-03-03 14:04:13 +00:00
if ( MSVC )
target_compile_options ( ${ target } PRIVATE /W0 )
endif ( )
2018-02-12 20:29:43 +00:00
if ( OUR_FLAGS_DEP )
target_compile_options ( ${ target } PRIVATE ${ OUR_FLAGS_DEP } )
endif ( )
2017-03-03 14:04:13 +00:00
endforeach ( )