2016-12-13 03:07:43 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
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
|
2018-03-06 03:25:37 +08:00
|
|
|
REF v2018.1
|
|
|
|
SHA512 0637c413dafd931e8222f9bf70a024f8b64116f0300c7732b86bcaff321188a0e746f79c1385ae23a7692e83194586b57692960d5be607fb2d7960731b6cd63f
|
2017-09-06 03:58:53 +08:00
|
|
|
HEAD_REF master
|
2019-03-07 13:36:43 +08:00
|
|
|
PATCHES
|
|
|
|
CMake-targets.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
|
2019-03-07 13:17:52 +08:00
|
|
|
-DSPIRV-Headers_SOURCE_DIR=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}
|
2018-10-12 12:27:22 +08:00
|
|
|
-DSPIRV_WERROR=OFF
|
2016-12-13 03:07:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2019-03-07 13:36:43 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
2019-02-16 02:57:37 +08:00
|
|
|
file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*${CMAKE_EXECUTABLE_SUFFIX}")
|
2016-12-13 03:07:43 +08:00
|
|
|
file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
|
|
|
|
file(REMOVE ${EXES})
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirv-tools)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/spirv-tools/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-tools/copyright)
|
2019-03-07 13:36:43 +08:00
|
|
|
|
2019-03-07 15:43:44 +08:00
|
|
|
vcpkg_test_cmake(PACKAGE_NAME spirv-tools)
|