aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-12-08 16:31:24 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-12-08 17:00:23 +0100
commit4da7a3e44d2bbd7b21ae05c7b6604748e7227227 (patch)
treecbb81eed24dd2bed75998e4f8ffb803dd479a6df /cmake
parentde3532bd6b685c66015202a48d53e1b8fa4900f5 (diff)
downloadjancity-4da7a3e44d2bbd7b21ae05c7b6604748e7227227.tar.gz
wip2
Diffstat (limited to 'cmake')
-rw-r--r--cmake/ps1.cmake21
1 files changed, 20 insertions, 1 deletions
diff --git a/cmake/ps1.cmake b/cmake/ps1.cmake
index 33521f5..bbc1c4c 100644
--- a/cmake/ps1.cmake
+++ b/cmake/ps1.cmake
@@ -6,7 +6,26 @@ add_custom_target(exe ALL elf2exe ${PROJECT_NAME}
DEPENDS ${PROJECT_NAME})
add_custom_target(iso ALL mkisofs -o ${PROJECT_NAME}.iso -V ${PROJECT_NAME}
-sysid PLAYSTATION ${cdroot} DEPENDS exe)
-set(license $ENV{PSXSDK_PATH}/share/licenses/infoeur.dat)
+
+set(license_prefix $ENV{PSXSDK_PATH}/share/licenses)
+
+if(VIDEO_MODE STREQUAL "VMODE_PAL")
+ set(region eur)
+elseif(VIDEO_MODE STREQUAL "VMODE_NTSC")
+ set(ntsc_regions usa jap)
+
+ if(NOT NTSC_REGION IN_LIST ntsc_regions)
+ message(FATAL_ERROR "Please define valid NTSC_REGION. Available options:\n"
+ "${ntsc_regions}\n"
+ "Run CMake again using one of the available options above e.g.:\n"
+ "cmake .. [options] -DNTSC_REGION=US")
+ endif()
+
+ set(region ${NTSC_REGION})
+endif()
+
+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)