summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-07-07 13:22:53 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2025-07-25 14:16:41 +0200
commit14f60e4fd65c42f126eaee7e09cb4251c167c6ed (patch)
tree313b5e16d7d99cf1518c953e2efe5e5fc920dfbf /cmake
parent48a61c16eaa6dcfc75d00dba302537ce1492db98 (diff)
wiptty
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindWASI_SDK.cmake27
-rw-r--r--cmake/ps1.cmake7
2 files changed, 27 insertions, 7 deletions
diff --git a/cmake/FindWASI_SDK.cmake b/cmake/FindWASI_SDK.cmake
new file mode 100644
index 0000000..037aca6
--- /dev/null
+++ b/cmake/FindWASI_SDK.cmake
@@ -0,0 +1,27 @@
+# wanix, a Unix-like operating system for WebAssembly applications.
+# Copyright (C) 2025 Xavier Del Campo Romero
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+find_program(WASI_SDK_CLANG
+ clang
+ PATHS
+ /opt/wasi-sdk/bin
+ ENV WASI_SDK_PATH
+)
+
+include(FindPackageHandleStandardArgs)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(WASI_SDK
+ REQUIRED_VARS WASI_SDK_CLANG)
diff --git a/cmake/ps1.cmake b/cmake/ps1.cmake
index 21d77fa..83bdad7 100644
--- a/cmake/ps1.cmake
+++ b/cmake/ps1.cmake
@@ -29,15 +29,8 @@ set(license $ENV{PSXSDK_PATH}/share/licenses/info${region}.dat)
add_custom_target(bin_cue ALL mkpsxiso ${PROJECT_NAME}.iso ${PROJECT_NAME}.bin
${license} -s DEPENDS iso)
-if(NOT EXISTS "${cdroot}/system.cnf")
- file(COPY "src/ps1/system.cnf" DESTINATION "${cdroot}")
-endif()
-
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(cflags ${cflags} -Og)
else()
set(cflags ${cflags} -Os)
endif()
-
-set(cflags ${cflags} -fshort-enums)
-# libfixmath is already bundled with PSXSDK.