mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-26 14:01:05 +00:00
- renamed internal CMake variables to not contain the project name.
This commit is contained in:
parent
aefb3ec216
commit
b307db2346
3 changed files with 71 additions and 86 deletions
|
@ -76,21 +76,21 @@ function( add_pk3 PK3_NAME PK3_DIR )
|
|||
# Generate target name. Just use "pk3" for main pk3 target.
|
||||
string( REPLACE "." "_" PK3_TARGET ${PK3_NAME} )
|
||||
|
||||
if( NOT DEMOLITION_OUTPUT_OLDSTYLE )
|
||||
add_custom_command( OUTPUT ${DEMOLITION_OUTPUT_DIR}/${PK3_NAME}
|
||||
COMMAND zipdir -udf ${PK3_ZIPDIR_OPTIONS} ${DEMOLITION_OUTPUT_DIR}/${PK3_NAME} ${PK3_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DEMOLITION_OUTPUT_DIR}/${PK3_NAME} $<TARGET_FILE_DIR:demolition>/${PK3_NAME}
|
||||
if( NOT COMPILE_OUTPUT_OLDSTYLE )
|
||||
add_custom_command( OUTPUT ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME}
|
||||
COMMAND zipdir -udf ${PK3_ZIPDIR_OPTIONS} ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME} ${PK3_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME} $<TARGET_FILE_DIR:demolition>/${PK3_NAME}
|
||||
DEPENDS zipdir )
|
||||
else()
|
||||
add_custom_command( OUTPUT ${DEMOLITION_OUTPUT_DIR}/${PK3_NAME}
|
||||
COMMAND zipdir -udf ${PK3_ZIPDIR_OPTIONS} ${DEMOLITION_OUTPUT_DIR}/${PK3_NAME} ${PK3_DIR}
|
||||
add_custom_command( OUTPUT ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME}
|
||||
COMMAND zipdir -udf ${PK3_ZIPDIR_OPTIONS} ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME} ${PK3_DIR}
|
||||
DEPENDS zipdir )
|
||||
endif()
|
||||
# Create a list of source files for this PK3, for use in the IDE
|
||||
# Phase 1: Create a list of all source files for this PK3 archive, except
|
||||
# for a couple of strife image file names that confuse CMake.
|
||||
file(GLOB_RECURSE PK3_SRCS ${PK3_DIR}/*)
|
||||
# Exclude from the source list some demolition .png files with brackets in the
|
||||
# Exclude from the source list some files with brackets in the
|
||||
# file names here, because they confuse CMake.
|
||||
# This only affects the list of source files shown in the IDE.
|
||||
# It does not actually remove the files from the PK3 archive.
|
||||
|
@ -109,7 +109,7 @@ function( add_pk3 PK3_NAME PK3_DIR )
|
|||
# rebuild each time since their dependency has "changed."
|
||||
add_custom_target( ${PK3_TARGET} ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E touch $<TARGET_FILE:zipdir>
|
||||
DEPENDS ${DEMOLITION_OUTPUT_DIR}/${PK3_NAME}
|
||||
DEPENDS ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME}
|
||||
SOURCES ${PK3_SRCS})
|
||||
# Phase 3: Assign source files to a nice folder structure in the IDE
|
||||
assort_pk3_source_folder("Source Files" ${PK3_DIR})
|
||||
|
@ -140,14 +140,14 @@ IF( NOT CMAKE_BUILD_TYPE )
|
|||
FORCE )
|
||||
ENDIF()
|
||||
|
||||
set( DEMOLITION_OUTPUT_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Directory where engine data and the executable will be created." )
|
||||
set( DEMOLITION_EXE_NAME "demolition" CACHE FILEPATH "Name of the executable to create" )
|
||||
set( COMPILE_OUTPUT_DIECTRORY ${CMAKE_BINARY_DIR} CACHE PATH "Directory where engine data and the executable will be created." )
|
||||
set( COMPILE_EXE_NAME "demolition" CACHE FILEPATH "Name of the executable to create" )
|
||||
if( MSVC )
|
||||
# Allow the user to use DEMOLITION_OUTPUT_DIR as a single release point.
|
||||
# Use demolition, demolitiond, demolition64, and demolitiond64 for the binary names
|
||||
option( DEMOLITION_OUTPUT_OLDSTYLE "Don't use Release/Debug directories." OFF )
|
||||
# Allow the user to use COMPILE_OUTPUT_DIECTRORY as a single release point.
|
||||
# Use different names for the various compile targets.
|
||||
option( COMPILE_OUTPUT_OLDSTYLE "Don't use Release/Debug directories." OFF )
|
||||
else()
|
||||
set( DEMOLITION_OUTPUT_OLDSTYLE OFF )
|
||||
set( COMPILE_OUTPUT_OLDSTYLE OFF )
|
||||
endif()
|
||||
|
||||
# Replacement variables for a possible long list of C/C++ compilers compatible with GCC
|
||||
|
@ -176,7 +176,7 @@ find_package( ZLIB )
|
|||
include( TargetArch )
|
||||
|
||||
# Things for later. Currently we have no VM and no Vulkan
|
||||
#if( ${DEMOLITION_TARGET_ARCH} MATCHES "x86_64" )
|
||||
#if( ${TARGET_ARCHITECTURE} MATCHES "x86_64" )
|
||||
# set( HAVE_VM_JIT ON )
|
||||
# option (HAVE_VULKAN "Enable Vulkan support" ON)
|
||||
#endif()
|
||||
|
@ -208,8 +208,8 @@ if( MSVC )
|
|||
|
||||
|
||||
# Avoid CRT DLL dependancies in release builds, optionally generate assembly output for checking crash locations.
|
||||
option( DEMOLITION_GENERATE_ASM "Generate assembly output." OFF )
|
||||
if( DEMOLITION_GENERATE_ASM )
|
||||
option( COMPILE_GENERATE_ASM "Generate assembly output." OFF )
|
||||
if( COMPILE_GENERATE_ASM )
|
||||
set( REL_C_FLAGS "/MT /Oy /Oi /FAcs /GS-" )
|
||||
else()
|
||||
set( REL_C_FLAGS "/MT /Oy /Oi /GS-" )
|
||||
|
@ -323,7 +323,7 @@ if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB )
|
|||
message( STATUS "Using system zlib, includes found at ${ZLIB_INCLUDE_DIR}" )
|
||||
else()
|
||||
message( STATUS "Using internal zlib" )
|
||||
set( SKIP_INSTALL_ALL TRUE ) # Avoid installing zlib alongside demolition
|
||||
set( SKIP_INSTALL_ALL TRUE ) # Avoid installing zlib
|
||||
add_subdirectory( libraries/zlib )
|
||||
set( ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libraries/zlib )
|
||||
set( ZLIB_LIBRARIES z )
|
||||
|
@ -348,7 +348,7 @@ endif()
|
|||
# message( STATUS "Using system asmjit, includes found at ${ASMJIT_INCLUDE_DIR}" )
|
||||
# else()
|
||||
# message( STATUS "Using internal asmjit" )
|
||||
# set( SKIP_INSTALL_ALL TRUE ) # Avoid installing asmjit alongside demolition
|
||||
# set( SKIP_INSTALL_ALL TRUE ) # Avoid installing asmjit
|
||||
# add_subdirectory( libraries/asmjit )
|
||||
# set( ASMJIT_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit )
|
||||
# set( ASMJIT_LIBRARIES asmjit )
|
||||
|
@ -393,7 +393,7 @@ endif()
|
|||
#if( WIN32 )
|
||||
# set( INSTALL_DOCS_PATH docs CACHE STRING "Directory where the documentation will be placed during install." )
|
||||
#else()
|
||||
# set( INSTALL_DOCS_PATH share/doc/${DEMOLITION_EXE_NAME} CACHE STRING "Directory where the demolition documentation will be placed during install." )
|
||||
# set( INSTALL_DOCS_PATH share/doc/${COMPILE_EXE_NAME} CACHE STRING "Directory where the documentation will be placed during install." )
|
||||
#endif()
|
||||
#install(DIRECTORY docs/
|
||||
# DESTINATION ${INSTALL_DOCS_PATH}
|
||||
|
|
|
@ -36,20 +36,20 @@ if( APPLE )
|
|||
option( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON )
|
||||
endif()
|
||||
|
||||
target_architecture(DEMOLITION_TARGET_ARCH)
|
||||
message(STATUS "Architecture is ${DEMOLITION_TARGET_ARCH}")
|
||||
target_architecture(TARGET_ARCHITECTURE)
|
||||
message(STATUS "Architecture is ${TARGET_ARCHITECTURE}")
|
||||
|
||||
# Right now only 64 bit is supported.
|
||||
if( ${DEMOLITION_TARGET_ARCH} MATCHES "x86_64" )
|
||||
if( ${TARGET_ARCHITECTURE} MATCHES "x86_64" )
|
||||
set( X64 64 )
|
||||
endif()
|
||||
|
||||
if( X64 OR ${DEMOLITION_TARGET_ARCH} MATCHES "i386" )
|
||||
if( X64 OR ${TARGET_ARCHITECTURE} MATCHES "i386" )
|
||||
add_definitions( -DARCH_IA32 )
|
||||
endif()
|
||||
|
||||
if( NOT DEMOLITION_LIBS )
|
||||
set( DEMOLITION_LIBS "" )
|
||||
if( NOT PROJECT_LIBRARIES )
|
||||
set( PROJECT_LIBRARIES "" )
|
||||
endif()
|
||||
|
||||
if( WIN32 )
|
||||
|
@ -72,7 +72,7 @@ if( WIN32 )
|
|||
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../platform/Windows/lib/32)
|
||||
endif()
|
||||
|
||||
set( DEMOLITION_LIBS
|
||||
set( PROJECT_LIBRARIES
|
||||
opengl32
|
||||
wsock32
|
||||
winmm
|
||||
|
@ -111,12 +111,12 @@ if( WIN32 )
|
|||
|
||||
|
||||
if( NOT DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} DelayImp )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} DelayImp )
|
||||
endif()
|
||||
|
||||
if( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
||||
if( DX_dxguid_LIBRARY )
|
||||
list( APPEND DEMOLITION_LIBS "${DX_dxguid_LIBRARY}" )
|
||||
list( APPEND PROJECT_LIBRARIES "${DX_dxguid_LIBRARY}" )
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
@ -138,7 +138,7 @@ else()
|
|||
pkg_check_modules( GTK3 gtk+-3.0 )
|
||||
if( GTK3_FOUND )
|
||||
if( NOT DYN_GTK )
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} ${GTK3_LIBRARIES} )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${GTK3_LIBRARIES} )
|
||||
endif()
|
||||
include_directories( ${GTK3_INCLUDE_DIRS} )
|
||||
link_directories( ${GTK3_LIBRARY_DIRS} )
|
||||
|
@ -146,7 +146,7 @@ else()
|
|||
pkg_check_modules( GTK2 gtk+-2.0 )
|
||||
if( GTK2_FOUND )
|
||||
if( NOT DYN_GTK )
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} ${GTK2_LIBRARIES} )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${GTK2_LIBRARIES} )
|
||||
endif()
|
||||
include_directories( ${GTK2_INCLUDE_DIRS} )
|
||||
link_directories( ${GTK2_LIBRARY_DIRS} )
|
||||
|
@ -169,7 +169,7 @@ else()
|
|||
if( NOT APPLE OR NOT OSX_COCOA_BACKEND )
|
||||
find_package( SDL2 REQUIRED )
|
||||
include_directories( "${SDL2_INCLUDE_DIR}" )
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} "${SDL2_LIBRARY}" )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${SDL2_LIBRARY}" )
|
||||
endif()
|
||||
|
||||
find_path( FPU_CONTROL_DIR fpu_control.h )
|
||||
|
@ -187,7 +187,7 @@ if( NOT NO_OPENAL )
|
|||
include_directories( ${OPENAL_INCLUDE_DIR} )
|
||||
mark_as_advanced(CLEAR OPENAL_LIBRARY)
|
||||
if( OPENAL_LIBRARY )
|
||||
set( DEMOLITION_LIBS ${OPENAL_LIBRARY} ${DEMOLITION_LIBS} )
|
||||
set( PROJECT_LIBRARIES ${OPENAL_LIBRARY} ${PROJECT_LIBRARIES} )
|
||||
else()
|
||||
set( NO_OPENAL ON )
|
||||
endif()
|
||||
|
@ -224,23 +224,16 @@ find_package( FluidSynth )
|
|||
|
||||
# Decide on SSE setup
|
||||
|
||||
set( SSE_MATTERS NO )
|
||||
|
||||
# with global use of SSE 2 we do not need special handling for selected files
|
||||
if (NOT DEMOLITION_USE_SSE2)
|
||||
# SSE only matters on 32-bit targets. We check compiler flags to know if we can do it.
|
||||
if( CMAKE_SIZEOF_VOID_P MATCHES "4" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ppc )
|
||||
CHECK_CXX_COMPILER_FLAG( "-msse2 -mfpmath=sse" CAN_DO_MFPMATH )
|
||||
CHECK_CXX_COMPILER_FLAG( -arch:SSE2 CAN_DO_ARCHSSE2 )
|
||||
if( CAN_DO_MFPMATH )
|
||||
set( SSE1_ENABLE "-msse -mfpmath=sse" )
|
||||
set( SSE2_ENABLE "-msse2 -mfpmath=sse" )
|
||||
set( SSE_MATTERS YES )
|
||||
elseif( CAN_DO_ARCHSSE2 )
|
||||
set( SSE1_ENABLE -arch:SSE )
|
||||
set( SSE2_ENABLE -arch:SSE2 )
|
||||
set( SSE_MATTERS YES )
|
||||
endif()
|
||||
# SSE only matters on 32-bit targets. We check compiler flags to know if we can do it.
|
||||
if( CMAKE_SIZEOF_VOID_P MATCHES "4" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ppc )
|
||||
CHECK_CXX_COMPILER_FLAG( "-msse2 -mfpmath=sse" CAN_DO_MFPMATH )
|
||||
CHECK_CXX_COMPILER_FLAG( -arch:SSE2 CAN_DO_ARCHSSE2 )
|
||||
if( CAN_DO_MFPMATH )
|
||||
set( SSE1_ENABLE "-msse -mfpmath=sse" )
|
||||
set( SSE2_ENABLE "-msse2 -mfpmath=sse" )
|
||||
elseif( CAN_DO_ARCHSSE2 )
|
||||
set( SSE1_ENABLE -arch:SSE )
|
||||
set( SSE2_ENABLE -arch:SSE2 )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -416,7 +409,7 @@ if( UNIX )
|
|||
add_definitions( -DNO_CLOCK_GETTIME )
|
||||
endif()
|
||||
else()
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} rt )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} rt )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -432,9 +425,9 @@ add_custom_target( revision_check ALL
|
|||
# required libraries
|
||||
|
||||
message( STATUS "Fluid synth libs: ${FLUIDSYNTH_LIBRARIES}" )
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${GME_LIBRARIES}" "${CMAKE_DL_LIBS}" )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${GME_LIBRARIES}" "${CMAKE_DL_LIBS}" )
|
||||
if (HAVE_VULKAN)
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} "glslang" "SPIRV" "OGLCompiler")
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "glslang" "SPIRV" "OGLCompiler")
|
||||
endif()
|
||||
|
||||
# Ugh... These precompiled dependencies need to go.
|
||||
|
@ -448,20 +441,20 @@ endif()
|
|||
if( ${HAVE_VM_JIT} )
|
||||
add_definitions( -DHAVE_VM_JIT )
|
||||
include_directories( "${ASMJIT_INCLUDE_DIR}" )
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} "${ASMJIT_LIBRARIES}")
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${ASMJIT_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
if( SNDFILE_FOUND )
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} "${SNDFILE_LIBRARIES}" )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${SNDFILE_LIBRARIES}" )
|
||||
include_directories( "${SNDFILE_INCLUDE_DIRS}" )
|
||||
endif()
|
||||
if( MPG123_FOUND )
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} "${MPG123_LIBRARIES}" )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${MPG123_LIBRARIES}" )
|
||||
include_directories( "${MPG123_INCLUDE_DIR}" )
|
||||
endif()
|
||||
if( NOT DYN_FLUIDSYNTH )
|
||||
if( FLUIDSYNTH_FOUND )
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} "${FLUIDSYNTH_LIBRARIES}" )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${FLUIDSYNTH_LIBRARIES}" )
|
||||
include_directories( "${FLUIDSYNTH_INCLUDE_DIR}" )
|
||||
endif()
|
||||
endif()
|
||||
|
@ -856,17 +849,17 @@ set_source_files_properties( ${NOT_COMPILED_SOURCE_FILES} PROPERTIES HEADER_FILE
|
|||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
|
||||
# [BL] Solaris requires these to be explicitly linked.
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} nsl socket)
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} nsl socket)
|
||||
endif()
|
||||
|
||||
if( UNIX )
|
||||
find_package( Backtrace )
|
||||
if(Backtrace_FOUND)
|
||||
set( DEMOLITION_LIBS ${DEMOLITION_LIBS} ${Backtrace_LIBRARIES} )
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${Backtrace_LIBRARIES} )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries( demolition ${DEMOLITION_LIBS} gdtoa lzma duke3d blood rr sw zmusic )
|
||||
target_link_libraries( demolition ${PROJECT_LIBRARIES} gdtoa lzma duke3d blood rr sw zmusic )
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
@ -903,29 +896,29 @@ include_directories(
|
|||
add_dependencies( demolition revision_check )
|
||||
|
||||
# Due to some quirks, we need to do this in this order
|
||||
if( NOT DEMOLITION_OUTPUT_OLDSTYLE )
|
||||
if( NOT COMPILE_OUTPUT_OLDSTYLE )
|
||||
# RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4.
|
||||
# Linux distributions are slow to adopt 2.6. :(
|
||||
set_target_properties( demolition PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${DEMOLITION_OUTPUT_DIR} )
|
||||
set_target_properties( demolition PROPERTIES OUTPUT_NAME ${DEMOLITION_EXE_NAME} )
|
||||
set_target_properties( demolition PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${COMPILE_OUTPUT_DIECTRORY} )
|
||||
set_target_properties( demolition PROPERTIES OUTPUT_NAME ${EXECUTABLE_NAME} )
|
||||
else()
|
||||
set_target_properties( demolition PROPERTIES
|
||||
RUNTIME_OUTPUT_NAME ${DEMOLITION_EXE_NAME}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${DEMOLITION_OUTPUT_DIR}
|
||||
RUNTIME_OUTPUT_NAME_DEBUG ${DEMOLITION_EXE_NAME}d
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${DEMOLITION_OUTPUT_DIR}
|
||||
RUNTIME_OUTPUT_NAME_MINSIZEREL ${DEMOLITION_EXE_NAME}msr
|
||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${DEMOLITION_OUTPUT_DIR}
|
||||
RUNTIME_OUTPUT_NAME_RELWITHDEBINFO ${DEMOLITION_EXE_NAME}rd
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${DEMOLITION_OUTPUT_DIR}
|
||||
RUNTIME_OUTPUT_NAME ${EXECUTABLE_NAME}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${COMPILE_OUTPUT_DIECTRORY}
|
||||
RUNTIME_OUTPUT_NAME_DEBUG ${EXECUTABLE_NAME}d
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${COMPILE_OUTPUT_DIECTRORY}
|
||||
RUNTIME_OUTPUT_NAME_MINSIZEREL ${EXECUTABLE_NAME}msr
|
||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${COMPILE_OUTPUT_DIECTRORY}
|
||||
RUNTIME_OUTPUT_NAME_RELWITHDEBINFO ${EXECUTABLE_NAME}rd
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${COMPILE_OUTPUT_DIECTRORY}
|
||||
)
|
||||
endif()
|
||||
|
||||
if( MSVC )
|
||||
option( DEMOLITION_GENERATE_MAPFILE "Generate .map file for debugging." OFF )
|
||||
option( COMPILE_GENERATE_MAPFILE "Generate .map file for debugging." OFF )
|
||||
set( LINKERSTUFF "/MANIFEST:NO" )
|
||||
|
||||
if( DEMOLITION_GENERATE_MAPFILE )
|
||||
if( COMPILE_GENERATE_MAPFILE )
|
||||
set( LINKERSTUFF "${LINKERSTUFF} /MAP" )
|
||||
endif()
|
||||
set_target_properties(demolition PROPERTIES LINK_FLAGS ${LINKERSTUFF})
|
||||
|
@ -938,7 +931,7 @@ if( MSVC )
|
|||
endif()
|
||||
|
||||
if( NOT WIN32 AND NOT APPLE )
|
||||
FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${DEMOLITION_OUTPUT_DIR}/${DEMOLITION_EXE_NAME} ]; then ln -sf ${CMAKE_CURRENT_BINARY_DIR}/${DEMOLITION_EXE_NAME} ${DEMOLITION_OUTPUT_DIR}/${DEMOLITION_EXE_NAME}; fi" )
|
||||
FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${COMPILE_OUTPUT_DIECTRORY}/${EXECUTABLE_NAME} ]; then ln -sf ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME} ${COMPILE_OUTPUT_DIECTRORY}/${EXECUTABLE_NAME}; fi" )
|
||||
add_custom_command( TARGET demolition POST_BUILD
|
||||
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make
|
||||
COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make )
|
||||
|
@ -946,7 +939,7 @@ endif()
|
|||
|
||||
#add_custom_command(TARGET demolition POST_BUILD
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
# ${CMAKE_SOURCE_DIR}/soundfont/gdemolition.sf2 $<TARGET_FILE_DIR:demolition>/soundfonts/gdemolition.sf2
|
||||
# ${CMAKE_SOURCE_DIR}/soundfont/demolition.sf2 $<TARGET_FILE_DIR:demolition>/soundfonts/demolition.sf2
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
# ${CMAKE_SOURCE_DIR}/fm_banks/GENMIDI.GS.wopl $<TARGET_FILE_DIR:demolition>/fm_banks/GENMIDI.GS.wopl
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
|
@ -957,14 +950,6 @@ if( CMAKE_COMPILER_IS_GNUCXX )
|
|||
# GCC misoptimizes this file
|
||||
#set_source_files_properties( oplsynth/fmopl.cpp PROPERTIES COMPILE_FLAGS "-fno-tree-dominator-opts -fno-tree-fre" )
|
||||
endif()
|
||||
#if( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
||||
# Need to enable intrinsics for these files.
|
||||
# if( SSE_MATTERS )
|
||||
# set_source_files_properties(
|
||||
# utility/x86.cpp
|
||||
# PROPERTIES COMPILE_FLAGS "-msse2 -mmmx" )
|
||||
# endif()
|
||||
#endif()
|
||||
|
||||
if( APPLE )
|
||||
set( LINK_FRAMEWORKS "-framework Cocoa -framework IOKit -framework OpenGL")
|
||||
|
@ -983,9 +968,9 @@ if( APPLE )
|
|||
endif()
|
||||
|
||||
if( WIN32 )
|
||||
set( INSTALL_PATH . CACHE STRING "Directory where the demolition executable will be placed during install." )
|
||||
set( INSTALL_PATH . CACHE STRING "Directory where the executable will be placed during install." )
|
||||
else()
|
||||
set( INSTALL_PATH bin CACHE STRING "Directory where the demolition executable will be placed during install." )
|
||||
set( INSTALL_PATH bin CACHE STRING "Directory where the executable will be placed during install." )
|
||||
endif()
|
||||
install(TARGETS demolition
|
||||
DESTINATION ${INSTALL_PATH}
|
||||
|
|
|
@ -24,7 +24,7 @@ BEGIN
|
|||
//CONTROL "Load lights",IDC_WELCOME_LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,180,51,10
|
||||
//CONTROL "Load brightmaps",IDC_WELCOME_BRIGHTMAPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,190,65,10
|
||||
CONTROL "Don't ask me this again",IDC_DONTASKIWAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,73,211,87,10
|
||||
DEFPUSHBUTTON "Play Demolition",IDOK,8,228,90,14
|
||||
DEFPUSHBUTTON "Play!",IDOK,8,228,90,14
|
||||
PUSHBUTTON "Exit",IDCANCEL,166,228,50,14
|
||||
CONTROL "OpenGL",IDC_WELCOME_VULKAN1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,167,41,10
|
||||
CONTROL "Vulkan",IDC_WELCOME_VULKAN2,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,13,177,37,10
|
||||
|
|
Loading…
Reference in a new issue