2018-10-09 09:37:32 +02:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/SPIRV-Cross
|
2023-12-15 08:33:39 +01:00
|
|
|
REF vulkan-sdk-${VERSION}
|
2024-10-19 07:58:11 +04:00
|
|
|
SHA512 943453df60744fe32123df7e366b27d30d57947b22bf7c087090e70f398305b37a47826abc60cdf912f0240c4ff3190e9d0f03d1d4e85f73c13b8a6196611640
|
2018-10-09 09:37:32 +02:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-02-09 09:07:06 +09:00
|
|
|
if(VCPKG_TARGET_IS_IOS)
|
2023-12-15 08:33:39 +01:00
|
|
|
message(STATUS "Using iOS triplet. Executables won't be created...")
|
2021-02-09 09:07:06 +09:00
|
|
|
set(BUILD_CLI OFF)
|
|
|
|
else()
|
|
|
|
set(BUILD_CLI ON)
|
|
|
|
endif()
|
|
|
|
|
2021-11-24 05:15:06 +09:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-02-09 09:07:06 +09:00
|
|
|
OPTIONS
|
|
|
|
-DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=OFF
|
|
|
|
-DSPIRV_CROSS_CLI=${BUILD_CLI}
|
2021-04-19 17:09:40 -07:00
|
|
|
-DSPIRV_CROSS_SKIP_INSTALL=OFF
|
|
|
|
-DSPIRV_CROSS_ENABLE_C_API=ON
|
2018-10-09 09:37:32 +02:00
|
|
|
)
|
2021-11-24 05:15:06 +09:00
|
|
|
vcpkg_cmake_install()
|
2018-10-09 09:37:32 +02:00
|
|
|
vcpkg_copy_pdbs()
|
2023-12-15 08:33:39 +01:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-10-09 09:37:32 +02:00
|
|
|
|
2021-04-19 17:09:40 -07:00
|
|
|
foreach(COMPONENT core c cpp glsl hlsl msl reflect util)
|
2021-11-24 05:15:06 +09:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/spirv_cross_${COMPONENT}/cmake PACKAGE_NAME spirv_cross_${COMPONENT})
|
2018-10-09 09:37:32 +02:00
|
|
|
endforeach()
|
|
|
|
|
2021-11-24 05:15:06 +09:00
|
|
|
if(BUILD_CLI)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES spirv-cross AUTO_CLEAN)
|
|
|
|
endif()
|
2019-02-11 14:12:45 -08:00
|
|
|
|
2021-11-24 05:15:06 +09:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
)
|
2021-04-23 21:28:31 +01:00
|
|
|
|
2023-12-15 08:33:39 +01:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|