Skip to content

Instantly share code, notes, and snippets.

@d235j
Created January 29, 2024 19:38
Show Gist options
  • Save d235j/2365a7617e52690fdb36161d304e672a to your computer and use it in GitHub Desktop.
Save d235j/2365a7617e52690fdb36161d304e672a to your computer and use it in GitHub Desktop.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5cdd3e31..1191bc44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -334,6 +334,10 @@ if(PROJECT_IS_TOP_LEVEL)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake.in" [=[
@PACKAGE_INIT@
+ include(CMakeFindDependencyMacro)
+ if(@ENABLE_OPT@)
+ find_dependency(SPIRV-Tools-opt)
+ endif()
@INSTALL_CONFIG_UNIX@
include("@PACKAGE_PATH_EXPORT_TARGETS@")
]=])
@@ -341,9 +345,8 @@ if(PROJECT_IS_TOP_LEVEL)
set(PATH_EXPORT_TARGETS "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake")
if(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
set(INSTALL_CONFIG_UNIX [=[
- include(CMakeFindDependencyMacro)
set(THREADS_PREFER_PTHREAD_FLAG ON)
- find_dependency(Threads REQUIRED)
+ find_dependency(Threads)
]=])
endif()
configure_package_config_file(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment