aboutsummaryrefslogtreecommitdiff
path: root/cmake/ps1.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-11-11 00:08:15 +0100
commit7861a52adf92a083bb2aed4c35f98d8035dce032 (patch)
tree28cd3c40e4c878f730f5df3c1d93bdf91af490c3 /cmake/ps1.cmake
parent7fc48e9216ff809da5f8055a50b0be17628ef1df (diff)
downloadwnix-7861a52adf92a083bb2aed4c35f98d8035dce032.tar.gz
Setup project skeleton
Diffstat (limited to 'cmake/ps1.cmake')
-rw-r--r--cmake/ps1.cmake29
1 files changed, 10 insertions, 19 deletions
diff --git a/cmake/ps1.cmake b/cmake/ps1.cmake
index 21d77fa..14b6937 100644
--- a/cmake/ps1.cmake
+++ b/cmake/ps1.cmake
@@ -1,13 +1,8 @@
-find_package(PSXSDK 0.7.1 REQUIRED)
-
-target_compile_definitions(${PROJECT_NAME} PUBLIC FIXMATH_FAST_SIN PSXSDK_DEBUG)
-add_custom_target(exe ALL elf2exe ${PROJECT_NAME}
- ${cdroot}/${PROJECT_NAME}.exe -mark="A homebrew game created with PSXSDK"
+add_custom_target(exe ALL ${TOOLS_PREFIX}/bin/elf2exe ${PROJECT_NAME}
+ ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.exe
+ -mark="wnix, a Unix-like operating system for WebAssembly applications"
DEPENDS ${PROJECT_NAME})
-add_custom_target(iso ALL mkisofs -o ${PROJECT_NAME}.iso -V ${PROJECT_NAME}
- -sysid PLAYSTATION ${cdroot} DEPENDS exe)
-
-set(license_prefix $ENV{PSXSDK_PATH}/share/licenses)
+add_dependencies(exe tools)
if(VIDEO_MODE STREQUAL "VMODE_PAL")
set(region eur)
@@ -24,20 +19,16 @@ elseif(VIDEO_MODE STREQUAL "VMODE_NTSC")
set(region ${NTSC_REGION})
endif()
-set(license $ENV{PSXSDK_PATH}/share/licenses/info${region}.dat)
+add_custom_target(bin_cue ALL
+ ${TOOLS_PREFIX}/bin/mkpsxiso -q ${CMAKE_BINARY_DIR}/wnix.xml
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
-add_custom_target(bin_cue ALL mkpsxiso ${PROJECT_NAME}.iso ${PROJECT_NAME}.bin
- ${license} -s DEPENDS iso)
+add_dependencies(bin_cue exe tools)
-if(NOT EXISTS "${cdroot}/system.cnf")
- file(COPY "src/ps1/system.cnf" DESTINATION "${cdroot}")
-endif()
+set(cflags ${cflags})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(cflags ${cflags} -Og)
else()
- set(cflags ${cflags} -Os)
+ set(cflags ${cflags} -O3 -g)
endif()
-
-set(cflags ${cflags} -fshort-enums)
-# libfixmath is already bundled with PSXSDK.