Skip to content

Commit f632217

Browse files
authored
Fixes libretro NSwitch build (#2891)
1 parent ae1195a commit f632217

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

cmake/nswitch.cmake

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,25 @@ if(NINTENDO_SWITCH)
1010
PRIVATE ${TIC80LIB_DIR}/studio)
1111
endif()
1212

13-
target_sources(${TIC80_TARGET} PRIVATE
14-
src/system/nswitch/runtime.c)
15-
16-
find_package(PkgConfig)
17-
pkg_search_module(CURL libcurl IMPORTED_TARGET)
18-
target_link_libraries(tic80 PkgConfig::CURL)
19-
20-
nx_generate_nacp(tic80.nacp
21-
NAME "TIC-80 tiny computer"
22-
AUTHOR "Nesbox, carstene1ns"
23-
VERSION ${PROJECT_VERSION})
24-
25-
nx_create_nro(${TIC80_TARGET}
26-
NACP tic80.nacp
27-
ICON ${CMAKE_SOURCE_DIR}/build/nswitch/icon.jpg
28-
#ROMFS ${CMAKE_SOURCE_DIR}/build/nswitch/romfs
29-
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/tic80.nro)
30-
31-
dkp_target_generate_symbol_list(${TIC80_TARGET})
13+
if(NOT ${BUILD_LIBRETRO})
14+
target_sources(${TIC80_TARGET} PRIVATE
15+
src/system/nswitch/runtime.c)
16+
17+
find_package(PkgConfig)
18+
pkg_search_module(CURL libcurl IMPORTED_TARGET)
19+
target_link_libraries(tic80 PkgConfig::CURL)
20+
21+
nx_generate_nacp(tic80.nacp
22+
NAME "TIC-80 tiny computer"
23+
AUTHOR "Nesbox, carstene1ns"
24+
VERSION ${PROJECT_VERSION})
25+
26+
nx_create_nro(${TIC80_TARGET}
27+
NACP tic80.nacp
28+
ICON ${CMAKE_SOURCE_DIR}/build/nswitch/icon.jpg
29+
#ROMFS ${CMAKE_SOURCE_DIR}/build/nswitch/romfs
30+
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/tic80.nro)
31+
32+
dkp_target_generate_symbol_list(${TIC80_TARGET})
33+
endif()
3234
endif()

0 commit comments

Comments
 (0)