[shaderc] update (#6689)

* update shaderc

* update shaderc

* fix glslang cmake targets, re enable vcpkg_fixup_cmake_targets()

* [spirv-tools] comment python distutils

* remove comments, change path

* glslang fix cmake targets

* change version
This commit is contained in:
Christophe Delacourt 2019-06-28 00:38:53 +02:00 committed by dan-shaw
parent 35e985d3cc
commit 66f1d9a747
17 changed files with 237 additions and 331 deletions

View File

@ -1,133 +1,108 @@
diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake
index 2097881..f0cddd7 100644
--- a/ChooseMSVCCRT.cmake
+++ b/ChooseMSVCCRT.cmake
@@ -102,4 +102,4 @@ set(MSVC_CRT
MT
MTd)
-choose_msvc_crt(MSVC_CRT)
+# choose_msvc_crt(MSVC_CRT)
diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
index 5bb3f0e..e7be6e6 100644
--- a/OGLCompilersDLL/CMakeLists.txt
+++ b/OGLCompilersDLL/CMakeLists.txt
@@ -9,6 +9,12 @@ 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}
+ )
+ export(TARGETS OGLCompiler
+ NAMESPACE glslang::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/OGLCompiler-config.cmake"
+ )
endif(ENABLE_GLSLANG_INSTALL)
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
index b682419..3a10f1a 100755
--- a/SPIRV/CMakeLists.txt
+++ b/SPIRV/CMakeLists.txt
@@ -64,8 +64,14 @@ if(WIN32)
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS SPIRV SPVRemapper
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS SPIRV EXPORT glslangConfig
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+ export(TARGETS SPIRV
+ NAMESPACE glslang::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake"
+ )
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
endif(ENABLE_GLSLANG_INSTALL)
diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
index 7a50ab6..b70345e 100644
--- a/glslang/CMakeLists.txt
+++ b/glslang/CMakeLists.txt
@@ -97,8 +97,19 @@ if(WIN32)
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS glslang
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS glslang EXPORT glslangConfig
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+ export(TARGETS glslang
+ NAMESPACE glslang::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake"
+ )
+ install(
+ EXPORT glslangConfig
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/glslang"
+ NAMESPACE glslang::
+ )
endif(ENABLE_GLSLANG_INSTALL)
if(ENABLE_GLSLANG_INSTALL)
diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt
index 1bf49e1..edd733c 100644
--- a/glslang/OSDependent/Unix/CMakeLists.txt
+++ b/glslang/OSDependent/Unix/CMakeLists.txt
@@ -3,6 +3,12 @@ set_property(TARGET OSDependent PROPERTY FOLDER glslang)
set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON)
if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OSDependent
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS OSDependent EXPORT glslangConfig
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+ export(TARGETS OSDependent
+ NAMESPACE glslang::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake"
+ )
endif(ENABLE_GLSLANG_INSTALL)
diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt
index f257418..cadd70d 100644
--- a/glslang/OSDependent/Windows/CMakeLists.txt
+++ b/glslang/OSDependent/Windows/CMakeLists.txt
@@ -15,6 +15,12 @@ if(WIN32)
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OSDependent
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS OSDependent EXPORT glslangConfig
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+ export(TARGETS OSDependent
+ NAMESPACE glslang::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake"
+ )
endif(ENABLE_GLSLANG_INSTALL)
diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt
index 98dfad7..94d96a0 100755
--- a/hlsl/CMakeLists.txt
+++ b/hlsl/CMakeLists.txt
@@ -26,6 +26,12 @@ if(WIN32)
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS HLSL
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS HLSL EXPORT glslangConfig
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+ export(TARGETS HLSL
+ NAMESPACE glslang::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/HLSL-config.cmake"
+ )
endif(ENABLE_GLSLANG_INSTALL)
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()

View File

@ -0,0 +1,12 @@
diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt
index f257418..82a3f3c 100644
--- a/glslang/OSDependent/Windows/CMakeLists.txt
+++ b/glslang/OSDependent/Windows/CMakeLists.txt
@@ -15,6 +15,6 @@ if(WIN32)
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OSDependent
+ install(TARGETS OSDependent EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)

View File

@ -1,4 +1,4 @@
Source: glslang
Version: 2018-03-02-2
Version: 2019-03-05
Homepage: https://github.com/KhronosGroup/glslang
Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator
Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator

View File

@ -5,11 +5,12 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/glslang
REF b5b5f918c6b72d7cf2ee73641cc6c6ddb211ca70
SHA512 ec0f7a23fa60457a481c7b3acf4c127c3bf898d23655d346aeafb304f74e798d632c83d676873f2c764d241de6dc4392cff8d6ce0ee509a4b74ee2233b01c008
REF f88e5824d2cfca5edc58c7c2101ec9a4ec36afac
SHA512 92dc287e8930db6e00bde23b770f763dc3cf8a405a37b682bbd65e1dbde1f1f5161543fcc70b09eef07a5ce8bbe8f368ef84ac75003c122f42d1f6b9eaa8bd50
HEAD_REF master
PATCHES
CMakeLists-targets.patch
CMakeLists-windows.patch
)
vcpkg_configure_cmake(
@ -20,8 +21,6 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets()
file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")

View File

@ -1,23 +0,0 @@
From 563bc6e87a43c38b5495469307922c768edbd191 Mon Sep 17 00:00:00 2001
From: neil <neil@codeplay.com>
Date: Thu, 1 Feb 2018 06:49:44 +0000
Subject: [PATCH] Add a virtual destructor, otherwise Clang 6.0complains about
delete being called on an abstract class.
---
libshaderc/include/shaderc/shaderc.hpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp
index 1c557431..335f0df9 100644
--- a/libshaderc/include/shaderc/shaderc.hpp
+++ b/libshaderc/include/shaderc/shaderc.hpp
@@ -180,6 +180,8 @@ class CompileOptions {
// Handles shaderc_include_result_release_fn callbacks.
virtual void ReleaseInclude(shaderc_include_result* data) = 0;
+
+ virtual ~IncluderInterface() = default;
};
// Sets the includer instance for libshaderc to call during compilation, as

View File

@ -1,30 +0,0 @@
From e8e12e856cbc41f9bdcc83bc87eb5013df199ee1 Mon Sep 17 00:00:00 2001
From: vlj <vljn.ovi@gmail.com>
Date: Fri, 2 Dec 2016 16:36:25 +0100
Subject: [PATCH] Do not generate build-version.inc
---
CMakeLists.txt | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4c2fac..5544a2d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,8 +53,8 @@ add_subdirectory(libshaderc)
add_subdirectory(glslc)
add_subdirectory(examples)
-add_custom_target(build-version
- ${PYTHON_EXE}
- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
+#add_custom_target(build-version
+# ${PYTHON_EXE}
+# ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
+# ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
+# COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
--
2.10.2.windows.1

View File

@ -1,5 +1,5 @@
Source: shaderc
Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2
Version: 2019-06-26
Homepage: https://github.com/google/shaderc
Description: A collection of tools, libraries and tests for shader compilation.
Build-Depends: glslang, spirv-tools
Build-Depends: glslang, spirv-tools

View File

@ -1,3 +1,5 @@
"shaderc v2016.2-dev unknown hash, 2016-12-02\n"
"spirv-tools v2016.6-dev unknown hash, 2016-12-02\n"
"glslang unknown hash, 2016-12-02\n"
"shaderc v2019.0-dev unknown hash, 2019-05-08\n"
"spirv-tools v2019.3-dev unknown hash, 2019-04-03\n"
"glslang unknown hash, 2019-03-05\n"

View File

@ -0,0 +1,41 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4e779b..dc5f1a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,12 +81,6 @@ add_subdirectory(libshaderc)
add_subdirectory(glslc)
add_subdirectory(examples)
-add_custom_target(build-version
- ${PYTHON_EXECUTABLE}
- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
-
function(define_pkg_config_file NAME LIBS)
add_custom_target(${NAME}-pkg-config ALL
COMMAND ${CMAKE_COMMAND}
diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt
index acf6fb0..d0df7db 100644
--- a/glslc/CMakeLists.txt
+++ b/glslc/CMakeLists.txt
@@ -26,7 +26,6 @@ shaderc_default_compile_options(glslc_exe)
target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include)
set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc)
target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc)
-add_dependencies(glslc_exe build-version)
shaderc_add_tests(
TEST_PREFIX glslc
diff --git a/spvc/CMakeLists.txt b/spvc/CMakeLists.txt
index f465972..76f8c2e 100644
--- a/spvc/CMakeLists.txt
+++ b/spvc/CMakeLists.txt
@@ -3,7 +3,6 @@ shaderc_default_compile_options(spvc_exe)
target_include_directories(spvc_exe PRIVATE ${shaderc_SOURCE_DIR}/libshaderc/include ${spirv-tools_SOURCE_DIR}/include)
set_target_properties(spvc_exe PROPERTIES OUTPUT_NAME spvc)
target_link_libraries(spvc_exe PRIVATE shaderc_spvc shaderc_util)
-add_dependencies(spvc_exe build-version)
shaderc_add_asciidoc(spvc_doc_README README)

View File

@ -0,0 +1,26 @@
diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt
index 9d07136..0ffa06f 100644
--- a/libshaderc/CMakeLists.txt
+++ b/libshaderc/CMakeLists.txt
@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL)
# around this problem by manually substitution.
string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}"
install_location "${generated_location}")
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
diff --git a/libshaderc_spvc/CMakeLists.txt b/libshaderc_spvc/CMakeLists.txt
index fae235e..b503e70 100644
--- a/libshaderc_spvc/CMakeLists.txt
+++ b/libshaderc_spvc/CMakeLists.txt
@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL)
# around this problem by manually substitution.
string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}"
install_location "${generated_location}")
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()

View File

@ -3,17 +3,19 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/shaderc
REF 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da
SHA512 6fb45a0b01e6709c44a11658648b9271fe06bd94023dcc5042c47b5f2a04889c2efb0ab4c166f18728594ac9b9aa9f8b354af46d88eb7f7c39c7246f52f5a933
REF 05c766a1f4615ee37d37d09271aaabca30ffd293
SHA512 329697e8e23d619313440d57ef740a94c49d13533e1b8734fc8ff72fd5092c2addabb306f64cb69160fa5fee373a05ba39a5ee6d92d95e5e2e9c7ec96a51aadc
HEAD_REF master
PATCHES
0001-Do-not-generate-build-version.inc.patch
0001-Add-a-virtual-destructor.patch
PATCHES
"disable-update-version.patch"
"fix-install.patch"
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_spirv.txt DESTINATION ${SOURCE_PATH}/third_party/spirv-tools)
file(RENAME ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists_spirv.txt ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists.txt)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src)
#Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work
@ -30,7 +32,7 @@ vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} -Dglslang_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include
OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} -Dglslang_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include -Dspirv-tools_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include
OPTIONS_DEBUG -DSUFFIX_D=true
OPTIONS_RELEASE -DSUFFIX_D=false
)

View File

@ -1,3 +1,3 @@
Source: spirv-headers
Version: 2019-03-05
Version: 2019-05-05
Description: Machine-readable files for the SPIR-V Registry

View File

@ -4,8 +4,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/SPIRV-Headers
REF 03a081524afabdde274d885880c2fef213e46a59
SHA512 27f0a4b5efbe2931c0ff5d50e5fb5bd78fe0a735ad48a08db72c8914f2de05f5d5c507134e0a090bb5a7d88e2f8c1a0bdbf51a0bc4b9fe3bf372da7000ca0b98
REF c4f8f65792d4bf2657ca751904c511bbcf2ac77b
SHA512 750af53a70f6f890657735ab0e2db5ae3dd8d612480efc2247753993752f687e22a0bdd65296c5751daf284604fe3dc9ee0a94feae88761a0e64adc64e6d17a4
HEAD_REF master
)

View File

@ -1,119 +0,0 @@
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 2d7d7ca..bf77be7 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -327,31 +327,41 @@ set_source_files_properties(
add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES})
spvtools_default_compile_options(${SPIRV_TOOLS})
target_include_directories(${SPIRV_TOOLS}
- PUBLIC ${spirv-tools_SOURCE_DIR}/include
+ PUBLIC "$<BUILD_INTERFACE:${spirv-tools_SOURCE_DIR}/include>"
PRIVATE ${spirv-tools_BINARY_DIR}
PRIVATE ${SPIRV_HEADER_INCLUDE_DIR}
)
set_property(TARGET ${SPIRV_TOOLS} PROPERTY FOLDER "SPIRV-Tools libraries")
spvtools_check_symbol_exports(${SPIRV_TOOLS})
-add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES})
-spvtools_default_compile_options(${SPIRV_TOOLS}-shared)
-target_include_directories(${SPIRV_TOOLS}-shared
- PUBLIC ${spirv-tools_SOURCE_DIR}/include
- PRIVATE ${spirv-tools_BINARY_DIR}
- PRIVATE ${SPIRV_HEADER_INCLUDE_DIR}
- )
-set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden)
-set_property(TARGET ${SPIRV_TOOLS}-shared PROPERTY FOLDER "SPIRV-Tools libraries")
-spvtools_check_symbol_exports(${SPIRV_TOOLS}-shared)
-target_compile_definitions(${SPIRV_TOOLS}-shared
- PRIVATE SPIRV_TOOLS_IMPLEMENTATION
- PUBLIC SPIRV_TOOLS_SHAREDLIB
-)
+# add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES})
+# spvtools_default_compile_options(${SPIRV_TOOLS}-shared)
+# target_include_directories(${SPIRV_TOOLS}-shared
+# PUBLIC ${spirv-tools_SOURCE_DIR}/include
+# PRIVATE ${spirv-tools_BINARY_DIR}
+# PRIVATE ${SPIRV_HEADER_INCLUDE_DIR}
+# )
+# set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden)
+# set_property(TARGET ${SPIRV_TOOLS}-shared PROPERTY FOLDER "SPIRV-Tools libraries")
+# spvtools_check_symbol_exports(${SPIRV_TOOLS}-shared)
+# target_compile_definitions(${SPIRV_TOOLS}-shared
+# PRIVATE SPIRV_TOOLS_IMPLEMENTATION
+# PUBLIC SPIRV_TOOLS_SHAREDLIB
+# )
if(ENABLE_SPIRV_TOOLS_INSTALL)
- install(TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared
+ install(TARGETS ${SPIRV_TOOLS} EXPORT spirv-tools-config
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ export(
+ TARGETS ${SPIRV_TOOLS}
+ NAMESPACE spirv-tools::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-config.cmake"
+ )
+ install(
+ EXPORT spirv-tools-config
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/spirv-tools"
+ NAMESPACE spirv-tools::
+ )
endif(ENABLE_SPIRV_TOOLS_INSTALL)
diff --git a/source/link/CMakeLists.txt b/source/link/CMakeLists.txt
index 8ca4df3..ac0aa62 100644
--- a/source/link/CMakeLists.txt
+++ b/source/link/CMakeLists.txt
@@ -17,7 +17,7 @@ add_library(SPIRV-Tools-link
spvtools_default_compile_options(SPIRV-Tools-link)
target_include_directories(SPIRV-Tools-link
- PUBLIC ${spirv-tools_SOURCE_DIR}/include
+ PUBLIC "$<BUILD_INTERFACE:${spirv-tools_SOURCE_DIR}/include>"
PUBLIC ${SPIRV_HEADER_INCLUDE_DIR}
PRIVATE ${spirv-tools_BINARY_DIR}
)
@@ -29,8 +29,13 @@ set_property(TARGET SPIRV-Tools-link PROPERTY FOLDER "SPIRV-Tools libraries")
spvtools_check_symbol_exports(SPIRV-Tools-link)
if(ENABLE_SPIRV_TOOLS_INSTALL)
- install(TARGETS SPIRV-Tools-link
+ install(TARGETS SPIRV-Tools-link EXPORT spirv-tools-config
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ export(
+ TARGETS ${SPIRV_TOOLS}-link
+ NAMESPACE spirv-tools::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-link-config.cmake"
+ )
endif(ENABLE_SPIRV_TOOLS_INSTALL)
diff --git a/source/opt/CMakeLists.txt b/source/opt/CMakeLists.txt
index 854c950..fc91539 100644
--- a/source/opt/CMakeLists.txt
+++ b/source/opt/CMakeLists.txt
@@ -159,7 +159,7 @@ add_library(SPIRV-Tools-opt
spvtools_default_compile_options(SPIRV-Tools-opt)
target_include_directories(SPIRV-Tools-opt
- PUBLIC ${spirv-tools_SOURCE_DIR}/include
+ PUBLIC "$<BUILD_INTERFACE:${spirv-tools_SOURCE_DIR}/include>"
PUBLIC ${SPIRV_HEADER_INCLUDE_DIR}
PRIVATE ${spirv-tools_BINARY_DIR}
)
@@ -171,9 +171,14 @@ set_property(TARGET SPIRV-Tools-opt PROPERTY FOLDER "SPIRV-Tools libraries")
spvtools_check_symbol_exports(SPIRV-Tools-opt)
if(ENABLE_SPIRV_TOOLS_INSTALL)
- install(TARGETS SPIRV-Tools-opt
+ install(TARGETS SPIRV-Tools-opt EXPORT spirv-tools-config
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ export(
+ TARGETS ${SPIRV_TOOLS}-opt
+ NAMESPACE spirv-tools::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-opt-config.cmake"
+ )
endif(ENABLE_SPIRV_TOOLS_INSTALL)

View File

@ -1,5 +1,5 @@
Source: spirv-tools
Version: 2018.1-2
Version: 2019.3-dev
Homepage: https://github.com/KhronosGroup/SPIRV-Tools
Description: API and commands for processing SPIR-V modules
Build-Depends: spirv-headers
Build-Depends: spirv-headers

View File

@ -0,0 +1,22 @@
diff --git a/utils/generate_registry_tables.py b/utils/generate_registry_tables.py
index 8b1c3572..6ab28fe6 100644
--- a/utils/generate_registry_tables.py
+++ b/utils/generate_registry_tables.py
@@ -16,7 +16,7 @@
from __future__ import print_function
-import distutils.dir_util
+#import distutils.dir_util
import os.path
import xml.etree.ElementTree
@@ -64,7 +64,7 @@ def main():
with open(args.xml) as xml_in:
registry = xml.etree.ElementTree.fromstring(xml_in.read())
- distutils.dir_util.mkpath(os.path.dirname(args.generator_output))
+ #distutils.dir_util.mkpath(os.path.dirname(args.generator_output))
print(generate_vendor_table(registry), file=open(args.generator_output, 'w'))

View File

@ -5,11 +5,10 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/SPIRV-Tools
REF v2018.1
SHA512 0637c413dafd931e8222f9bf70a024f8b64116f0300c7732b86bcaff321188a0e746f79c1385ae23a7692e83194586b57692960d5be607fb2d7960731b6cd63f
HEAD_REF master
REF d0a1f5a05a2b0f8315e5b3f17b8e34c730861b31
SHA512 7179751b0216368b4a4bf8c9b0c1c1e3b17d6aa4788b4aeaa7fbb2b6d9d50b34cf209082f3531a2e0994b5fc02416373666d4d12cee282cec2c3d02c13a640a8
PATCHES
CMake-targets.patch
comment-distutils.patch
)
vcpkg_find_acquire_program(PYTHON3)