2016-12-13 03:07:43 +08:00
|
|
|
|
2018-10-12 12:27:22 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2016-12-13 03:07:43 +08:00
|
|
|
|
2017-09-06 03:58:53 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/SPIRV-Tools
|
2020-03-20 15:32:07 +08:00
|
|
|
REF v2020.1
|
|
|
|
SHA512 edd434e06cba44c402900684b8fea16c394f80951ff993b3962617a21630d2d8ff9be9a5203bc8eb9b402e9cafe8c68f13099cbc1eaf66a546df08cb43668c46
|
2019-03-07 13:36:43 +08:00
|
|
|
PATCHES
|
2019-06-28 06:38:53 +08:00
|
|
|
comment-distutils.patch
|
2020-03-20 15:32:07 +08:00
|
|
|
cmake-install.patch
|
|
|
|
install-config-typo.patch
|
2017-09-06 03:58:53 +08:00
|
|
|
)
|
2016-12-13 03:07:43 +08:00
|
|
|
|
2017-09-06 03:58:53 +08:00
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
2018-10-12 12:27:22 +08:00
|
|
|
vcpkg_add_to_path("${PYTHON3_DIR}")
|
2016-12-13 03:07:43 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2017-09-06 03:58:53 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2018-10-12 12:27:22 +08:00
|
|
|
OPTIONS
|
2020-06-04 10:31:28 +08:00
|
|
|
-DSPIRV-Headers_SOURCE_DIR=${CURRENT_INSTALLED_DIR}
|
2018-10-12 12:27:22 +08:00
|
|
|
-DSPIRV_WERROR=OFF
|
2020-03-20 15:32:07 +08:00
|
|
|
-DENABLE_SPIRV_TOOLS_INSTALL=ON
|
2016-12-13 03:07:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2020-03-20 15:32:07 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools TARGET_PATH share/SPIRV-Tools) # the directory name is capitalized as opposed to the package name
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-link TARGET_PATH share/SPIRV-Tools-link)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-opt TARGET_PATH share/SPIRV-Tools-opt)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-reduce TARGET_PATH share/SPIRV-Tools-reduce)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") # only static linkage, i.e. no need to preserve .dll/.so files
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|