2017-09-06 03:58:53 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/SPIRV-Tools
|
2022-08-06 15:04:35 +08:00
|
|
|
REF v2022.2
|
|
|
|
SHA512 027819bb68a3cb42f086cab8089e0fe0b2ebcf40607811c6848d7d9f412ed3c977498d32dc7e37b828d0e6eb6924878e7c975c461fc5b171142a4ee1da2c1caa
|
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
|
|
|
|
2021-02-09 08:07:06 +08: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()
|
|
|
|
|
2022-04-07 22:52:15 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
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
|
2022-04-07 22:52:15 +08:00
|
|
|
-DSPIRV_SKIP_TESTS=ON
|
|
|
|
-DSPIRV_SKIP_EXECUTABLES=${SKIP_EXECUTABLES}
|
2021-02-09 08:07:06 +08:00
|
|
|
-DENABLE_SPIRV_TOOLS_INSTALL=${TOOLS_INSTALL}
|
2021-04-20 08:09:40 +08:00
|
|
|
-DSPIRV_TOOLS_BUILD_STATIC=ON
|
2022-04-07 22:52:15 +08:00
|
|
|
-DENABLE_SPIRV_TOOLS_INSTALL=ON
|
2016-12-13 03:07:43 +08:00
|
|
|
)
|
|
|
|
|
2022-04-07 22:52:15 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
# the directory name is capitalized as opposed to the port name
|
|
|
|
if(WIN32)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH SPIRV-Tools/cmake PACKAGE_NAME SPIRV-Tools)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH SPIRV-Tools-link/cmake PACKAGE_NAME SPIRV-Tools-link)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH SPIRV-Tools-lint/cmake PACKAGE_NAME SPIRV-Tools-lint)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH SPIRV-Tools-opt/cmake PACKAGE_NAME SPIRV-Tools-opt)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH SPIRV-Tools-reduce/cmake PACKAGE_NAME SPIRV-Tools-reduce)
|
|
|
|
else()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SPIRV-Tools PACKAGE_NAME SPIRV-Tools DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SPIRV-Tools-link PACKAGE_NAME SPIRV-Tools-link DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SPIRV-Tools-lint PACKAGE_NAME SPIRV-Tools-lint DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SPIRV-Tools-opt PACKAGE_NAME SPIRV-Tools-opt DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SPIRV-Tools-reduce PACKAGE_NAME SPIRV-Tools-reduce) # now delete
|
|
|
|
endif()
|
2021-04-20 08:09:40 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2020-03-20 15:32:07 +08:00
|
|
|
|
2021-02-09 08:07:06 +08:00
|
|
|
if(TOOLS_INSTALL)
|
2022-04-07 22:52:15 +08:00
|
|
|
vcpkg_copy_tools(
|
|
|
|
TOOL_NAMES
|
|
|
|
spirv-as
|
|
|
|
spirv-cfg
|
|
|
|
spirv-dis
|
|
|
|
spirv-link
|
|
|
|
spirv-lint
|
|
|
|
spirv-opt
|
|
|
|
spirv-reduce
|
|
|
|
spirv-val
|
|
|
|
AUTO_CLEAN
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/SPIRV-Tools"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/SPIRV-Tools-link"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/SPIRV-Tools-lint"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/SPIRV-Tools-opt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/SPIRV-Tools-reduce"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/SPIRV-Tools"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/SPIRV-Tools-link"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/SPIRV-Tools-lint"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/SPIRV-Tools-opt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/SPIRV-Tools-reduce"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
# lesspipe.sh is the only file there
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2021-02-09 08:07:06 +08:00
|
|
|
endif()
|
2020-03-20 15:32:07 +08:00
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|