Update glslang shaderc spirv-tools

Update those ports to the versions listed in https://github.com/google/shaderc/blob/known-good/known_good.json
This commit is contained in:
Toby Chen 2017-09-05 12:58:53 -07:00
parent 97104258a7
commit 471d7e2ae7
6 changed files with 43 additions and 116 deletions

View File

@ -1,3 +1,3 @@
Source: glslang
Version: 1c573fbcfba6b3d631008b1babc838501ca925d3-2
Version: 3a21c880500eac21cdf79bef5b80f970a55ac6af
Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator

View File

@ -7,8 +7,8 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/glslang
REF 1c573fbcfba6b3d631008b1babc838501ca925d3
SHA512 4f04dc39d9a70959ded1f4fe05ca5c7b0413c05bc3f049c11b5be7c8e1a70675f4221c9d8c712e7695f30eadb9bd7d0f1e71f431a6c9d4fea2cd2abbc73bd49a
REF 3a21c880500eac21cdf79bef5b80f970a55ac6af
SHA512 a6b2f589d432015d3830027dee377350529bec9c339a8de24aa52bab5ca52b3e17e2163d3bd1a7d91f7a08c446ebfe86d64bbbbae5a23af831d2e0cb724f7418
HEAD_REF master
)
@ -19,29 +19,9 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
file(COPY "${SOURCE_PATH}/glslang/Public" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
file(COPY "${SOURCE_PATH}/glslang/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
file(COPY "${SOURCE_PATH}/glslang/MachineIndependent/Versions.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang/MachineIndependent)
file(COPY "${SOURCE_PATH}/SPIRV/Logger.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
file(COPY "${SOURCE_PATH}/SPIRV/spirv.hpp" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
file(COPY "${SOURCE_PATH}/SPIRV/GlslangToSpv.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
file(COPY "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/glslangValidator.exe")
file(COPY "${CURRENT_PACKAGES_DIR}/bin/spirv-remap.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/spirv-remap.exe")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/spirv-remap.exe")
file(GLOB BIN_DIR "${CURRENT_PACKAGES_DIR}/bin/*")
list(LENGTH BIN_DIR BIN_DIR_SIZE)
if(${BIN_DIR_SIZE} EQUAL 0)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
endif()
file(GLOB DEBUG_BIN_DIR "${CURRENT_PACKAGES_DIR}/debug/bin/*")
list(LENGTH DEBUG_BIN_DIR DEBUG_BIN_DIR_SIZE)
if(${DEBUG_BIN_DIR_SIZE} EQUAL 0)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
# Handle copyright
file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/glslang)

View File

@ -1,4 +1,4 @@
Source: shaderc
Version: 2df47b51d83ad83cbc2e7f8ff2b56776293e8958-1
Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da
Description: A collection of tools, libraries and tests for shader compilation.
Build-Depends: glslang, spirv-tools

View File

@ -7,35 +7,19 @@
#
include(vcpkg_common_functions)
find_program(GIT git)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/shaderc
REF 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da
SHA512 6fb45a0b01e6709c44a11658648b9271fe06bd94023dcc5042c47b5f2a04889c2efb0ab4c166f18728594ac9b9aa9f8b354af46d88eb7f7c39c7246f52f5a933
HEAD_REF master
)
set(SHADERC_GIT_URL "https://github.com/google/shaderc.git")
set(SHADERC_GIT_REF "2df47b51d83ad83cbc2e7f8ff2b56776293e8958")
if(NOT EXISTS "${DOWNLOADS}/shaderc.git")
message(STATUS "Cloning")
vcpkg_execute_required_process(
COMMAND ${GIT} clone --bare ${SHADERC_GIT_URL} ${DOWNLOADS}/shaderc.git
WORKING_DIRECTORY ${DOWNLOADS}
LOGNAME clone
)
endif()
if(NOT EXISTS "${SOURCE_PATH}/.git")
message(STATUS "Adding worktree and patching")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
vcpkg_execute_required_process(
COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${SHADERC_GIT_REF}
WORKING_DIRECTORY ${DOWNLOADS}/shaderc.git
LOGNAME worktree
)
message(STATUS "Patching")
vcpkg_execute_required_process(
COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Do-not-generate-build-version.inc.patch --ignore-whitespace --whitespace=fix
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME patch
)
endif()
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Do-not-generate-build-version.inc.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)
@ -69,10 +53,7 @@ file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
#Safe to remove as libs are static
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/shaderc.txt)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shaderc)

View File

@ -1,3 +1,3 @@
Source: spirv-tools
Version: 1.1-f72189c249ba143c6a89a4cf1e7d53337b2ddd40
Version: v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23
Description: API and commands for processing SPIR-V modules

View File

@ -1,68 +1,34 @@
# Common Ambient Variables:
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
include(vcpkg_common_functions)
find_program(GIT git)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
set(GIT_URL "https://github.com/KhronosGroup/SPIRV-Tools.git")
set(GIT_REF "f72189c249ba143c6a89a4cf1e7d53337b2ddd40")
if(NOT EXISTS "${DOWNLOADS}/spirv-tools.git")
message(STATUS "Cloning")
vcpkg_execute_required_process(
COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/spirv-tools.git
WORKING_DIRECTORY ${DOWNLOADS}
LOGNAME clone
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(WARNING "Dynamic not supported. Building static")
set(VCPKG_LIBRARY_LINKAGE "static")
endif()
if(NOT EXISTS "${SOURCE_PATH}/.git")
message(STATUS "Adding worktree and patching")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
vcpkg_execute_required_process(
COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF}
WORKING_DIRECTORY ${DOWNLOADS}/spirv-tools.git
LOGNAME worktree
)
message(STATUS "Patching")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/SPIRV-Tools
REF 7e2d26c77b606b21af839b37fd21381c4a669f23
SHA512 67e8fcdcb9748df1e7c86bb50358a89b656f80a96534bc5771afc4ce22e9ebcc8ca382f784fab7b856324d487f810c21abaaab2facee7453c0343a9b51d7e60b
HEAD_REF master
)
set(SPIRVHEADERS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Headers.git")
set(SPIRVHEADERS_GIT_REF "bd47a9abaefac00be692eae677daed1b977e625c")
vcpkg_from_github(
OUT_SOURCE_PATH SPIRV_HEADERS_PATH
REPO KhronosGroup/SPIRV-Headers
REF 2bb92e6fe2c6aa410152fc6c63443f452acb1a65
SHA512 cdd1437a67c7e31e2062e5d0f25c767b99a3fadd64b91d00c3b07404e535bb4bfd78a43878ebbcd45e013a7153f1a2c969da99d50a99cc39efab940d0aab7cfd
HEAD_REF master
)
if(NOT EXISTS "${DOWNLOADS}/SPIRV-Headers.git")
message(STATUS "Cloning")
vcpkg_execute_required_process(
COMMAND ${GIT} clone --bare ${SPIRVHEADERS_GIT_URL} ${DOWNLOADS}/SPIRV-Headers.git
WORKING_DIRECTORY ${DOWNLOADS}
LOGNAME clone
)
endif()
if(NOT EXISTS "${SOURCE_PATH}/external/spirv-headers/.git")
message(STATUS "Adding worktree and patching")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
vcpkg_execute_required_process(
COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH}/external/spirv-headers ${SPIRVHEADERS_GIT_REF}
WORKING_DIRECTORY ${DOWNLOADS}/SPIRV-Headers.git
LOGNAME worktree
)
endif()
set(VCPKG_LIBRARY_LINKAGE "static")
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}")
vcpkg_configure_cmake(
SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src"
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DSPIRV-Headers_SOURCE_DIR=${SPIRV_HEADERS_PATH}
)
vcpkg_install_cmake()