2016-12-12 20:07:43 +01:00
|
|
|
|
2018-10-12 06:27:22 +02:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2016-12-12 20:07:43 +01:00
|
|
|
|
2017-09-05 12:58:53 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/SPIRV-Tools
|
2021-05-21 01:18:58 -07:00
|
|
|
REF v2021.1
|
|
|
|
SHA512 e8478eacb86415f75a1e5b3f66a0508b01a9f7e9d8b070eb0329ca56be137f5543dd42125a1033cb8552c01f46e11affd7fda866231b3742c66de9b4341930d5
|
2019-03-07 00:36:43 -05:00
|
|
|
PATCHES
|
2020-03-20 08:32:07 +01:00
|
|
|
cmake-install.patch
|
|
|
|
install-config-typo.patch
|
2021-05-21 01:18:58 -07:00
|
|
|
0001-don-t-use-MP4.patch
|
2017-09-05 12:58:53 -07:00
|
|
|
)
|
2016-12-12 20:07:43 +01:00
|
|
|
|
2017-09-05 12:58:53 -07:00
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
2018-10-12 06:27:22 +02:00
|
|
|
vcpkg_add_to_path("${PYTHON3_DIR}")
|
2016-12-12 20:07:43 +01:00
|
|
|
|
2021-02-09 09:07:06 +09:00
|
|
|
if(VCPKG_TARGET_IS_IOS)
|
|
|
|
message(STATUS "Using iOS trplet. Executables won't be created...")
|
|
|
|
set(TOOLS_INSTALL OFF)
|
|
|
|
set(SKIP_EXECUTABLES ON)
|
|
|
|
else()
|
|
|
|
set(TOOLS_INSTALL ON)
|
|
|
|
set(SKIP_EXECUTABLES OFF)
|
|
|
|
endif()
|
|
|
|
|
2016-12-12 20:07:43 +01:00
|
|
|
vcpkg_configure_cmake(
|
2017-09-05 12:58:53 -07:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2018-10-12 06:27:22 +02:00
|
|
|
OPTIONS
|
2020-06-03 19:31:28 -07:00
|
|
|
-DSPIRV-Headers_SOURCE_DIR=${CURRENT_INSTALLED_DIR}
|
2018-10-12 06:27:22 +02:00
|
|
|
-DSPIRV_WERROR=OFF
|
2021-02-09 09:07:06 +09:00
|
|
|
-DSPIRV_SKIP_EXECUTABLES=${SKIP_EXECUTABLES} # option SPIRV_SKIP_TESTS follows this value
|
|
|
|
-DENABLE_SPIRV_TOOLS_INSTALL=${TOOLS_INSTALL}
|
2021-04-19 17:09:40 -07:00
|
|
|
-DSPIRV_TOOLS_BUILD_STATIC=ON
|
2016-12-12 20:07:43 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2020-03-20 08:32:07 +01: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)
|
2021-04-19 17:09:40 -07:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2020-03-20 08:32:07 +01:00
|
|
|
|
|
|
|
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")
|
2021-04-19 17:09:40 -07:00
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/SPIRV-Tools-shared.dll")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libSPIRV-Tools-shared.so")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libSPIRV-Tools-shared.so")
|
2021-02-09 09:07:06 +09:00
|
|
|
if(TOOLS_INSTALL)
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
endif()
|
2020-03-20 08:32:07 +01:00
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|