Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11735 from Pokechu22/cmake-no-spirv-cross-on-linux
CMake: Don't include SPIRV-Cross except on Windows and macOS
  • Loading branch information
lioncash committed Apr 7, 2023
2 parents 5686c61 + 969d5e0 commit aaedc28
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Expand Up @@ -693,7 +693,11 @@ endif()
add_subdirectory(Externals/imgui)
add_subdirectory(Externals/implot)
add_subdirectory(Externals/glslang)
add_subdirectory(Externals/spirv_cross)
# SPIRV-Cross is used on Windows for GLSL to HLSL conversion for the Direct3D 11 and Direct3D 12
# video backends, and on Apple devices for the Metal video backend.
if(WIN32 OR APPLE)
add_subdirectory(Externals/spirv_cross)
endif()

if(ENABLE_VULKAN)
add_definitions(-DHAS_VULKAN)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/CMakeLists.txt
Expand Up @@ -299,7 +299,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(common PUBLIC dl rt)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
if(WIN32)
target_sources(common PRIVATE HRWrap.h HRWrap.cpp)
endif()

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/CMakeLists.txt
Expand Up @@ -2,7 +2,7 @@ add_subdirectory(OGL)
add_subdirectory(Null)
add_subdirectory(Software)

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
if(WIN32)
add_subdirectory(D3DCommon)
add_subdirectory(D3D)
add_subdirectory(D3D12)
Expand Down

0 comments on commit aaedc28

Please sign in to comment.