diff --git a/CMakeLists.txt b/CMakeLists.txt index f885052dc..7b6de581d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1040,6 +1040,8 @@ if(DISTBUILD) set(CPACK_COMPONENTS_ALL ${BINARY_NAME} ${BINARY_NAME}-wii) elseif(PSP2) set(CPACK_COMPONENTS_ALL ${BINARY_NAME} ${BINARY_NAME}-psp2) + elseif(SWITCH) + set(CPACK_COMPONENTS_ALL ${BINARY_NAME} ${BINARY_NAME}-switch) endif() endif() @@ -1064,6 +1066,8 @@ elseif(PSP2) cpack_add_component(${BINARY_NAME}-psp2 GROUP base) elseif(WII) cpack_add_component(${BINARY_NAME}-wii GROUP base) +elseif(SWITCH) + cpack_add_component(${BINARY_NAME}-switch GROUP base) endif() if(BUILD_QT) diff --git a/src/platform/switch/CMakeLists.txt b/src/platform/switch/CMakeLists.txt index c21d34cd0..8b511705e 100644 --- a/src/platform/switch/CMakeLists.txt +++ b/src/platform/switch/CMakeLists.txt @@ -49,3 +49,5 @@ add_custom_command(OUTPUT romfs.bin add_custom_target(${BINARY_NAME}.nro ALL ${ELF2NRO} ${BINARY_NAME}.elf ${BINARY_NAME}.nro --romfs=romfs.bin --nacp=control.nacp --icon="${CMAKE_CURRENT_SOURCE_DIR}/icon.jpg" DEPENDS ${BINARY_NAME}.elf control.nacp ${CMAKE_CURRENT_SOURCE_DIR}/icon.jpg romfs.bin) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${BINARY_NAME}.nro DESTINATION . COMPONENT ${BINARY_NAME}-switch)