Skip to content

Commit

Permalink
CMake Presets: The Prefix path is now appended, not overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry committed Oct 14, 2024
1 parent a39be32 commit f332f72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ option(LIBLCF_ENABLE_BENCHMARKS "Whether to build the benchmarks (default: OFF)"
option(LIBLCF_ENABLE_INSTALL "Whether to add an install target (default: ON)" ${LIBLCF_MAIN_PROJECT})
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Override CMAKE_DEBUG_POSTFIX.")

# Dependencies provided by CMake Presets
list(APPEND CMAKE_PREFIX_PATH "${LIBLCF_PREFIX_PATH_APPEND}")

# C++17 is required
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
12 changes: 6 additions & 6 deletions builds/cmake/CMakePresets.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"displayName": "Linux",
"toolchainFile": "${sourceDir}/builds/cmake/LinuxToolchain.cmake",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "$env{EASYRPG_BUILDSCRIPTS}/linux-static"
"LIBLCF_PREFIX_PATH_APPEND": "$env{EASYRPG_BUILDSCRIPTS}/linux-static"
}
},
{
Expand Down Expand Up @@ -53,7 +53,7 @@
"name": "macos",
"displayName": "macOS",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "$env{EASYRPG_BUILDSCRIPTS}/osx",
"LIBLCF_PREFIX_PATH_APPEND": "$env{EASYRPG_BUILDSCRIPTS}/osx",
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.9"
},
"condition": {
Expand All @@ -68,7 +68,7 @@
"toolchainFile": "$env{EASYRPG_BUILDSCRIPTS}/emscripten/emsdk-portable/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake",
"cacheVariables": {
"LIBLCF_ENABLE_TOOLS": "OFF",
"CMAKE_PREFIX_PATH": "$env{EASYRPG_BUILDSCRIPTS}/emscripten",
"LIBLCF_PREFIX_PATH_APPEND": "$env{EASYRPG_BUILDSCRIPTS}/emscripten",
"CMAKE_FIND_ROOT_PATH": "$env{EASYRPG_BUILDSCRIPTS}/emscripten"
}
},
Expand All @@ -77,7 +77,7 @@
"displayName": "Nintendo 3DS",
"toolchainFile": "$env{DEVKITPRO}/cmake/3DS.cmake",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "$env{EASYRPG_BUILDSCRIPTS}/3ds"
"LIBLCF_PREFIX_PATH_APPEND": "$env{EASYRPG_BUILDSCRIPTS}/3ds"
},
"inherits": "dkp-user"
},
Expand All @@ -86,7 +86,7 @@
"displayName": "Nintendo Switch",
"toolchainFile": "$env{DEVKITPRO}/cmake/Switch.cmake",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "$env{EASYRPG_BUILDSCRIPTS}/switch"
"LIBLCF_PREFIX_PATH_APPEND": "$env{EASYRPG_BUILDSCRIPTS}/switch"
},
"inherits": "dkp-user"
},
Expand All @@ -95,7 +95,7 @@
"displayName": "Nintendo Wii",
"toolchainFile": "$env{DEVKITPRO}/cmake/Wii.cmake",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "$env{EASYRPG_BUILDSCRIPTS}/wii"
"LIBLCF_PREFIX_PATH_APPEND": "$env{EASYRPG_BUILDSCRIPTS}/wii"
},
"inherits": "dkp-user"
},
Expand Down

0 comments on commit f332f72

Please sign in to comment.