Add nintendo switch support

This commit is contained in:
2026-03-21 10:18:01 +01:00
parent 6beef97cdf
commit 3b0b103eb3
9 changed files with 214 additions and 76 deletions
+35 -3
View File
@@ -5,10 +5,42 @@ project(gfx-tests)
add_executable(gfx-tests ${CMAKE_CURRENT_SOURCE_DIR}/source/main.cpp)
target_link_libraries(gfx-tests PRIVATE palladium::palladium pd-system stb)
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Nintendo3DS")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Nintendo3DS")
target_link_libraries(gfx-tests PRIVATE ctru)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "NintendoSwitch")
target_link_libraries(gfx-tests
PRIVATE
glad
glfw3
EGL
glapi
drm_nouveau
nx
)
target_compile_definitions(gfx-tests PRIVATE __SWITCH__ ENABLE_NXLINK)
else()
target_link_libraries(gfx-tests PRIVATE glfw)
endif()
install(
TARGETS gfx-tests
)
)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Nintendo3DS")
make_3ds_target(
"gfx-tests"
"Palladium Gfx Tests"
"tobid7"
"1.0.0"
"${CMAKE_CURRENT_SOURCE_DIR}/../assets/icon48.png"
"${CMAKE_CURRENT_SOURCE_DIR}/../assets"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "NintendoSwitch")
make_nx_target(
"gfx-tests"
"Palladium Gfx Tests"
"tobid7"
"1.0.0"
"${CMAKE_CURRENT_SOURCE_DIR}/../assets/icon.jpg"
"${CMAKE_CURRENT_SOURCE_DIR}/../assets"
)
endif()