Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Don't include SPIRV-Cross except on Windows and macOS #11735

Merged

Conversation

Pokechu22
Copy link
Contributor

Building it on Linux is unnecessary as Direct3D and Metal are unavailable.

These checks match the checks used in VideoBackends/CMakeLists.txt:

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_subdirectory(D3DCommon)
add_subdirectory(D3D)
add_subdirectory(D3D12)
endif()
if(APPLE)
add_subdirectory(Metal)
endif()

CMakeLists.txt Outdated
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((CMAKE_SYSTEM_NAME STREQUAL "Windows") OR APPLE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use WIN32 as a shorter alternative to CMAKE_SYSTEM_NAME STREQUAL "Windows"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these defined to be the same thing? If so I'll swap both uses.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation doesn't say it for sure, but it does say it also applies to 64-bit windows, which is good enough for me.

@Pokechu22 Pokechu22 force-pushed the cmake-no-spirv-cross-on-linux branch from b9d5dfd to 969d5e0 Compare April 7, 2023 01:38
@lioncash lioncash merged commit aaedc28 into dolphin-emu:master Apr 7, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants