aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/cmake/sdk.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'libpsn00b/cmake/sdk.cmake')
-rw-r--r--libpsn00b/cmake/sdk.cmake14
1 files changed, 6 insertions, 8 deletions
diff --git a/libpsn00b/cmake/sdk.cmake b/libpsn00b/cmake/sdk.cmake
index 37b9fd0..facee26 100644
--- a/libpsn00b/cmake/sdk.cmake
+++ b/libpsn00b/cmake/sdk.cmake
@@ -1,7 +1,7 @@
# PSn00bSDK toolchain setup file for CMake
# (C) 2021-2022 spicyjpeg - MPL licensed
-cmake_minimum_required(VERSION 3.20)
+cmake_minimum_required(VERSION 3.21)
set(
PSN00BSDK_TC ""
@@ -70,10 +70,9 @@ endif()
## Toolchain executables
-# ${CMAKE_EXECUTABLE_SUFFIX} seems not to work in toolchain scripts, so we
-# can't rely on it to determine the host OS extension for executables. The best
-# workaround I found is to extract the extension from the path returned by
-# find_program() using a regex.
+# As we have overridden ${CMAKE_EXECUTABLE_SUFFIX} we can't rely on it to
+# determine the host OS extension for executables. A workaround is to extract
+# the extension from the path returned by find_program() using a regex.
set(_prefix ${_bin}/${PSN00BSDK_TARGET})
string(REGEX MATCH ".+-gcc(.*)$" _dummy ${_gcc})
@@ -90,7 +89,6 @@ set(TOOLCHAIN_NM ${_prefix}-nm${CMAKE_MATCH_1})
## SDK setup
-# We can't set up the SDK here as the find_*() functions may fail if they are
-# called before project(). We can however set a script to be executed right
-# after project() is invoked.
+# Continue initialization by running internal_setup.cmake after project() is
+# invoked.
set(CMAKE_PROJECT_INCLUDE ${CMAKE_CURRENT_LIST_DIR}/internal_setup.cmake)