diff options
| author | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2021-10-17 00:32:59 +0200 |
|---|---|---|
| committer | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2021-10-20 16:54:44 +0200 |
| commit | 7a2e6dd9550376f7a0511e73b33194170d712384 (patch) | |
| tree | 25c3e1f61176767753e0566bc0685ab52c50504a /libpsn00b/cmake/internal_setup.cmake | |
| parent | 0a7f59de1eb079930e7c25ad35adc39c9946958c (diff) | |
| download | psn00bsdk-7a2e6dd9550376f7a0511e73b33194170d712384.tar.gz | |
CMake fixes, improved CPack support, Windows instructions
Diffstat (limited to 'libpsn00b/cmake/internal_setup.cmake')
| -rw-r--r-- | libpsn00b/cmake/internal_setup.cmake | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libpsn00b/cmake/internal_setup.cmake b/libpsn00b/cmake/internal_setup.cmake index e3d4be7..377afbc 100644 --- a/libpsn00b/cmake/internal_setup.cmake +++ b/libpsn00b/cmake/internal_setup.cmake @@ -79,6 +79,12 @@ function(psn00bsdk_add_executable name type) message(FATAL_ERROR "Invalid executable type: ${type} (must be STATIC or DYNAMIC)") endif() + # Throw an error if elf2x was not found (which should never happen if the + # SDK is installed properly). + if(ELF2X STREQUAL "ELF2X-NOTFOUND") + message(FATAL_ERROR "Failed to locate elf2x. Check your PATH environment variable.") + endif() + add_executable (${name} ${ARGN}) target_link_libraries(${name} psn00bsdk_${_type}_exe) set_target_properties(${name} PROPERTIES PREFIX "" SUFFIX ".elf") @@ -146,6 +152,13 @@ endfunction() # [additional options passed to add_custom_target()] # ) function(psn00bsdk_add_cd_image name image_name config_file) + # Throw an error if mkpsxiso was not found. Performing this check manually + # (instead of just marking mkpsxiso as required) allows simple projects to + # be built even if mkpsxiso is not installed. + if(MKPSXISO STREQUAL "MKPSXISO-NOTFOUND") + message(FATAL_ERROR "Failed to locate mkpsxiso. If mkpsxiso wasn't installed alongside the SDK, check your PATH environment variable.") + endif() + set(CD_IMAGE_NAME ${image_name}) configure_file(${config_file} _gen_${config_file}) @@ -158,4 +171,6 @@ function(psn00bsdk_add_cd_image name image_name config_file) ) endfunction() -## Helper functions for assets (TODO) +## Helper functions for assets + +# TODO: add them |
