mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Merge branch 'cmake-adjustments' into 'master'
CMAKE additions: SDL Mixer X, *.debug adjustments, CPACK adjustments, CCACHE See merge request STJr/SRB2!992
This commit is contained in:
commit
3253ffbbc8
6 changed files with 146 additions and 27 deletions
|
@ -1,5 +1,17 @@
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
|
# Enable CCache early
|
||||||
|
set(SRB2_USE_CCACHE OFF CACHE BOOL "Use CCache")
|
||||||
|
if (${SRB2_USE_CCACHE})
|
||||||
|
find_program(CCACHE_PROGRAM ccache)
|
||||||
|
if(CCACHE_PROGRAM)
|
||||||
|
message(STATUS "Found CCache: ${CCACHE_PROGRAM}")
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||||
|
else()
|
||||||
|
message(WARNING "You have specified to use CCACHE but it was not found. Object files will not be cached.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
file(STRINGS src/version.h SRB2_VERSION)
|
file(STRINGS src/version.h SRB2_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+\\.[0-9.]+" SRB2_VERSION ${SRB2_VERSION})
|
string(REGEX MATCH "[0-9]+\\.[0-9.]+" SRB2_VERSION ${SRB2_VERSION})
|
||||||
|
|
||||||
|
@ -13,6 +25,10 @@ if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
|
||||||
message(FATAL_ERROR "In-source builds will bring you a world of pain. Please make a separate directory to invoke CMake from.")
|
message(FATAL_ERROR "In-source builds will bring you a world of pain. Please make a separate directory to invoke CMake from.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if ((${SRB2_USE_CCACHE}) AND (${CMAKE_C_COMPILER} MATCHES "clang"))
|
||||||
|
message(WARNING "Using clang and CCache: You may want to set environment variable CCACHE_CPP2=yes to prevent include errors during compile.")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Set up CMAKE path
|
# Set up CMAKE path
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||||
|
|
||||||
|
@ -117,16 +133,19 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINAR
|
||||||
|
|
||||||
##### PACKAGE CONFIGURATION #####
|
##### PACKAGE CONFIGURATION #####
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES "Windows")
|
set(SRB2_CPACK_GENERATOR "" CACHE STRING "Generator to use for making a package. E.g., ZIP, TGZ, DragNDrop (OSX only). Leave blank for default generator.")
|
||||||
set(CPACK_GENERATOR "ZIP")
|
|
||||||
endif()
|
if("${SRB2_CPACK_GENERATOR}" STREQUAL "")
|
||||||
if(${CMAKE_SYSTEM} MATCHES "Linux")
|
if(${CMAKE_SYSTEM} MATCHES "Windows")
|
||||||
set(CPACK_GENERATOR "TGZ")
|
set(SRB2_CPACK_GENERATOR "ZIP")
|
||||||
endif()
|
elseif(${CMAKE_SYSTEM} MATCHES "Linux")
|
||||||
if(${CMAKE_SYSTEM} MATCHES "Darwin")
|
set(SRB2_CPACK_GENERATOR "TGZ")
|
||||||
set(CPACK_GENERATOR "DragNDrop")
|
elseif(${CMAKE_SYSTEM} MATCHES "Darwin")
|
||||||
|
set(SRB2_CPACK_GENERATOR "TGZ")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CPACK_GENERATOR ${SRB2_CPACK_GENERATOR})
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2" CACHE STRING "Program name for display purposes")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2" CACHE STRING "Program name for display purposes")
|
||||||
set(CPACK_PACKAGE_VENDOR "Sonic Team Jr." CACHE STRING "Vendor name for display purposes")
|
set(CPACK_PACKAGE_VENDOR "Sonic Team Jr." CACHE STRING "Vendor name for display purposes")
|
||||||
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
|
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
|
||||||
|
@ -135,4 +154,5 @@ set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${SRB2_VERSION_MINOR})
|
set(CPACK_PACKAGE_VERSION_MINOR ${SRB2_VERSION_MINOR})
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH ${SRB2_VERSION_PATCH})
|
set(CPACK_PACKAGE_VERSION_PATCH ${SRB2_VERSION_PATCH})
|
||||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}")
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}")
|
||||||
|
SET(CPACK_OUTPUT_FILE_PREFIX package)
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
|
@ -12,6 +12,9 @@ ENDFUNCTION(PREPEND)
|
||||||
set(SRB2_ASSET_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/installer"
|
set(SRB2_ASSET_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/installer"
|
||||||
CACHE STRING "Path to directory that contains all asset files for the installer.")
|
CACHE STRING "Path to directory that contains all asset files for the installer.")
|
||||||
|
|
||||||
|
set(SRB2_ASSET_INSTALL ON
|
||||||
|
CACHE BOOL "Insert asset files into the install directory or package.")
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# POST-V2.2 NOTE: Do not forget to add patch.pk3 to the end of this list!
|
# POST-V2.2 NOTE: Do not forget to add patch.pk3 to the end of this list!
|
||||||
####################
|
####################
|
||||||
|
@ -43,20 +46,27 @@ endforeach()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
get_target_property(outname SRB2SDL2 OUTPUT_NAME)
|
get_target_property(outname SRB2SDL2 OUTPUT_NAME)
|
||||||
install(DIRECTORY "${SRB2_ASSET_DIRECTORY}/"
|
if(${SRB2_ASSET_INSTALL})
|
||||||
DESTINATION "${outname}.app/Contents/Resources"
|
install(DIRECTORY "${SRB2_ASSET_DIRECTORY}/"
|
||||||
)
|
DESTINATION "${outname}.app/Contents/Resources"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
# Always install the doc files, even in non-asset packages.
|
||||||
install(FILES ${SRB2_ASSET_DOCS}
|
install(FILES ${SRB2_ASSET_DOCS}
|
||||||
DESTINATION .
|
DESTINATION .
|
||||||
OPTIONAL
|
OPTIONAL
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
install(DIRECTORY "${SRB2_ASSET_DIRECTORY}/"
|
if(${SRB2_ASSET_INSTALL})
|
||||||
DESTINATION .
|
install(DIRECTORY "${SRB2_ASSET_DIRECTORY}/"
|
||||||
)
|
DESTINATION .
|
||||||
# Docs are assumed to be located in SRB2_ASSET_DIRECTORY, so don't install again
|
)
|
||||||
#install(FILES ${SRB2_ASSET_DOCS}
|
# Docs are assumed to be located in SRB2_ASSET_DIRECTORY, so don't install them in their own call.
|
||||||
# DESTINATION .
|
else()
|
||||||
# OPTIONAL
|
# Always install the doc files, even in non-asset packages.
|
||||||
#)
|
install(FILES ${SRB2_ASSET_DOCS}
|
||||||
|
DESTINATION .
|
||||||
|
OPTIONAL
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
3
cmake/launch-c.in
Normal file
3
cmake/launch-c.in
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
export CCACHE_CPP2=true
|
||||||
|
exec "${RULE_LAUNCH_COMPILE}" "${CMAKE_C_COMPILER}" "$@"
|
3
cmake/launch-cxx.in
Normal file
3
cmake/launch-cxx.in
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
export CCACHE_CPP2=true
|
||||||
|
exec "${RULE_LAUNCH_COMPILE}" "${CMAKE_C_COMPILER}" "$@"
|
|
@ -226,6 +226,12 @@ set(SRB2_CONFIG_HAVE_GME ON CACHE BOOL
|
||||||
"Enable GME support.")
|
"Enable GME support.")
|
||||||
set(SRB2_CONFIG_HAVE_OPENMPT ON CACHE BOOL
|
set(SRB2_CONFIG_HAVE_OPENMPT ON CACHE BOOL
|
||||||
"Enable OpenMPT support.")
|
"Enable OpenMPT support.")
|
||||||
|
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||||
|
set(SRB2_CONFIG_HAVE_MIXERX ON CACHE BOOL
|
||||||
|
"Enable SDL Mixer X support.")
|
||||||
|
else()
|
||||||
|
set(SRB2_CONFIG_HAVE_MIXERX OFF)
|
||||||
|
endif()
|
||||||
set(SRB2_CONFIG_HWRENDER ON CACHE BOOL
|
set(SRB2_CONFIG_HWRENDER ON CACHE BOOL
|
||||||
"Enable hardware rendering through OpenGL.")
|
"Enable hardware rendering through OpenGL.")
|
||||||
set(SRB2_CONFIG_USEASM OFF CACHE BOOL
|
set(SRB2_CONFIG_USEASM OFF CACHE BOOL
|
||||||
|
@ -366,6 +372,30 @@ if(${SRB2_CONFIG_HAVE_OPENMPT})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(${SRB2_CONFIG_HAVE_MIXERX})
|
||||||
|
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||||
|
set(MIXERX_FOUND ON)
|
||||||
|
set(MIXERX_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/SDLMixerX/i686-w64-mingw32/include/SDL2)
|
||||||
|
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||||
|
set(MIXERX_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/SDLMixerX/x86_64-w64-mingw32/lib -lSDL2_mixer_ext")
|
||||||
|
else() # 32-bit
|
||||||
|
set(MIXERX_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/SDLMixerX/i686-w64-mingw32/lib -lSDL2_mixer_ext")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# No support for non-Windows (yet?)
|
||||||
|
#find_package(MIXERX)
|
||||||
|
message(WARNING "SDL Mixer X is not supported as an external library.")
|
||||||
|
set(MIXERX_FOUND OFF)
|
||||||
|
endif()
|
||||||
|
if(${MIXERX_FOUND})
|
||||||
|
set(SRB2_HAVE_MIXERX ON)
|
||||||
|
set(SRB2_SDL2_SOUNDIMPL mixer_sound.c)
|
||||||
|
add_definitions(-DHAVE_MIXERX)
|
||||||
|
else()
|
||||||
|
message(WARNING "You have specified that SDL Mixer X is available but it was not found.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${SRB2_CONFIG_HAVE_ZLIB})
|
if(${SRB2_CONFIG_HAVE_ZLIB})
|
||||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||||
set(ZLIB_FOUND ON)
|
set(ZLIB_FOUND ON)
|
||||||
|
@ -494,6 +524,27 @@ endif()
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
|
|
||||||
|
# If using CCACHE, then force it.
|
||||||
|
# https://github.com/Cockatrice/Cockatrice/pull/3052/files
|
||||||
|
if (${CMAKE_SYSTEM} MATCHES "Darwin")
|
||||||
|
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
||||||
|
if(RULE_LAUNCH_COMPILE)
|
||||||
|
MESSAGE(STATUS "Force enabling CCache usage under macOS")
|
||||||
|
# Set up wrapper scripts
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/launch-c.in ${CMAKE_BINARY_DIR}/launch-c)
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/launch-cxx.in ${CMAKE_BINARY_DIR}/launch-cxx)
|
||||||
|
execute_process(COMMAND chmod a+rx
|
||||||
|
"${CMAKE_BINARY_DIR}/launch-c"
|
||||||
|
"${CMAKE_BINARY_DIR}/launch-cxx")
|
||||||
|
|
||||||
|
# Set Xcode project attributes to route compilation through our scripts
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c")
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/launch-cxx")
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/launch-c")
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/launch-cxx")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Compatibility flag with later versions of GCC
|
# Compatibility flag with later versions of GCC
|
||||||
# We should really fix our code to not need this
|
# We should really fix our code to not need this
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
# Declare SDL2 interface sources
|
# Declare SDL2 interface sources
|
||||||
|
|
||||||
set(SRB2_CONFIG_SDL2_USEMIXER ON CACHE BOOL "Use SDL2_mixer or regular sdl sound")
|
if(NOT ${SRB2_CONFIG_HAVE_MIXERX})
|
||||||
|
set(SRB2_CONFIG_SDL2_USEMIXER ON CACHE BOOL "Use SDL2_mixer or regular sdl sound")
|
||||||
|
else()
|
||||||
|
set(SRB2_CONFIG_SDL2_USEMIXER OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${SRB2_CONFIG_SDL2_USEMIXER})
|
if(${SRB2_CONFIG_SDL2_USEMIXER})
|
||||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||||
|
@ -22,6 +26,8 @@ if(${SRB2_CONFIG_SDL2_USEMIXER})
|
||||||
message(WARNING "You specified that SDL2_mixer is available, but it was not found. Falling back to sdl sound.")
|
message(WARNING "You specified that SDL2_mixer is available, but it was not found. Falling back to sdl sound.")
|
||||||
set(SRB2_SDL2_SOUNDIMPL sdl_sound.c)
|
set(SRB2_SDL2_SOUNDIMPL sdl_sound.c)
|
||||||
endif()
|
endif()
|
||||||
|
elseif(${MIXERX_FOUND})
|
||||||
|
set(SRB2_SDL2_SOUNDIMPL mixer_sound.c)
|
||||||
else()
|
else()
|
||||||
set(SRB2_SDL2_SOUNDIMPL sdl_sound.c)
|
set(SRB2_SDL2_SOUNDIMPL sdl_sound.c)
|
||||||
endif()
|
endif()
|
||||||
|
@ -156,6 +162,7 @@ if(${SDL2_FOUND})
|
||||||
SDL2_mixer
|
SDL2_mixer
|
||||||
${GME_LIBRARIES}
|
${GME_LIBRARIES}
|
||||||
${OPENMPT_LIBRARIES}
|
${OPENMPT_LIBRARIES}
|
||||||
|
${MIXERX_LIBRARIES}
|
||||||
${PNG_LIBRARIES}
|
${PNG_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
|
@ -167,6 +174,7 @@ if(${SDL2_FOUND})
|
||||||
${SDL2_MIXER_LIBRARIES}
|
${SDL2_MIXER_LIBRARIES}
|
||||||
${GME_LIBRARIES}
|
${GME_LIBRARIES}
|
||||||
${OPENMPT_LIBRARIES}
|
${OPENMPT_LIBRARIES}
|
||||||
|
${MIXERX_LIBRARIES}
|
||||||
${PNG_LIBRARIES}
|
${PNG_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
|
@ -247,27 +255,32 @@ if(${SDL2_FOUND})
|
||||||
${SDL2_MIXER_INCLUDE_DIRS}
|
${SDL2_MIXER_INCLUDE_DIRS}
|
||||||
${GME_INCLUDE_DIRS}
|
${GME_INCLUDE_DIRS}
|
||||||
${OPENMPT_INCLUDE_DIRS}
|
${OPENMPT_INCLUDE_DIRS}
|
||||||
|
${MIXERX_INCLUDE_DIRS}
|
||||||
${PNG_INCLUDE_DIRS}
|
${PNG_INCLUDE_DIRS}
|
||||||
${ZLIB_INCLUDE_DIRS}
|
${ZLIB_INCLUDE_DIRS}
|
||||||
${OPENGL_INCLUDE_DIRS}
|
${OPENGL_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(${SRB2_HAVE_MIXER})
|
if((${SRB2_HAVE_MIXER}) OR (${SRB2_HAVE_MIXERX}))
|
||||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER)
|
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(SRB2SDL2 PRIVATE
|
target_compile_definitions(SRB2SDL2 PRIVATE
|
||||||
-DHAVE_SDL
|
-DDDIRECTFULLSCREEN -DHAVE_SDL
|
||||||
)
|
)
|
||||||
|
|
||||||
## strip debug symbols into separate file when using gcc
|
## strip debug symbols into separate file when using gcc.
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
## to be consistent with Makefile, don't generate for OS X.
|
||||||
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
if((CMAKE_COMPILER_IS_GNUCC) AND NOT (${CMAKE_SYSTEM} MATCHES Darwin))
|
||||||
|
if((${CMAKE_BUILD_TYPE} MATCHES Debug) OR (${CMAKE_BUILD_TYPE} MATCHES RelWithDebInfo))
|
||||||
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||||
|
set(OBJCOPY_ONLY_KEEP_DEBUG "--only-keep-debug")
|
||||||
|
endif()
|
||||||
message(STATUS "Will make separate debug symbols in *.debug")
|
message(STATUS "Will make separate debug symbols in *.debug")
|
||||||
add_custom_command(TARGET SRB2SDL2 POST_BUILD
|
add_custom_command(TARGET SRB2SDL2 POST_BUILD
|
||||||
COMMAND ${OBJCOPY} --only-keep-debug $<TARGET_FILE:SRB2SDL2> $<TARGET_FILE:SRB2SDL2>.debug
|
COMMAND ${OBJCOPY} ${OBJCOPY_ONLY_KEEP_DEBUG} $<TARGET_FILE:SRB2SDL2> $<TARGET_FILE:SRB2SDL2>.debug
|
||||||
COMMAND ${OBJCOPY} --strip-debug $<TARGET_FILE:SRB2SDL2>
|
COMMAND ${OBJCOPY} --strip-debug $<TARGET_FILE:SRB2SDL2>
|
||||||
COMMAND ${OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE_NAME:SRB2SDL2>.debug $<TARGET_FILE:SRB2SDL2>
|
COMMAND ${OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE:SRB2SDL2>.debug $<TARGET_FILE:SRB2SDL2>
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -281,6 +294,15 @@ if(${SDL2_FOUND})
|
||||||
install(TARGETS SRB2SDL2 SRB2SDL2
|
install(TARGETS SRB2SDL2 SRB2SDL2
|
||||||
RUNTIME DESTINATION .
|
RUNTIME DESTINATION .
|
||||||
)
|
)
|
||||||
|
if ((${CMAKE_BUILD_TYPE} MATCHES Debug) OR (${CMAKE_BUILD_TYPE} MATCHES RelWithDebInfo))
|
||||||
|
set(SRB2_DEBUG_INSTALL OFF CACHE BOOL "Insert *.debug file into the install directory or package.")
|
||||||
|
if (${SRB2_DEBUG_INSTALL})
|
||||||
|
install(FILES $<TARGET_FILE:SRB2SDL2>.debug
|
||||||
|
DESTINATION .
|
||||||
|
OPTIONAL
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES Windows)
|
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||||
|
@ -294,6 +316,7 @@ if(${SDL2_FOUND})
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/x86_64-w64-mingw32/bin
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/x86_64-w64-mingw32/bin
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/x86_64-w64-mingw32/bin
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/x86_64-w64-mingw32/bin
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/libopenmpt/bin/x86_64/mingw
|
HINTS ${CMAKE_SOURCE_DIR}/libs/libopenmpt/bin/x86_64/mingw
|
||||||
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDLMixerX/x86_64-w64-mingw32/bin
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}"
|
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}"
|
||||||
|
@ -301,6 +324,7 @@ if(${SDL2_FOUND})
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/i686-w64-mingw32/bin
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/i686-w64-mingw32/bin
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/i686-w64-mingw32/bin
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/i686-w64-mingw32/bin
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/libopenmpt/bin/x86/mingw
|
HINTS ${CMAKE_SOURCE_DIR}/libs/libopenmpt/bin/x86/mingw
|
||||||
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDLMixerX/i686-w64-mingw32/bin
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
@ -310,6 +334,7 @@ if(${SDL2_FOUND})
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/lib/x64
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/lib/x64
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/lib/x64
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/lib/x64
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/libopenmpt/bin/x86_64/mingw
|
HINTS ${CMAKE_SOURCE_DIR}/libs/libopenmpt/bin/x86_64/mingw
|
||||||
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDLMixerX/x86_64-w64-mingw32/bin
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}"
|
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}"
|
||||||
|
@ -317,6 +342,7 @@ if(${SDL2_FOUND})
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/lib/x86
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/lib/x86
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/lib/x86
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/lib/x86
|
||||||
HINTS ${CMAKE_SOURCE_DIR}/libs/libopenmpt/bin/x86/mingw
|
HINTS ${CMAKE_SOURCE_DIR}/libs/libopenmpt/bin/x86/mingw
|
||||||
|
HINTS ${CMAKE_SOURCE_DIR}/libs/SDLMixerX/i686-w64-mingw32/bin
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -340,6 +366,12 @@ if(${SDL2_FOUND})
|
||||||
if(${SRB2_CONFIG_HAVE_OPENMPT})
|
if(${SRB2_CONFIG_HAVE_OPENMPT})
|
||||||
getwinlib(libopenmpt "libopenmpt.dll")
|
getwinlib(libopenmpt "libopenmpt.dll")
|
||||||
endif()
|
endif()
|
||||||
|
if(${SRB2_CONFIG_HAVE_MIXERX})
|
||||||
|
getwinlib(SDL2_mixer_ext "SDL2_mixer_ext.dll")
|
||||||
|
getwinlib(libfluidsynth-2 "libfluidsynth-2.dll")
|
||||||
|
getwinlib(libgcc_s_sjlj-1 "libgcc_s_sjlj-1.dll")
|
||||||
|
getwinlib(libstdc++-6 "libstdc++-6.dll")
|
||||||
|
endif()
|
||||||
|
|
||||||
install(PROGRAMS
|
install(PROGRAMS
|
||||||
${win_extra_dll_list}
|
${win_extra_dll_list}
|
||||||
|
|
Loading…
Reference in a new issue