Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/games/SRB2/files/patch-CMakeLists.txt
16461 views
1
--- CMakeLists.txt.orig 2023-09-08 23:16:28 UTC
2
+++ CMakeLists.txt
3
@@ -8,7 +8,9 @@ include(CMakeDependentOption)
4
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
5
6
include(CMakeDependentOption)
7
-include(cmake/CPM.cmake)
8
+if (SRB2_CONFIG_SYSTEM_LIBRARIES)
9
+ include(cmake/CPM.cmake)
10
+endif()
11
12
file(STRINGS src/version.h SRB2_VERSION)
13
string(REGEX MATCH "[0-9]+\\.[0-9.]+" SRB2_VERSION ${SRB2_VERSION})
14
@@ -79,7 +81,8 @@ set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to
15
# SRB2_CONFIG_PROFILEMODE is probably superceded by some CMake setting.
16
option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)
17
set(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.")
18
-
19
+
20
+if (NOT SRB2_CONFIG_SYSTEM_LIBRARIES)
21
if(SRB2_CONFIG_ENABLE_TESTS)
22
# https://github.com/catchorg/Catch2
23
CPMAddPackage(
24
@@ -98,6 +101,7 @@ endif()
25
target_compile_features(srb2tests PRIVATE c_std_11 cxx_std_17)
26
catch_discover_tests(srb2tests)
27
endif()
28
+endif()
29
30
# Enable CCache
31
# (Set USE_CCACHE=ON to use, CCACHE_OPTIONS for options)
32
@@ -114,11 +118,13 @@ else()
33
endif()
34
endif()
35
else()
36
+ if (NOT SRB2_CONFIG_SYSTEM_LIBRARIES)
37
CPMAddPackage(
38
NAME Ccache.cmake
39
GITHUB_REPOSITORY TheLartians/Ccache.cmake
40
VERSION 1.2
41
)
42
+endif()
43
endif()
44
45
# Dependencies
46
47