diff --git a/CMakeLists.txt b/CMakeLists.txt index 17f49519..978ceac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -757,23 +757,24 @@ if(NINTENDO_3DS) ) ctr_create_3dsx(isle SMDH isle.smdh) + if(BANNERTOOL AND MAKEROM) + add_custom_command( + OUTPUT "isle.bnr" + COMMAND "${BANNERTOOL}" makebanner -i "../ISLE/res/3ds/banner.png" -a "../ISLE/res/3ds/banner.wav" -o "isle.bnr" + DEPENDS "../ISLE/res/3ds/banner.png" "../ISLE/res/3ds/banner.wav" + VERBATIM + ) - add_custom_command( - OUTPUT "isle.bnr" - COMMAND "${BANNERTOOL}" makebanner -i "../ISLE/res/3ds/banner.png" -a "../ISLE/res/3ds/banner.wav" -o "isle.bnr" - DEPENDS "../ISLE/res/3ds/banner.png" "../ISLE/res/3ds/banner.wav" - VERBATIM - ) - - add_custom_command( - OUTPUT "isle.cia" - COMMAND "${MAKEROM}" -f cia -exefslogo -o "isle.cia" -rsf "../ISLE/res/3ds/template.rsf" -major "${CMAKE_PROJECT_VERSION_MAJOR}" -minor "${CMAKE_PROJECT_VERSION_MINOR}" -micro 0 -icon "isle.smdh" -banner "isle.bnr" -elf "isle.elf" - DEPENDS "ISLE/res/3ds/template.rsf" "isle.smdh" "isle.bnr" - COMMENT "Building CIA executable target isle.cia" - VERBATIM - ) - add_custom_target("isle_cia" ALL DEPENDS "isle.cia" isle) + add_custom_command( + OUTPUT "isle.cia" + COMMAND "${MAKEROM}" -f cia -exefslogo -o "isle.cia" -rsf "../ISLE/res/3ds/template.rsf" -major "${CMAKE_PROJECT_VERSION_MAJOR}" -minor "${CMAKE_PROJECT_VERSION_MINOR}" -micro 0 -icon "isle.smdh" -banner "isle.bnr" -elf "isle.elf" + DEPENDS "ISLE/res/3ds/template.rsf" "isle.smdh" "isle.bnr" + COMMENT "Building CIA executable target isle.cia" + VERBATIM + ) + add_custom_target("isle_cia" ALL DEPENDS "isle.cia" isle) + endif() install(FILES "$/isle.3dsx" DESTINATION "${CMAKE_INSTALL_BINDIR}") install(FILES "$/isle.cia" DESTINATION "${CMAKE_INSTALL_BINDIR}") endif()