From f07cc2ec4ce75fe02950278c66e1f4cb31f63eb2 Mon Sep 17 00:00:00 2001 From: Christophe Delacourt Date: Thu, 30 May 2019 14:16:29 +0200 Subject: [PATCH 1/7] update shaderc --- ports/glslang/CONTROL | 2 +- ports/glslang/portfile.cmake | 6 +- .../0001-Add-a-virtual-destructor.patch | 23 ---- ...01-Do-not-generate-build-version.inc.patch | 30 ----- ports/shaderc/CONTROL | 3 +- ports/shaderc/build-version.inc | 8 +- ports/shaderc/disable-update-version.patch | 47 +++++++ ports/shaderc/fix-install.patch | 13 ++ ports/shaderc/portfile.cmake | 14 ++- ports/spirv-headers/CONTROL | 2 +- ports/spirv-headers/portfile.cmake | 4 +- ports/spirv-tools/CMake-targets.patch | 119 ------------------ ports/spirv-tools/CONTROL | 2 +- ports/spirv-tools/portfile.cmake | 7 +- 14 files changed, 85 insertions(+), 195 deletions(-) delete mode 100644 ports/shaderc/0001-Add-a-virtual-destructor.patch delete mode 100644 ports/shaderc/0001-Do-not-generate-build-version.inc.patch create mode 100644 ports/shaderc/disable-update-version.patch create mode 100644 ports/shaderc/fix-install.patch delete mode 100644 ports/spirv-tools/CMake-targets.patch diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index 8f6bb6de944537..4f198dd92f97b4 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 2018-03-02-2 +Version: 2019-03-05 Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index 77e15052d1ff07..af9c4f1ff4a742 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -5,8 +5,8 @@ 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 @@ -20,7 +20,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() +#vcpkg_fixup_cmake_targets() file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/shaderc/0001-Add-a-virtual-destructor.patch b/ports/shaderc/0001-Add-a-virtual-destructor.patch deleted file mode 100644 index 0fa6950368cccf..00000000000000 --- a/ports/shaderc/0001-Add-a-virtual-destructor.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 563bc6e87a43c38b5495469307922c768edbd191 Mon Sep 17 00:00:00 2001 -From: neil -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 diff --git a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch b/ports/shaderc/0001-Do-not-generate-build-version.inc.patch deleted file mode 100644 index 41cc81220160ab..00000000000000 --- a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e8e12e856cbc41f9bdcc83bc87eb5013df199ee1 Mon Sep 17 00:00:00 2001 -From: vlj -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 - diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index c428c0ea9e8ff0..be0eb35439d6f6 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,4 +1,5 @@ Source: shaderc -Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2 +Version: 05c766a1f4615ee37d37d09271aaabca30ffd293 Description: A collection of tools, libraries and tests for shader compilation. Build-Depends: glslang, spirv-tools + diff --git a/ports/shaderc/build-version.inc b/ports/shaderc/build-version.inc index 853e89916ee0e8..00c140577a64f2 100644 --- a/ports/shaderc/build-version.inc +++ b/ports/shaderc/build-version.inc @@ -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" + + diff --git a/ports/shaderc/disable-update-version.patch b/ports/shaderc/disable-update-version.patch new file mode 100644 index 00000000000000..8862f9da0813cb --- /dev/null +++ b/ports/shaderc/disable-update-version.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a4e779b..9118653 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -81,11 +81,11 @@ 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).") ++#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 +diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt +index acf6fb0..92da5ce 100644 +--- a/glslc/CMakeLists.txt ++++ b/glslc/CMakeLists.txt +@@ -26,7 +26,7 @@ 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) ++#add_dependencies(glslc_exe build-version) + + shaderc_add_tests( + TEST_PREFIX glslc +diff --git a/spvc/CMakeLists.txt b/spvc/CMakeLists.txt +index f465972..78911b7 100644 +--- a/spvc/CMakeLists.txt ++++ b/spvc/CMakeLists.txt +@@ -3,7 +3,7 @@ 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) ++#add_dependencies(spvc_exe build-version) + + shaderc_add_asciidoc(spvc_doc_README README) + diff --git a/ports/shaderc/fix-install.patch b/ports/shaderc/fix-install.patch new file mode 100644 index 00000000000000..7b437150fb790a --- /dev/null +++ b/ports/shaderc/fix-install.patch @@ -0,0 +1,13 @@ +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/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index 5f1f705722c0bd..fbdc1e4dd1670a 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -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 ) diff --git a/ports/spirv-headers/CONTROL b/ports/spirv-headers/CONTROL index f1b0f7908aca8d..be9ef43928a30e 100644 --- a/ports/spirv-headers/CONTROL +++ b/ports/spirv-headers/CONTROL @@ -1,3 +1,3 @@ Source: spirv-headers -Version: 2019-03-05 +Version: 2019-05-05 Description: Machine-readable files for the SPIR-V Registry diff --git a/ports/spirv-headers/portfile.cmake b/ports/spirv-headers/portfile.cmake index f2c55280d0e093..e5191639dec72a 100644 --- a/ports/spirv-headers/portfile.cmake +++ b/ports/spirv-headers/portfile.cmake @@ -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 ) diff --git a/ports/spirv-tools/CMake-targets.patch b/ports/spirv-tools/CMake-targets.patch deleted file mode 100644 index 6b754e16b6c576..00000000000000 --- a/ports/spirv-tools/CMake-targets.patch +++ /dev/null @@ -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 "$" - 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 "$" - 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 "$" - 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) - diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index 38995e35679215..c811f530438a73 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,4 +1,4 @@ Source: spirv-tools -Version: 2018.1-2 +Version: v2019.3-dev Description: API and commands for processing SPIR-V modules Build-Depends: spirv-headers diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index 3011aa39602cb3..e4e0cdb7a7f6a1 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -5,11 +5,8 @@ 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 - PATCHES - CMake-targets.patch + REF d0a1f5a05a2b0f8315e5b3f17b8e34c730861b31 + SHA512 7179751b0216368b4a4bf8c9b0c1c1e3b17d6aa4788b4aeaa7fbb2b6d9d50b34cf209082f3531a2e0994b5fc02416373666d4d12cee282cec2c3d02c13a640a8 ) vcpkg_find_acquire_program(PYTHON3) From cfc23c1a9e0fe1d0ec9b182c4d4b68c1d9a96bf8 Mon Sep 17 00:00:00 2001 From: Christophe Delacourt Date: Thu, 30 May 2019 14:16:29 +0200 Subject: [PATCH 2/7] update shaderc --- ports/glslang/CONTROL | 2 +- ports/glslang/portfile.cmake | 6 +- .../0001-Add-a-virtual-destructor.patch | 23 ---- ...01-Do-not-generate-build-version.inc.patch | 30 ----- ports/shaderc/CONTROL | 3 +- ports/shaderc/build-version.inc | 8 +- ports/shaderc/disable-update-version.patch | 47 +++++++ ports/shaderc/fix-install.patch | 13 ++ ports/shaderc/portfile.cmake | 14 ++- ports/spirv-headers/CONTROL | 2 +- ports/spirv-headers/portfile.cmake | 4 +- ports/spirv-tools/CMake-targets.patch | 119 ------------------ ports/spirv-tools/CONTROL | 2 +- ports/spirv-tools/portfile.cmake | 7 +- 14 files changed, 85 insertions(+), 195 deletions(-) delete mode 100644 ports/shaderc/0001-Add-a-virtual-destructor.patch delete mode 100644 ports/shaderc/0001-Do-not-generate-build-version.inc.patch create mode 100644 ports/shaderc/disable-update-version.patch create mode 100644 ports/shaderc/fix-install.patch delete mode 100644 ports/spirv-tools/CMake-targets.patch diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index 8f6bb6de944537..4f198dd92f97b4 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 2018-03-02-2 +Version: 2019-03-05 Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index 77e15052d1ff07..af9c4f1ff4a742 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -5,8 +5,8 @@ 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 @@ -20,7 +20,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() +#vcpkg_fixup_cmake_targets() file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/shaderc/0001-Add-a-virtual-destructor.patch b/ports/shaderc/0001-Add-a-virtual-destructor.patch deleted file mode 100644 index 0fa6950368cccf..00000000000000 --- a/ports/shaderc/0001-Add-a-virtual-destructor.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 563bc6e87a43c38b5495469307922c768edbd191 Mon Sep 17 00:00:00 2001 -From: neil -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 diff --git a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch b/ports/shaderc/0001-Do-not-generate-build-version.inc.patch deleted file mode 100644 index 41cc81220160ab..00000000000000 --- a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e8e12e856cbc41f9bdcc83bc87eb5013df199ee1 Mon Sep 17 00:00:00 2001 -From: vlj -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 - diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index c428c0ea9e8ff0..be0eb35439d6f6 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,4 +1,5 @@ Source: shaderc -Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2 +Version: 05c766a1f4615ee37d37d09271aaabca30ffd293 Description: A collection of tools, libraries and tests for shader compilation. Build-Depends: glslang, spirv-tools + diff --git a/ports/shaderc/build-version.inc b/ports/shaderc/build-version.inc index 853e89916ee0e8..00c140577a64f2 100644 --- a/ports/shaderc/build-version.inc +++ b/ports/shaderc/build-version.inc @@ -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" + + diff --git a/ports/shaderc/disable-update-version.patch b/ports/shaderc/disable-update-version.patch new file mode 100644 index 00000000000000..8862f9da0813cb --- /dev/null +++ b/ports/shaderc/disable-update-version.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a4e779b..9118653 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -81,11 +81,11 @@ 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).") ++#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 +diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt +index acf6fb0..92da5ce 100644 +--- a/glslc/CMakeLists.txt ++++ b/glslc/CMakeLists.txt +@@ -26,7 +26,7 @@ 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) ++#add_dependencies(glslc_exe build-version) + + shaderc_add_tests( + TEST_PREFIX glslc +diff --git a/spvc/CMakeLists.txt b/spvc/CMakeLists.txt +index f465972..78911b7 100644 +--- a/spvc/CMakeLists.txt ++++ b/spvc/CMakeLists.txt +@@ -3,7 +3,7 @@ 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) ++#add_dependencies(spvc_exe build-version) + + shaderc_add_asciidoc(spvc_doc_README README) + diff --git a/ports/shaderc/fix-install.patch b/ports/shaderc/fix-install.patch new file mode 100644 index 00000000000000..7b437150fb790a --- /dev/null +++ b/ports/shaderc/fix-install.patch @@ -0,0 +1,13 @@ +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/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index 5f1f705722c0bd..fbdc1e4dd1670a 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -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 ) diff --git a/ports/spirv-headers/CONTROL b/ports/spirv-headers/CONTROL index f1b0f7908aca8d..be9ef43928a30e 100644 --- a/ports/spirv-headers/CONTROL +++ b/ports/spirv-headers/CONTROL @@ -1,3 +1,3 @@ Source: spirv-headers -Version: 2019-03-05 +Version: 2019-05-05 Description: Machine-readable files for the SPIR-V Registry diff --git a/ports/spirv-headers/portfile.cmake b/ports/spirv-headers/portfile.cmake index f2c55280d0e093..e5191639dec72a 100644 --- a/ports/spirv-headers/portfile.cmake +++ b/ports/spirv-headers/portfile.cmake @@ -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 ) diff --git a/ports/spirv-tools/CMake-targets.patch b/ports/spirv-tools/CMake-targets.patch deleted file mode 100644 index 6b754e16b6c576..00000000000000 --- a/ports/spirv-tools/CMake-targets.patch +++ /dev/null @@ -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 "$" - 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 "$" - 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 "$" - 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) - diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index 38995e35679215..c811f530438a73 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,4 +1,4 @@ Source: spirv-tools -Version: 2018.1-2 +Version: v2019.3-dev Description: API and commands for processing SPIR-V modules Build-Depends: spirv-headers diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index 3011aa39602cb3..e4e0cdb7a7f6a1 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -5,11 +5,8 @@ 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 - PATCHES - CMake-targets.patch + REF d0a1f5a05a2b0f8315e5b3f17b8e34c730861b31 + SHA512 7179751b0216368b4a4bf8c9b0c1c1e3b17d6aa4788b4aeaa7fbb2b6d9d50b34cf209082f3531a2e0994b5fc02416373666d4d12cee282cec2c3d02c13a640a8 ) vcpkg_find_acquire_program(PYTHON3) From 1cb954dc09f2dd18c589895d1fa4961dc1d1524e Mon Sep 17 00:00:00 2001 From: Christophe Delacourt Date: Sun, 2 Jun 2019 09:19:41 +0200 Subject: [PATCH 3/7] fix glslang cmake targets, re enable vcpkg_fixup_cmake_targets() --- ports/glslang/CMakeLists-targets.patch | 173 ++++++++++++++++--------- ports/glslang/portfile.cmake | 2 +- 2 files changed, 114 insertions(+), 61 deletions(-) diff --git a/ports/glslang/CMakeLists-targets.patch b/ports/glslang/CMakeLists-targets.patch index 73661fa3514ca7..f5b922e69751cf 100644 --- a/ports/glslang/CMakeLists-targets.patch +++ b/ports/glslang/CMakeLists-targets.patch @@ -1,5 +1,5 @@ diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake -index 2097881..f0cddd7 100644 +index 2097881..4bae7d2 100644 --- a/ChooseMSVCCRT.cmake +++ b/ChooseMSVCCRT.cmake @@ -102,4 +102,4 @@ set(MSVC_CRT @@ -7,7 +7,7 @@ index 2097881..f0cddd7 100644 MTd) -choose_msvc_crt(MSVC_CRT) -+# 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 @@ -28,76 +28,123 @@ index 5bb3f0e..e7be6e6 100644 + ) endif(ENABLE_GLSLANG_INSTALL) diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt -index b682419..3a10f1a 100755 +index 1997e74..e63af79 100644 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt -@@ -64,8 +64,14 @@ if(WIN32) - endif(WIN32) +@@ -46,7 +46,7 @@ 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 ..) ++#target_include_directories(SPIRV PUBLIC ..) - 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" -+ ) + if (ENABLE_SPVREMAPPER) + add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) +@@ -84,16 +84,29 @@ if(ENABLE_GLSLANG_INSTALL) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +- install(TARGETS SPIRV ++#[[ install(TARGETS SPIRV + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY 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") + else() + if (ENABLE_SPVREMAPPER) + install(TARGETS SPVRemapper + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +- install(TARGETS SPIRV ++#[[ install(TARGETS SPIRV + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++]] ++ install(TARGETS SPIRV EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ export(TARGETS SPIRV ++ NAMESPACE glslang:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake") + endif() 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 +index 5f51476..3a8a6f7 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt -@@ -97,8 +97,19 @@ if(WIN32) - endif(WIN32) +@@ -86,7 +86,7 @@ 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 ..) ++#target_include_directories(glslang PUBLIC ..) + + if(WIN32 AND BUILD_SHARED_LIBS) + set_target_properties(glslang PROPERTIES PREFIX "") +@@ -106,12 +106,33 @@ 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:: -+ ) + if(BUILD_SHARED_LIBS) +- install(TARGETS glslang ++#[[ install(TARGETS glslang + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ LIBRARY 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::) + else() +- install(TARGETS glslang +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++#[[ install(TARGETS glslang EXPORT ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})]] ++ ++ install(TARGETS glslang EXPORT glslangConfig ++ ARCHIVE 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() 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 +index e652f45..e2364cc 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) +@@ -20,6 +20,10 @@ else() + endif() 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} -+ ) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + export(TARGETS OSDependent + NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake" -+ ) ++ 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 +index f257418..17856ba 100644 --- a/glslang/OSDependent/Windows/CMakeLists.txt +++ b/glslang/OSDependent/Windows/CMakeLists.txt -@@ -15,6 +15,12 @@ if(WIN32) +@@ -15,6 +15,10 @@ if(WIN32) endif(WIN32) if(ENABLE_GLSLANG_INSTALL) @@ -105,29 +152,35 @@ index f257418..cadd70d 100644 - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS OSDependent EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + export(TARGETS OSDependent + NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake" -+ ) ++ 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 +index f918d7a..9893619 100644 --- a/hlsl/CMakeLists.txt +++ b/hlsl/CMakeLists.txt -@@ -26,6 +26,12 @@ if(WIN32) - endif(WIN32) +@@ -33,11 +33,17 @@ endif(WIN32) if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS HLSL -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS HLSL EXPORT glslangConfig + if(BUILD_SHARED_LIBS) +- install(TARGETS HLSL +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS HLSL EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+ export(TARGETS HLSL ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ export(TARGETS HLSL + NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/HLSL-config.cmake" -+ ) ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/HLSL-config.cmake") + else() +- install(TARGETS HLSL +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS HLSL EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ export(TARGETS HLSL ++ NAMESPACE glslang:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/HLSL-config.cmake") + endif() endif(ENABLE_GLSLANG_INSTALL) diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index af9c4f1ff4a742..cb3deddcf5c611 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -20,7 +20,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -#vcpkg_fixup_cmake_targets() +vcpkg_fixup_cmake_targets() file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) From d91e8133a4e973e32ae505f9644d4c60b6099406 Mon Sep 17 00:00:00 2001 From: Daniel <51385773+dan-shaw@users.noreply.github.com> Date: Tue, 18 Jun 2019 11:32:34 -0700 Subject: [PATCH 4/7] [spirv-tools] comment python distutils --- ports/spirv-tools/comment-distutils.patch | 22 ++++++++++++++++++++++ ports/spirv-tools/portfile.cmake | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 ports/spirv-tools/comment-distutils.patch diff --git a/ports/spirv-tools/comment-distutils.patch b/ports/spirv-tools/comment-distutils.patch new file mode 100644 index 00000000000000..2426f82bae841b --- /dev/null +++ b/ports/spirv-tools/comment-distutils.patch @@ -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')) + + diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index e4e0cdb7a7f6a1..0cc6f79ddd84e4 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -7,6 +7,8 @@ vcpkg_from_github( REPO KhronosGroup/SPIRV-Tools REF d0a1f5a05a2b0f8315e5b3f17b8e34c730861b31 SHA512 7179751b0216368b4a4bf8c9b0c1c1e3b17d6aa4788b4aeaa7fbb2b6d9d50b34cf209082f3531a2e0994b5fc02416373666d4d12cee282cec2c3d02c13a640a8 + PATCHES + comment-distutils.patch ) vcpkg_find_acquire_program(PYTHON3) From 60b15ac54207266832d024f5cedce58c321e5f93 Mon Sep 17 00:00:00 2001 From: Daniel <51385773+dan-shaw@users.noreply.github.com> Date: Fri, 21 Jun 2019 15:53:40 -0700 Subject: [PATCH 5/7] remove comments, change path --- ports/shaderc/disable-update-version.patch | 88 ++++++++++------------ ports/shaderc/fix-install.patch | 39 ++++++---- 2 files changed, 67 insertions(+), 60 deletions(-) diff --git a/ports/shaderc/disable-update-version.patch b/ports/shaderc/disable-update-version.patch index 8862f9da0813cb..5ee016bcb13c34 100644 --- a/ports/shaderc/disable-update-version.patch +++ b/ports/shaderc/disable-update-version.patch @@ -1,47 +1,41 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a4e779b..9118653 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -81,11 +81,11 @@ 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).") -+#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 -diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt -index acf6fb0..92da5ce 100644 ---- a/glslc/CMakeLists.txt -+++ b/glslc/CMakeLists.txt -@@ -26,7 +26,7 @@ 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) -+#add_dependencies(glslc_exe build-version) - - shaderc_add_tests( - TEST_PREFIX glslc -diff --git a/spvc/CMakeLists.txt b/spvc/CMakeLists.txt -index f465972..78911b7 100644 ---- a/spvc/CMakeLists.txt -+++ b/spvc/CMakeLists.txt -@@ -3,7 +3,7 @@ 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) -+#add_dependencies(spvc_exe build-version) - - shaderc_add_asciidoc(spvc_doc_README README) - +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) + diff --git a/ports/shaderc/fix-install.patch b/ports/shaderc/fix-install.patch index 7b437150fb790a..1857ed8fed5d70 100644 --- a/ports/shaderc/fix-install.patch +++ b/ports/shaderc/fix-install.patch @@ -1,13 +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/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() From 269f90995e5b5f795e1538e2d781fea1233a931a Mon Sep 17 00:00:00 2001 From: Daniel <51385773+dan-shaw@users.noreply.github.com> Date: Mon, 24 Jun 2019 12:39:41 -0700 Subject: [PATCH 6/7] glslang fix cmake targets --- ports/glslang/CMakeLists-targets.patch | 294 +++++++++---------------- ports/glslang/CMakeLists-windows.patch | 12 + ports/glslang/portfile.cmake | 3 +- 3 files changed, 121 insertions(+), 188 deletions(-) create mode 100644 ports/glslang/CMakeLists-windows.patch diff --git a/ports/glslang/CMakeLists-targets.patch b/ports/glslang/CMakeLists-targets.patch index f5b922e69751cf..36e923d9262b1f 100644 --- a/ports/glslang/CMakeLists-targets.patch +++ b/ports/glslang/CMakeLists-targets.patch @@ -1,186 +1,108 @@ -diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake -index 2097881..4bae7d2 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 1997e74..e63af79 100644 ---- a/SPIRV/CMakeLists.txt -+++ b/SPIRV/CMakeLists.txt -@@ -46,7 +46,7 @@ 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 ..) -+#target_include_directories(SPIRV PUBLIC ..) - - if (ENABLE_SPVREMAPPER) - add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) -@@ -84,16 +84,29 @@ if(ENABLE_GLSLANG_INSTALL) - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() -- install(TARGETS SPIRV -+#[[ install(TARGETS SPIRV - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY 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") - else() - if (ENABLE_SPVREMAPPER) - install(TARGETS SPVRemapper - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() -- install(TARGETS SPIRV -+#[[ install(TARGETS SPIRV - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+]] -+ install(TARGETS SPIRV EXPORT glslangConfig -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ export(TARGETS SPIRV -+ NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake") - endif() - - install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/) -diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt -index 5f51476..3a8a6f7 100644 ---- a/glslang/CMakeLists.txt -+++ b/glslang/CMakeLists.txt -@@ -86,7 +86,7 @@ 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 ..) -+#target_include_directories(glslang PUBLIC ..) - - if(WIN32 AND BUILD_SHARED_LIBS) - set_target_properties(glslang PROPERTIES PREFIX "") -@@ -106,12 +106,33 @@ endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) - if(BUILD_SHARED_LIBS) -- install(TARGETS glslang -+#[[ install(TARGETS glslang - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ LIBRARY 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::) - else() -- install(TARGETS glslang -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+#[[ install(TARGETS glslang EXPORT -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})]] -+ -+ install(TARGETS glslang EXPORT glslangConfig -+ ARCHIVE 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() - endif(ENABLE_GLSLANG_INSTALL) - -diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt -index e652f45..e2364cc 100644 ---- a/glslang/OSDependent/Unix/CMakeLists.txt -+++ b/glslang/OSDependent/Unix/CMakeLists.txt -@@ -20,6 +20,10 @@ else() - endif() - - 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..17856ba 100644 ---- a/glslang/OSDependent/Windows/CMakeLists.txt -+++ b/glslang/OSDependent/Windows/CMakeLists.txt -@@ -15,6 +15,10 @@ 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 f918d7a..9893619 100644 ---- a/hlsl/CMakeLists.txt -+++ b/hlsl/CMakeLists.txt -@@ -33,11 +33,17 @@ endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) - if(BUILD_SHARED_LIBS) -- install(TARGETS HLSL -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -- LIBRARY 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") - else() -- install(TARGETS HLSL -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS HLSL EXPORT glslangConfig -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ export(TARGETS HLSL -+ NAMESPACE glslang:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/HLSL-config.cmake") - endif() - 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() diff --git a/ports/glslang/CMakeLists-windows.patch b/ports/glslang/CMakeLists-windows.patch new file mode 100644 index 00000000000000..76ccf6077c75c2 --- /dev/null +++ b/ports/glslang/CMakeLists-windows.patch @@ -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) diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index af9c4f1ff4a742..003aa26aac2592 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( 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") From b2abe8ecd69451a505e4768740c79883ca1c55a6 Mon Sep 17 00:00:00 2001 From: Daniel <51385773+dan-shaw@users.noreply.github.com> Date: Wed, 26 Jun 2019 14:30:45 -0700 Subject: [PATCH 7/7] change version --- ports/shaderc/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index 29d0e1f6f55cc5..044fdd4105d77b 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,5 +1,5 @@ Source: shaderc -Version: 05c766a1f4615ee37d37d09271aaabca30ffd293 +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 \ No newline at end of file