vcpkg/ports/glslang/cmake.patch

57 lines
2.0 KiB
Diff

diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
index a80e74ed..8a1d8867 100644
--- a/SPIRV/CMakeLists.txt
+++ b/SPIRV/CMakeLists.txt
@@ -99,14 +99,9 @@ if(WIN32 AND BUILD_SHARED_LIBS)
endif()
if(ENABLE_OPT)
- target_include_directories(SPIRV
- PRIVATE ${spirv-tools_SOURCE_DIR}/include
- PRIVATE ${spirv-tools_SOURCE_DIR}/source
- )
- target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt)
+ target_link_libraries(SPIRV PRIVATE MachineIndependent PUBLIC SPIRV-Tools-opt)
target_include_directories(SPIRV PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
else()
target_link_libraries(SPIRV PRIVATE MachineIndependent)
endif()
diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
index ad88442c..5ca185ae 100644
--- a/StandAlone/CMakeLists.txt
+++ b/StandAlone/CMakeLists.txt
@@ -68,14 +68,7 @@ endif()
target_link_libraries(glslang-standalone ${LIBRARIES})
target_include_directories(glslang-standalone PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
-
-if(ENABLE_OPT)
- target_include_directories(glslang-standalone
- PRIVATE ${spirv-tools_SOURCE_DIR}/include
- )
-endif()
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
if(ENABLE_SPVREMAPPER)
set(REMAPPER_SOURCES spirv-remap.cpp)
diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt
index 408a92db..b73e7f15 100644
--- a/gtests/CMakeLists.txt
+++ b/gtests/CMakeLists.txt
@@ -97,8 +97,8 @@ if(BUILD_TESTING)
${gtest_SOURCE_DIR}/include)
if(ENABLE_OPT)
- target_include_directories(glslangtests
- PRIVATE ${spirv-tools_SOURCE_DIR}/include
+ target_link_libraries(glslangtests
+ PRIVATE SPIRV-Tools-opt
)
endif()