Skip to content

Commit

Permalink
WIP: add romfs handling
Browse files Browse the repository at this point in the history
  • Loading branch information
carstene1ns committed Mar 4, 2022
1 parent 5afd5c4 commit e567dd0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ if(${PLAYER_TARGET_PLATFORM} MATCHES "^(3ds|psvita|switch|wii)$")
set(CMAKE_DL_LIBS "") # hack4icu!
set(PLAYER_ENABLE_TESTS OFF)
endif()
# Make romfs available
if(${PLAYER_TARGET_PLATFORM} MATCHES "^(3ds|switch)$")
option(PLAYER_ROMFS OFF)
set(PLAYER_ROMFS_PATH "romfs" CACHE PATH "Directory to include in executable as romfs:/ path")
endif()

if(NOT PLAYER_BUILD_EXECUTABLE AND BUILD_SHARED_LIBS)
# Need fPIC when compiling a shared library (e.g. libretro.so)
Expand Down Expand Up @@ -945,7 +950,8 @@ elseif(${PLAYER_TARGET_PLATFORM} MATCHES "^(psvita|3ds|switch|wii)$")
AUTHOR "EasyRPG Team"
ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/3ds/icon.png)
ctr_create_3dsx(easyrpg-player
SMDH easyrpg-player.smdh)
SMDH easyrpg-player.smdh
$<$<BOOL:${PLAYER_ROMFS}>:ROMFS ${PLAYER_ROMFS_PATH}>)
elseif(NINTENDO_SWITCH)
target_link_libraries(easyrpg-player
${PROJECT_NAME}
Expand All @@ -957,7 +963,8 @@ elseif(${PLAYER_TARGET_PLATFORM} MATCHES "^(psvita|3ds|switch|wii)$")
VERSION "${PROJECT_VERSION}")
nx_create_nro(easyrpg-player
NACP easyrpg-player.nacp
ICON "${PROJECT_SOURCE_DIR}/resources/switch/icon.jpg")
ICON "${PROJECT_SOURCE_DIR}/resources/switch/icon.jpg"
$<$<BOOL:${PLAYER_ROMFS}>:ROMFS ${PLAYER_ROMFS_PATH}>)
elseif(NINTENDO_WII)
target_link_libraries(easyrpg-player
${PROJECT_NAME}
Expand Down

0 comments on commit e567dd0

Please sign in to comment.