Path: blob/main/games/SRB2/files/patch-CMakeLists.txt
16461 views
--- CMakeLists.txt.orig 2023-09-08 23:16:28 UTC1+++ CMakeLists.txt2@@ -8,7 +8,9 @@ include(CMakeDependentOption)3set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")45include(CMakeDependentOption)6-include(cmake/CPM.cmake)7+if (SRB2_CONFIG_SYSTEM_LIBRARIES)8+ include(cmake/CPM.cmake)9+endif()1011file(STRINGS src/version.h SRB2_VERSION)12string(REGEX MATCH "[0-9]+\\.[0-9.]+" SRB2_VERSION ${SRB2_VERSION})13@@ -79,7 +81,8 @@ set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to14# SRB2_CONFIG_PROFILEMODE is probably superceded by some CMake setting.15option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)16set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to directory that contains all asset files for the installer. If set, assets will be part of installation and cpack.")17-18+19+if (NOT SRB2_CONFIG_SYSTEM_LIBRARIES)20if(SRB2_CONFIG_ENABLE_TESTS)21# https://github.com/catchorg/Catch222CPMAddPackage(23@@ -98,6 +101,7 @@ endif()24target_compile_features(srb2tests PRIVATE c_std_11 cxx_std_17)25catch_discover_tests(srb2tests)26endif()27+endif()2829# Enable CCache30# (Set USE_CCACHE=ON to use, CCACHE_OPTIONS for options)31@@ -114,11 +118,13 @@ else()32endif()33endif()34else()35+ if (NOT SRB2_CONFIG_SYSTEM_LIBRARIES)36CPMAddPackage(37NAME Ccache.cmake38GITHUB_REPOSITORY TheLartians/Ccache.cmake39VERSION 1.240)41+endif()42endif()4344# Dependencies454647