Always disable glslang build for NintendoSwitch on Windows

This commit is contained in:
2026-09-06 16:06:14 +02:00
committed by tobid7
parent 5238e6b5e5
commit c6712b1975
2 changed files with 20 additions and 16 deletions
+19 -15
View File
@@ -1,23 +1,27 @@
cmake_minimum_required(VERSION 3.22) cmake_minimum_required(VERSION 3.22)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Nintendo3DS") if(${CMAKE_SYSTEM_NAME} STREQUAL "Nintendo3DS")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libpicasso) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libpicasso)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "NintendoSwitch") elseif(${CMAKE_SYSTEM_NAME} STREQUAL "NintendoSwitch")
# SPIRV-Helper # SPIRV-Helper
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-helper) if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
# For some reason cmake is generating wrong headers for glslang on windows
set(SPV_EXCLUDE_GLSLANG ON CACHE BOOL "")
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-helper)
else() else()
# GLAD # GLAD
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glad) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glad)
# SPIRV-Helper # SPIRV-Helper
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-helper) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-helper)
endif() endif()
# STB # STB
add_library(stb INTERFACE) add_library(stb INTERFACE)
target_include_directories(stb target_include_directories(stb
INTERFACE INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/stb> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/stb>
$<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include>
) )
install(TARGETS stb install(TARGETS stb
EXPORT palladiumTargets EXPORT palladiumTargets
@@ -25,9 +29,9 @@ install(TARGETS stb
) )
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Nintendo3DS" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "NintendoSwitch") if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Nintendo3DS" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "NintendoSwitch")
# GLFW # GLFW
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "") set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "")
set(GLFW_BUILD_TESTS OFF CACHE BOOL "") set(GLFW_BUILD_TESTS OFF CACHE BOOL "")
set(GLFW_BUILD_DOCS OFF CACHE BOOL "") set(GLFW_BUILD_DOCS OFF CACHE BOOL "")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glfw) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glfw)
endif() endif()