Merge branch 'cmake-fixes' into 'master'
Various cmake adjustments See merge request STJr/SRB2!538
This commit is contained in:
commit
adc87640d9
|
@ -95,7 +95,6 @@ set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||||
|
|
||||||
# Set EXE names so the assets CMakeLists can refer to its target
|
# Set EXE names so the assets CMakeLists can refer to its target
|
||||||
set(SRB2_SDL2_EXE_NAME srb2 CACHE STRING "Executable binary output name")
|
set(SRB2_SDL2_EXE_NAME srb2 CACHE STRING "Executable binary output name")
|
||||||
set(SRB2_WIN_EXE_NAME srb2dd CACHE STRING "Executable binary output name for DirectDraw build")
|
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||||
|
|
||||||
|
|
|
@ -518,10 +518,6 @@ add_definitions(-DCMAKECONFIG)
|
||||||
|
|
||||||
add_subdirectory(sdl)
|
add_subdirectory(sdl)
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES Windows)
|
if(NOT ${SRB2_SDL2_AVAILABLE})
|
||||||
add_subdirectory(win32)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT ${SRB2_SDL2_AVAILABLE} AND NOT ${SRB2_WIN32_AVAILABLE})
|
|
||||||
message(FATAL_ERROR "There are no targets available to build an SRB2 executable. :(")
|
message(FATAL_ERROR "There are no targets available to build an SRB2 executable. :(")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -140,7 +140,13 @@ if(${SDL2_FOUND})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ${SRB2_SDL2_TOTAL_SOURCES})
|
add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ${SRB2_SDL2_TOTAL_SOURCES})
|
||||||
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME ${SRB2_SDL2_EXE_NAME})
|
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||||
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME srb2win)
|
||||||
|
elseif(${CMAKE_SYSTEM} MATCHES Linux)
|
||||||
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME lsdlsrb2)
|
||||||
|
else()
|
||||||
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME srb2)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
find_library(CORE_LIB CoreFoundation)
|
find_library(CORE_LIB CoreFoundation)
|
||||||
|
|
Loading…
Reference in a new issue