aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/cmake/sdk.cmake
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2022-10-09 20:26:25 +0200
committerspicyjpeg <thatspicyjpeg@gmail.com>2022-10-09 20:26:25 +0200
commit1b1e9b85a51444751dddc0e94a09d19bd4f0885e (patch)
treee44b66adea043c59a2be05683edc8bd4ab6982db /libpsn00b/cmake/sdk.cmake
parent82a259240d9c63d4656b9dae0b46a3689840473b (diff)
downloadpsn00bsdk-1b1e9b85a51444751dddc0e94a09d19bd4f0885e.tar.gz
Refactor CMake scripts, add separate debug/release builds
Diffstat (limited to 'libpsn00b/cmake/sdk.cmake')
-rw-r--r--libpsn00b/cmake/sdk.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/libpsn00b/cmake/sdk.cmake b/libpsn00b/cmake/sdk.cmake
index 8965e79..37b9fd0 100644
--- a/libpsn00b/cmake/sdk.cmake
+++ b/libpsn00b/cmake/sdk.cmake
@@ -1,5 +1,5 @@
# PSn00bSDK toolchain setup file for CMake
-# (C) 2021 spicyjpeg - MPL licensed
+# (C) 2021-2022 spicyjpeg - MPL licensed
cmake_minimum_required(VERSION 3.20)
@@ -14,7 +14,7 @@ set(
## CMake configuration
-set(CMAKE_SYSTEM_NAME PlayStation)
+set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR mipsel)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
@@ -28,6 +28,11 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES PSN00BSDK_TC PSN00BSDK_TARGET PSN00BSDK_VERSION)
+# Always generate compile_commands.json alongside build scripts. This allows
+# some IDEs and tools (such as clangd) to automatically configure include
+# directories and other options.
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
## Toolchain path setup
# Attempt to find GCC using a list of common installation locations.