Rename SRB2SDL to BLANKART
This commit is contained in:
parent
651ceae556
commit
277131a5a3
11 changed files with 121 additions and 121 deletions
|
|
@ -748,7 +748,7 @@ before_script:
|
|||
-DSRB2_ASSET_DIRECTORY="${SRB2_ASSET_DIRECTORY}"
|
||||
-DCPACK_PACKAGE_DESCRIPTION_SUMMARY="${PROGRAM_NAME}"
|
||||
-DCPACK_PACKAGE_VENDOR="${PROGRAM_VENDOR}"
|
||||
-DSRB2_SDL2_EXE_NAME="${PROGRAM_FILENAME}"
|
||||
-DBLANKART_EXE_NAME="${PROGRAM_FILENAME}"
|
||||
|
||||
script:
|
||||
# Build our Makefile from Cmake!
|
||||
|
|
|
|||
|
|
@ -177,8 +177,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
|||
set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
# Set EXE names so the assets CMakeLists can refer to its target
|
||||
set(SRB2_SDL2_EXE_NAME "" CACHE STRING "Override executable binary output name")
|
||||
set(SRB2_SDL2_EXE_SUFFIX "" CACHE STRING "Optional executable suffix, separated by an underscore")
|
||||
set(BLANKART_EXE_NAME "" CACHE STRING "Override executable binary output name")
|
||||
set(BLANKART_EXE_SUFFIX "" CACHE STRING "Optional executable suffix, separated by an underscore")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ set(SRB2_COMP_REVISION "${SRB2_COMP_COMMIT}")
|
|||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
|
||||
|
||||
|
||||
if("${SRB2_SDL2_EXE_NAME}" STREQUAL "")
|
||||
if("${BLANKART_EXE_NAME}" STREQUAL "")
|
||||
list(APPEND EXE_NAME_PARTS "blankart")
|
||||
|
||||
if(NOT "${SRB2_GIT_BRANCH}" STREQUAL "master" AND NOT SRB2_CONFIG_COMPILEAPPIMAGE)
|
||||
|
|
@ -208,10 +208,10 @@ if("${SRB2_SDL2_EXE_NAME}" STREQUAL "")
|
|||
list(APPEND EXE_NAME_PARTS "appimagebuild")
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXE_NAME_PARTS ${SRB2_SDL2_EXE_NAME})
|
||||
list(APPEND EXE_NAME_PARTS ${BLANKART_EXE_NAME})
|
||||
endif()
|
||||
|
||||
list(APPEND EXE_NAME_PARTS ${SRB2_SDL2_EXE_SUFFIX})
|
||||
list(APPEND EXE_NAME_PARTS ${BLANKART_EXE_SUFFIX})
|
||||
|
||||
list(JOIN EXE_NAME_PARTS "_" EXE_NAME)
|
||||
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME ${EXE_NAME})
|
||||
set_target_properties(BLANKART PROPERTIES OUTPUT_NAME ${EXE_NAME})
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32
|
||||
add_executable(BLANKART MACOSX_BUNDLE WIN32
|
||||
comptime.c
|
||||
config.h.in
|
||||
cxxutil.hpp
|
||||
|
|
@ -156,20 +156,20 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32
|
|||
)
|
||||
|
||||
if(("${CMAKE_COMPILER_IS_GNUCC}" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND "${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
|
||||
target_link_options(SRB2SDL2 PRIVATE "-Wl,--disable-dynamicbase")
|
||||
target_link_options(BLANKART PRIVATE "-Wl,--disable-dynamicbase")
|
||||
if("${SRB2_CONFIG_STATIC_STDLIB}")
|
||||
# On MinGW with internal libraries, link the standard library statically
|
||||
if(CMAKE_LINKER_TYPE STREQUAL "LLD")
|
||||
target_link_options(SRB2SDL2 PRIVATE -Wl, -static-libgcc -static-libstdc++ -static -lpthread)
|
||||
target_link_options(BLANKART PRIVATE -Wl, -static-libgcc -static-libstdc++ -static -lpthread)
|
||||
else()
|
||||
target_link_options(SRB2SDL2 PRIVATE -Wl,--add-stdcall-alias -static-libgcc -static-libstdc++ -static -lpthread)
|
||||
target_link_options(BLANKART PRIVATE -Wl,--add-stdcall-alias -static-libgcc -static-libstdc++ -static -lpthread)
|
||||
endif()
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE Threads::Threads)
|
||||
target_link_libraries(BLANKART PRIVATE Threads::Threads)
|
||||
endif()
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
target_link_options(SRB2SDL2 PRIVATE "-Wl,--large-address-aware")
|
||||
target_link_options(BLANKART PRIVATE "-Wl,--large-address-aware")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ set(SRB2_CONFIG_COMPILEAPPIMAGE OFF CACHE BOOL
|
|||
if(SRB2_CONFIG_COMPILEAPPIMAGE AND "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||
message("-- Generating Appimage at build time.")
|
||||
add_custom_command(
|
||||
TARGET SRB2SDL2
|
||||
TARGET BLANKART
|
||||
POST_BUILD
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin/
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/appimage_build.sh -s
|
||||
|
|
@ -191,14 +191,14 @@ endif()
|
|||
|
||||
if(SRB2_CONFIG_STD23)
|
||||
message("-- Compiling game with C23 and CXX23.")
|
||||
target_compile_features(SRB2SDL2 PRIVATE c_std_23 cxx_std_23)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY C_STANDARD 23)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY CXX_STANDARD 23)
|
||||
target_compile_features(BLANKART PRIVATE c_std_23 cxx_std_23)
|
||||
set_property(TARGET BLANKART PROPERTY C_STANDARD 23)
|
||||
set_property(TARGET BLANKART PROPERTY CXX_STANDARD 23)
|
||||
else()
|
||||
message("-- Compiling game with C11 and CXX17.")
|
||||
target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY C_STANDARD 11)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY CXX_STANDARD 17)
|
||||
target_compile_features(BLANKART PRIVATE c_std_11 cxx_std_17)
|
||||
set_property(TARGET BLANKART PROPERTY C_STANDARD 11)
|
||||
set_property(TARGET BLANKART PROPERTY CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
### Configuration
|
||||
|
|
@ -221,7 +221,7 @@ if(NOT SRB2_CONFIG_SKIP_COMPTIME)
|
|||
# information known at build time, must be told to rebuild
|
||||
# before that information can be ascertained.
|
||||
add_custom_command(
|
||||
TARGET SRB2SDL2
|
||||
TARGET BLANKART
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${CMAKE_CURRENT_SOURCE_DIR}/comptime.c
|
||||
)
|
||||
|
|
@ -232,16 +232,16 @@ add_custom_target(_SRB2_reconf ALL
|
|||
COMMAND ${CMAKE_COMMAND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/.. -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Comptime.cmake
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.."
|
||||
)
|
||||
add_dependencies(SRB2SDL2 _SRB2_reconf)
|
||||
add_dependencies(BLANKART _SRB2_reconf)
|
||||
|
||||
if(SRB2_CONFIG_ASAN)
|
||||
target_compile_options(SRB2SDL2 PRIVATE -fsanitize=address)
|
||||
target_link_options(SRB2SDL2 PRIVATE -fsanitize=address)
|
||||
target_compile_options(BLANKART PRIVATE -fsanitize=address)
|
||||
target_link_options(BLANKART PRIVATE -fsanitize=address)
|
||||
endif()
|
||||
|
||||
if(SRB2_CONFIG_UBSAN)
|
||||
target_compile_options(SRB2SDL2 PRIVATE -fsanitize=undefined)
|
||||
target_link_options(SRB2SDL2 PRIVATE -fsanitize=undefined)
|
||||
target_compile_options(BLANKART PRIVATE -fsanitize=undefined)
|
||||
target_link_options(BLANKART PRIVATE -fsanitize=undefined)
|
||||
endif()
|
||||
|
||||
if(SRB2_CONFIG_TIDY)
|
||||
|
|
@ -249,7 +249,7 @@ if(SRB2_CONFIG_TIDY)
|
|||
endif()
|
||||
|
||||
if(SRB2_CONFIG_NOVERIFYIWADS)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DNOVERIFYIWADS)
|
||||
target_compile_definitions(BLANKART PRIVATE -DNOVERIFYIWADS)
|
||||
endif()
|
||||
|
||||
add_subdirectory(blua)
|
||||
|
|
@ -261,7 +261,7 @@ add_subdirectory(acs)
|
|||
|
||||
# OS macros
|
||||
if (UNIX)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DUNIXCOMMON)
|
||||
target_compile_definitions(BLANKART PRIVATE -DUNIXCOMMON)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
|
@ -269,54 +269,54 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||
endif()
|
||||
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DLINUX)
|
||||
target_compile_definitions(BLANKART PRIVATE -DLINUX)
|
||||
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DLINUX64)
|
||||
target_compile_definitions(BLANKART PRIVATE -DLINUX64)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DMACOSX)
|
||||
target_compile_definitions(BLANKART PRIVATE -DMACOSX)
|
||||
endif()
|
||||
|
||||
if("${SRB2_CONFIG_USE_GME}")
|
||||
target_link_libraries(SRB2SDL2 PRIVATE gme)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_GME)
|
||||
target_link_libraries(BLANKART PRIVATE gme)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_GME)
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
||||
# this sucks but gme doesn't use modern cmake to delineate public headers
|
||||
target_include_directories(SRB2SDL2 PRIVATE "${libgme_SOURCE_DIR}")
|
||||
target_include_directories(BLANKART PRIVATE "${libgme_SOURCE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(SRB2SDL2 PRIVATE openmpt)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_OPENMPT)
|
||||
target_link_libraries(BLANKART PRIVATE openmpt)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_OPENMPT)
|
||||
|
||||
target_link_libraries(SRB2SDL2 PRIVATE ZLIB::ZLIB PNG::PNG CURL::libcurl)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_ZLIB -DHAVE_PNG -DHAVE_CURL -D_LARGEFILE64_SOURCE)
|
||||
target_sources(SRB2SDL2 PRIVATE apng.c)
|
||||
target_link_libraries(BLANKART PRIVATE ZLIB::ZLIB PNG::PNG CURL::libcurl)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_ZLIB -DHAVE_PNG -DHAVE_CURL -D_LARGEFILE64_SOURCE)
|
||||
target_sources(BLANKART PRIVATE apng.c)
|
||||
|
||||
target_link_libraries(SRB2SDL2 PRIVATE tcbrindle::span)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE fmt::fmt-header-only)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE Tracy::TracyClient)
|
||||
target_link_libraries(BLANKART PRIVATE tcbrindle::span)
|
||||
target_link_libraries(BLANKART PRIVATE fmt::fmt-header-only)
|
||||
target_link_libraries(BLANKART PRIVATE Tracy::TracyClient)
|
||||
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
||||
target_link_libraries(SRB2SDL2 PRIVATE sndfile)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE Vorbis::vorbis Vorbis::vorbisenc)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE Opus::opus)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE Ogg::ogg)
|
||||
target_link_libraries(BLANKART PRIVATE sndfile)
|
||||
target_link_libraries(BLANKART PRIVATE Vorbis::vorbis Vorbis::vorbisenc)
|
||||
target_link_libraries(BLANKART PRIVATE Opus::opus)
|
||||
target_link_libraries(BLANKART PRIVATE Ogg::ogg)
|
||||
endif()
|
||||
|
||||
target_link_libraries(SRB2SDL2 PRIVATE xxHash::xxhash)
|
||||
target_link_libraries(BLANKART PRIVATE xxHash::xxhash)
|
||||
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DUSE_STUN)
|
||||
target_compile_definitions(BLANKART PRIVATE -DUSE_STUN)
|
||||
if(SRB2_CONFIG_ENABLE_DISCORDRPC)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE DiscordRPC::DiscordRPC)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_DISCORDRPC)
|
||||
target_sources(SRB2SDL2 PRIVATE discord.c)
|
||||
target_link_libraries(BLANKART PRIVATE DiscordRPC::DiscordRPC)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_DISCORDRPC)
|
||||
target_sources(BLANKART PRIVATE discord.c)
|
||||
endif()
|
||||
|
||||
set(SRB2_HAVE_THREADS ON)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_THREADS)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_THREADS)
|
||||
|
||||
if(${SRB2_CONFIG_HAVE_ZLIB})
|
||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||
|
|
@ -334,7 +334,7 @@ if(${SRB2_CONFIG_HAVE_ZLIB})
|
|||
endif()
|
||||
if(${ZLIB_FOUND})
|
||||
set(SRB2_HAVE_ZLIB ON)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_ZLIB)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_ZLIB)
|
||||
else()
|
||||
message(WARNING "You have specified that ZLIB is available but it was not found. BlanKart may not compile correctly.")
|
||||
endif()
|
||||
|
|
@ -355,9 +355,9 @@ if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB})
|
|||
endif()
|
||||
if(${PNG_FOUND})
|
||||
set(SRB2_HAVE_PNG ON)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_PNG)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -D_LARGEFILE64_SOURCE)
|
||||
target_sources(SRB2SDL2 PRIVATE apng.c)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_PNG)
|
||||
target_compile_definitions(BLANKART PRIVATE -D_LARGEFILE64_SOURCE)
|
||||
target_sources(BLANKART PRIVATE apng.c)
|
||||
else()
|
||||
message(WARNING "You have specified that PNG is available but it was not found. BlanKart may not compile correctly.")
|
||||
endif()
|
||||
|
|
@ -365,13 +365,13 @@ if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB})
|
|||
endif()
|
||||
|
||||
if("${SRB2_CONFIG_HWRENDER}")
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHWRENDER)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHWRENDER)
|
||||
add_subdirectory(hardware)
|
||||
|
||||
if("${SRB2_CONFIG_STATIC_OPENGL}")
|
||||
find_package(OpenGL)
|
||||
if(${OPENGL_FOUND})
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DSTATIC_OPENGL)
|
||||
target_compile_definitions(BLANKART PRIVATE -DSTATIC_OPENGL)
|
||||
else()
|
||||
message(WARNING "You have specified static opengl but opengl was not found. Not setting HWRENDER.")
|
||||
endif()
|
||||
|
|
@ -380,11 +380,11 @@ endif()
|
|||
|
||||
# TODO: build this with the game
|
||||
if(${CMAKE_SYSTEM} MATCHES Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "GNU" AND ${SRB2_SYSTEM_BITS} EQUAL 32)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE
|
||||
target_link_libraries(BLANKART PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/drmingw/lib/win32/libexchndl.a"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/drmingw/lib/win32/libmgwhelp.a"
|
||||
)
|
||||
target_include_directories(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/drmingw/include")
|
||||
target_include_directories(BLANKART PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/drmingw/include")
|
||||
endif()
|
||||
|
||||
# Targets
|
||||
|
|
@ -413,20 +413,20 @@ endif()
|
|||
# Compatibility flag with later versions of GCC
|
||||
# We should really fix our code to not need this
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
|
||||
target_compile_options(BLANKART PRIVATE -mno-ms-bitfields)
|
||||
endif()
|
||||
|
||||
# TODO: fix prng and P_CreateBlockmap overflow at some point
|
||||
target_compile_options(SRB2SDL2 PRIVATE -fwrapv)
|
||||
target_compile_options(BLANKART PRIVATE -fwrapv)
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
target_compile_options(SRB2SDL2 PRIVATE -O0)
|
||||
target_compile_options(BLANKART PRIVATE -O0)
|
||||
else()
|
||||
target_compile_options(SRB2SDL2 PRIVATE -O3)
|
||||
target_compile_options(BLANKART PRIVATE -O3)
|
||||
endif()
|
||||
|
||||
# Compiler warnings configuration
|
||||
target_compile_options(SRB2SDL2 PRIVATE
|
||||
target_compile_options(BLANKART PRIVATE
|
||||
# Using generator expressions to handle per-language compile options
|
||||
|
||||
# C, GNU
|
||||
|
|
@ -542,7 +542,7 @@ target_compile_options(SRB2SDL2 PRIVATE
|
|||
>
|
||||
)
|
||||
if(SRB2_CONFIG_ERRORMODE)
|
||||
target_compile_options(SRB2SDL2 PRIVATE
|
||||
target_compile_options(BLANKART PRIVATE
|
||||
$<$<OR:$<C_COMPILER_ID:GNU>,$<C_COMPILER_ID:AppleClang>,$<C_COMPILER_ID:Clang>>:
|
||||
-Werror
|
||||
>
|
||||
|
|
@ -550,37 +550,37 @@ if(SRB2_CONFIG_ERRORMODE)
|
|||
endif()
|
||||
|
||||
# Link warnings configuration
|
||||
target_link_options(SRB2SDL2 PRIVATE
|
||||
target_link_options(BLANKART PRIVATE
|
||||
$<$<C_COMPILER_ID:GNU>:
|
||||
# -Wl,--as-needed - Was controlled by NOLDWARNING
|
||||
>
|
||||
)
|
||||
|
||||
if(${SRB2_CONFIG_DEV_BUILD})
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DDEVELOP)
|
||||
target_compile_definitions(BLANKART PRIVATE -DDEVELOP)
|
||||
endif()
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DCMAKECONFIG)
|
||||
target_compile_definitions(BLANKART PRIVATE -DCMAKECONFIG)
|
||||
|
||||
# Misc. build options from Makefiles
|
||||
if(SRB2_CONFIG_DEBUGMODE)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -D_DEBUG -DZDEBUG -DPARANOIA -DRANGECHECK -DPACKETDROP)
|
||||
target_compile_definitions(BLANKART PRIVATE -D_DEBUG -DZDEBUG -DPARANOIA -DRANGECHECK -DPACKETDROP)
|
||||
endif()
|
||||
if(SRB2_CONFIG_MOBJCONSISTANCY)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DMOBJCONSISTANCY)
|
||||
target_compile_definitions(BLANKART PRIVATE -DMOBJCONSISTANCY)
|
||||
endif()
|
||||
if(SRB2_CONFIG_PACKETDROP)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DPACKETDROP)
|
||||
target_compile_definitions(BLANKART PRIVATE -DPACKETDROP)
|
||||
endif()
|
||||
if(SRB2_CONFIG_ZDEBUG)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DZDEBUG)
|
||||
target_compile_definitions(BLANKART PRIVATE -DZDEBUG)
|
||||
endif()
|
||||
if(SRB2_CONFIG_PROFILEMODE AND "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||
target_compile_options(SRB2SDL2 PRIVATE -pg)
|
||||
target_link_options(SRB2SDL2 PRIVATE -pg)
|
||||
target_compile_options(BLANKART PRIVATE -pg)
|
||||
target_link_options(BLANKART PRIVATE -pg)
|
||||
endif()
|
||||
|
||||
if(SRB2_CONFIG_LTO AND NOT SRB2_CONFIG_DEBUGMODE)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
set_property(TARGET BLANKART PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
|
||||
# strip debug symbols into separate file when using gcc or clang.
|
||||
|
|
@ -591,11 +591,11 @@ if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT
|
|||
set(OBJCOPY_ONLY_KEEP_DEBUG "--only-keep-debug")
|
||||
endif()
|
||||
message(STATUS "Will make separate debug symbols in *.debug")
|
||||
add_custom_command(TARGET SRB2SDL2 POST_BUILD
|
||||
COMMAND ${CMAKE_OBJCOPY} ${OBJCOPY_ONLY_KEEP_DEBUG} $<TARGET_FILE:SRB2SDL2> $<TARGET_FILE:SRB2SDL2>.debug
|
||||
add_custom_command(TARGET BLANKART POST_BUILD
|
||||
COMMAND ${CMAKE_OBJCOPY} ${OBJCOPY_ONLY_KEEP_DEBUG} $<TARGET_FILE:BLANKART> $<TARGET_FILE:BLANKART>.debug
|
||||
# mold linker: .gnu_debuglink is present by default, so --add-gnu-debuglink would fail
|
||||
COMMAND ${CMAKE_OBJCOPY} --strip-debug --remove-section=.gnu_debuglink $<TARGET_FILE:SRB2SDL2>
|
||||
COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE:SRB2SDL2>.debug $<TARGET_FILE:SRB2SDL2>
|
||||
COMMAND ${CMAKE_OBJCOPY} --strip-debug --remove-section=.gnu_debuglink $<TARGET_FILE:BLANKART>
|
||||
COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE:BLANKART>.debug $<TARGET_FILE:BLANKART>
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
@ -621,12 +621,12 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL Windows AND NOT "${SRB2_CONFIG_INTERNAL_LIBRA
|
|||
endif()
|
||||
list(TRANSFORM ADDITIONAL_DLLS PREPEND "${MINGW_BIN_PATH}/")
|
||||
endif()
|
||||
add_custom_command(TARGET SRB2SDL2 POST_BUILD
|
||||
add_custom_command(TARGET BLANKART POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
$<TARGET_RUNTIME_DLLS:SRB2SDL2>
|
||||
$<TARGET_RUNTIME_DLLS:BLANKART>
|
||||
${ADDITIONAL_DLLS}
|
||||
|
||||
$<TARGET_FILE_DIR:SRB2SDL2>
|
||||
$<TARGET_FILE_DIR:BLANKART>
|
||||
COMMAND_EXPAND_LISTS
|
||||
COMMENT "Copying runtime DLLs"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
ACSVM/Action.cpp
|
||||
ACSVM/Array.cpp
|
||||
ACSVM/BinaryIO.cpp
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
add_subdirectory(ACSVM)
|
||||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
environment.cpp
|
||||
environment.hpp
|
||||
thread.cpp
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
internal/b_soc.c
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
lapi.c
|
||||
lbaselib.c
|
||||
ldo.c
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
memory.cpp
|
||||
thread_pool.cpp
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
hw_bsp.c
|
||||
hw_draw.c
|
||||
hw_light.c
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
loops.cpp
|
||||
dash-rings.c
|
||||
sneaker-panel.c
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Declare SDL2 interface sources
|
||||
|
||||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
ogl_sdl.c
|
||||
i_threads.c
|
||||
i_net.c
|
||||
|
|
@ -13,7 +13,7 @@ target_sources(SRB2SDL2 PRIVATE
|
|||
)
|
||||
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Windows)
|
||||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
../win32/win_dbg.c
|
||||
../win32/Srb2win.rc)
|
||||
endif()
|
||||
|
|
@ -21,7 +21,7 @@ endif()
|
|||
if("${CMAKE_SYSTEM_NAME}" MATCHES Darwin)
|
||||
set(MACOSX_BUNDLE_ICON_FILE Srb2mac.icns)
|
||||
set_source_files_properties(macosx/Srb2mac.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
target_sources(SRB2SDL2 PRIVATE
|
||||
target_sources(BLANKART PRIVATE
|
||||
macosx/mac_alert.c
|
||||
macosx/mac_alert.h
|
||||
macosx/mac_resources.c
|
||||
|
|
@ -32,16 +32,16 @@ endif()
|
|||
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Darwin)
|
||||
find_library(CORE_FOUNDATION_LIBRARY "CoreFoundation")
|
||||
target_link_libraries(SRB2SDL2 PRIVATE
|
||||
target_link_libraries(BLANKART PRIVATE
|
||||
${CORE_FOUNDATION_LIBRARY}
|
||||
)
|
||||
|
||||
#target_link_libraries(SRB2SDL2 PRIVATE SRB2Core)
|
||||
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
|
||||
#target_link_libraries(BLANKART PRIVATE SRB2Core)
|
||||
set_target_properties(BLANKART PROPERTIES OUTPUT_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
|
||||
|
||||
# Configure the app bundle icon and plist properties
|
||||
target_sources(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/macosx/Srb2mac.icns")
|
||||
set_target_properties(SRB2SDL2 PROPERTIES
|
||||
target_sources(BLANKART PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/macosx/Srb2mac.icns")
|
||||
set_target_properties(BLANKART PROPERTIES
|
||||
MACOSX_BUNDLE_ICON_FILE "Srb2mac"
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "SRB2Kart V2"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${SRB2_VERSION}
|
||||
|
|
@ -51,52 +51,52 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES Darwin)
|
|||
endif()
|
||||
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Linux)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE m rt)
|
||||
target_link_libraries(BLANKART PRIVATE m rt)
|
||||
endif()
|
||||
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Windows)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE
|
||||
target_link_libraries(BLANKART PRIVATE
|
||||
ws2_32
|
||||
)
|
||||
target_compile_options(SRB2SDL2 PRIVATE
|
||||
target_compile_options(BLANKART PRIVATE
|
||||
-U_WINDOWS
|
||||
)
|
||||
endif()
|
||||
|
||||
find_package(SDL2 CONFIG REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE SDL2::SDL2)
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2)
|
||||
if(TARGET SDL2main)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE SDL2main)
|
||||
target_link_libraries(BLANKART PRIVATE SDL2main)
|
||||
endif()
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DDIRECTFULLSCREEN)
|
||||
target_include_directories(SRB2SDL2 PRIVATE ${SDL2_INCLUDE_DIR})
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_SDL)
|
||||
target_compile_definitions(BLANKART PRIVATE -DDIRECTFULLSCREEN)
|
||||
target_include_directories(BLANKART PRIVATE ${SDL2_INCLUDE_DIR})
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_SDL)
|
||||
|
||||
find_package(OpenAL CONFIG QUIET)
|
||||
find_package(OpenAL QUIET)
|
||||
if(${SRB2_CONFIG_USE_OPENAL})
|
||||
target_link_libraries(SRB2SDL2 PRIVATE sndfile)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_OPENAL)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE OpenAL::OpenAL)
|
||||
target_sources(SRB2SDL2 PRIVATE al_sound.c)
|
||||
target_link_libraries(BLANKART PRIVATE sndfile)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_OPENAL)
|
||||
target_link_libraries(BLANKART PRIVATE OpenAL::OpenAL)
|
||||
target_sources(BLANKART PRIVATE al_sound.c)
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND NOT "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}")
|
||||
target_link_libraries(SRB2SDL2 PRIVATE SDL2::SDL2-static)
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2-static)
|
||||
else()
|
||||
target_link_libraries(SRB2SDL2 PRIVATE SDL2::SDL2)
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2)
|
||||
endif()
|
||||
else()
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND NOT "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}")
|
||||
target_link_libraries(SRB2SDL2 PRIVATE SDL2::SDL2-static SDL2_mixer::SDL2_mixer-static)
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2-static SDL2_mixer::SDL2_mixer-static)
|
||||
else()
|
||||
target_link_libraries(SRB2SDL2 PRIVATE SDL2::SDL2 SDL2_mixer::SDL2_mixer)
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2 SDL2_mixer::SDL2_mixer)
|
||||
endif()
|
||||
|
||||
if(TARGET SDL2_mixer_ext::SDL2_mixer_ext OR TARGET SDL2_mixer_ext::SDL2_mixer_ext_Static OR TARGET SDL2_mixer::SDL2_mixer OR TARGET SDL2_mixer::SDL2_mixer-static)
|
||||
target_sources(SRB2SDL2 PRIVATE mixer_sound.c)
|
||||
target_sources(BLANKART PRIVATE mixer_sound.c)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER)
|
||||
endif()
|
||||
|
||||
if(TARGET SDL2::SDL2)
|
||||
|
|
@ -127,18 +127,18 @@ endif()
|
|||
|
||||
#### Installation ####
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Darwin)
|
||||
install(TARGETS SRB2SDL2
|
||||
install(TARGETS BLANKART
|
||||
BUNDLE DESTINATION .
|
||||
)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY INSTALL_RPATH_USE_LINK_PATH ON)
|
||||
set_property(TARGET BLANKART PROPERTY INSTALL_RPATH_USE_LINK_PATH ON)
|
||||
else()
|
||||
install(TARGETS SRB2SDL2 SRB2SDL2
|
||||
install(TARGETS BLANKART BLANKART
|
||||
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
|
||||
install(FILES $<TARGET_FILE:BLANKART>.debug
|
||||
DESTINATION .
|
||||
OPTIONAL
|
||||
)
|
||||
|
|
@ -166,4 +166,4 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES Darwin)
|
|||
)
|
||||
endif()
|
||||
|
||||
set(SRB2_SDL2_AVAILABLE YES PARENT_SCOPE)
|
||||
set(BLANKART_AVAILABLE YES PARENT_SCOPE)
|
||||
|
|
|
|||
Loading…
Reference in a new issue