mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-03 00:10:30 +08:00
7bddc2a191
* [spirv-tools] support iOS triplets * [spirv-cross] support iOS triplets * [spirv-cross,spirv-tools] update baseline * [spirv-tools] fix mistyped variable name * [spirv-tools] fix wrong git-tree SHA
42 lines
1.3 KiB
CMake
42 lines
1.3 KiB
CMake
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO KhronosGroup/SPIRV-Cross
|
|
REF 2020-02-26
|
|
SHA512 96e4c7d8bf8603d061d1a7afac34db044842dede65f2d9328da1d99a3c8aed9f6fd64fd611e8d1618bd937b682b377d87304a4fcc9068bcffed3d275cb4dfe2c
|
|
HEAD_REF master
|
|
)
|
|
|
|
if(VCPKG_TARGET_IS_IOS)
|
|
message(STATUS "Using iOS trplet. Executables won't be created...")
|
|
set(BUILD_CLI OFF)
|
|
else()
|
|
set(BUILD_CLI ON)
|
|
endif()
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=OFF
|
|
-DSPIRV_CROSS_CLI=${BUILD_CLI}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
vcpkg_copy_pdbs()
|
|
|
|
foreach(COMPONENT core cpp glsl hlsl msl reflect util)
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/spirv_cross_${COMPONENT}/cmake TARGET_PATH share/spirv_cross_${COMPONENT})
|
|
endforeach()
|
|
|
|
file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*")
|
|
file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
|
|
|
|
# cleanup
|
|
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-cross/copyright COPYONLY)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|