From 7a57149eff830e3fa03c42961987780c7f23f0ec Mon Sep 17 00:00:00 2001 From: Wouter Wijsman Date: Thu, 31 Oct 2024 10:42:48 +0100 Subject: [PATCH] Improve output of create_pbp_file command to specify target Right now it's a bit of a mess when running builds in parallel. --- src/base/CreatePBP.cmake | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/base/CreatePBP.cmake b/src/base/CreatePBP.cmake index 9191fc04bf..a424621fc8 100644 --- a/src/base/CreatePBP.cmake +++ b/src/base/CreatePBP.cmake @@ -80,19 +80,19 @@ macro(create_pbp_file) TARGET ${ARG_TARGET} POST_BUILD COMMAND "${PSPDEV}/bin/psp-strip" "$" - COMMENT "Stripping binary" + COMMENT "Stripping binary for target ${ARG_TARGET}" ) elseif(${ARG_BUILD_PRX}) add_custom_command( TARGET ${ARG_TARGET} POST_BUILD COMMAND - ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Not stripping binary because building PRX." + ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Not stripping binary for target ${ARG_TARGET} because building PRX." ) else() add_custom_command( TARGET ${ARG_TARGET} POST_BUILD COMMAND - ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Not stripping binary, build type is ${CMAKE_BUILD_TYPE}." + ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Not stripping binary for target ${ARG_TARGET}, build type is ${CMAKE_BUILD_TYPE}." ) endif() @@ -100,7 +100,7 @@ macro(create_pbp_file) TARGET ${ARG_TARGET} POST_BUILD COMMAND "$ENV{PSPDEV}/bin/psp-fixup-imports" "$" - COMMENT "Calling psp-fixup-imports" + COMMENT "Calling psp-fixup-imports for target ${ARG_TARGET}" ) if (${ARG_BUILD_PRX}) @@ -109,7 +109,7 @@ macro(create_pbp_file) POST_BUILD COMMAND "${PSPDEV}/bin/psp-prxgen" "$" "$.prx" - COMMENT "Calling prxgen" + COMMENT "Calling prxgen for target ${ARG_TARGET}" ) if(${ARG_ENC_PRX}) @@ -118,13 +118,13 @@ macro(create_pbp_file) POST_BUILD COMMAND "${PSPDEV}/bin/PrxEncrypter" "$/$.prx" "$.prx" - COMMENT "Calling PrxEncrypter" + COMMENT "Calling PrxEncrypter for target ${ARG_TARGET}" ) else() add_custom_command( TARGET ${ARG_TARGET} POST_BUILD COMMAND - ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Not encrypting PRX, use ENC_PRX flag if you need to." + ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Not encrypting PRX for target ${ARG_TARGET}, use ENC_PRX flag if you need to." ) endif() @@ -132,32 +132,32 @@ macro(create_pbp_file) add_custom_command( TARGET ${ARG_TARGET} POST_BUILD COMMAND - ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Not building PRX" + ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Not building PRX for target ${ARG_TARGET}" ) endif() add_custom_command( TARGET ${ARG_TARGET} POST_BUILD COMMAND - "${PSPDEV}/bin/mksfoex" "-d" "MEMSIZE=1" "-s" "APP_VER=${ARG_VERSION}" "${ARG_TITLE}" "$/PARAM.SFO" - COMMENT "Calling mksfoex" + "${PSPDEV}/bin/mksfoex" "-d" "MEMSIZE=1" "-s" "APP_VER=${ARG_VERSION}" "${ARG_TITLE}" "${ARG_OUTPUT_DIR}/PARAM.SFO" + COMMENT "Calling mksfoex for target ${ARG_TARGET}" ) if(${ARG_BUILD_PRX}) add_custom_command( TARGET ${ARG_TARGET} POST_BUILD COMMAND - "${PSPDEV}/bin/pack-pbp" "$/EBOOT.PBP" "$/PARAM.SFO" "${ARG_ICON_PATH}" "NULL" "${ARG_PREVIEW_PATH}" + "${PSPDEV}/bin/pack-pbp" "${ARG_OUTPUT_DIR}/EBOOT.PBP" "${ARG_OUTPUT_DIR}/PARAM.SFO" "${ARG_ICON_PATH}" "NULL" "${ARG_PREVIEW_PATH}" "${ARG_BACKGROUND_PATH}" "${ARG_MUSIC_PATH}" "$.prx" "NULL" - COMMENT "Calling pack-pbp with PRX file" + COMMENT "Calling pack-pbp with PRX file for target ${ARG_TARGET}" ) else() add_custom_command( TARGET ${ARG_TARGET} POST_BUILD COMMAND - "${PSPDEV}/bin/pack-pbp" "$/EBOOT.PBP" "$/PARAM.SFO" "${ARG_ICON_PATH}" "NULL" "${ARG_PREVIEW_PATH}" + "${PSPDEV}/bin/pack-pbp" "${ARG_OUTPUT_DIR}/EBOOT.PBP" "${ARG_OUTPUT_DIR}/PARAM.SFO" "${ARG_ICON_PATH}" "NULL" "${ARG_PREVIEW_PATH}" "${ARG_BACKGROUND_PATH}" "${ARG_MUSIC_PATH}" "$" "NULL" - COMMENT "Calling pack-pbp with ELF file" + COMMENT "Calling pack-pbp with ELF file for target ${ARG_TARGET}" ) endif() @@ -171,7 +171,7 @@ macro(create_pbp_file) add_custom_command( TARGET ${ARG_TARGET} POST_BUILD COMMAND - ${CMAKE_COMMAND} -E cmake_echo_color --cyan "EBOOT.PBP file created." - ) + ${CMAKE_COMMAND} -E cmake_echo_color --cyan "EBOOT.PBP file created for target ${ARG_TARGET}." + ) endmacro()