vcpkg/ports/glslang/CMakeLists-targets.patch

109 lines
4.0 KiB
Diff
Raw Normal View History

diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake
index 2097881..f6320a9 100644
--- a/ChooseMSVCCRT.cmake
+++ b/ChooseMSVCCRT.cmake
@@ -102,4 +102,3 @@ set(MSVC_CRT
MT
MTd)
-choose_msvc_crt(MSVC_CRT)
diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
index 5bb3f0e..90ba3be 100644
--- a/OGLCompilersDLL/CMakeLists.txt
+++ b/OGLCompilersDLL/CMakeLists.txt
@@ -9,6 +9,7 @@ if(WIN32)
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OGLCompiler
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS OGLCompiler EXPORT glslangConfig
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
index 1997e74..e2a0229 100644
--- a/SPIRV/CMakeLists.txt
+++ b/SPIRV/CMakeLists.txt
@@ -46,7 +46,6 @@ endif(ENABLE_NV_EXTENSIONS)
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_include_directories(SPIRV PUBLIC ..)
if (ENABLE_SPVREMAPPER)
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
@@ -78,13 +77,13 @@ if(WIN32)
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
- if(BUILD_SHARED_LIBS)
+ if(BUILD_SHARED_LIBS OR TRUE)
if (ENABLE_SPVREMAPPER)
install(TARGETS SPVRemapper
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
- install(TARGETS SPIRV
+ install(TARGETS SPIRV EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
index 5f51476..7f11498 100644
--- a/glslang/CMakeLists.txt
+++ b/glslang/CMakeLists.txt
@@ -86,7 +86,6 @@ add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${H
set_property(TARGET glslang PROPERTY FOLDER glslang)
set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(glslang OGLCompiler OSDependent)
-target_include_directories(glslang PUBLIC ..)
if(WIN32 AND BUILD_SHARED_LIBS)
set_target_properties(glslang PROPERTIES PREFIX "")
@@ -105,10 +104,15 @@ if(WIN32)
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
- if(BUILD_SHARED_LIBS)
- install(TARGETS glslang
+ if(BUILD_SHARED_LIBS OR TRUE)
+ install(TARGETS glslang EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(
+ EXPORT glslangConfig
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/glslang"
+ NAMESPACE glslang::
+ )
else()
install(TARGETS glslang
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt
index e652f45..a9673fe 100644
--- a/glslang/OSDependent/Unix/CMakeLists.txt
+++ b/glslang/OSDependent/Unix/CMakeLists.txt
@@ -20,6 +20,6 @@ else()
endif()
if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OSDependent
+ install(TARGETS OSDependent EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)
diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt
index f918d7a..329800f 100644
--- a/hlsl/CMakeLists.txt
+++ b/hlsl/CMakeLists.txt
@@ -32,8 +32,8 @@ if(WIN32)
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
- if(BUILD_SHARED_LIBS)
- install(TARGETS HLSL
+ if(BUILD_SHARED_LIBS OR TRUE)
+ install(TARGETS HLSL EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()