vcpkg/ports/shaderwriter/portfile.cmake

47 lines
1.6 KiB
CMake
Raw Normal View History

vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
2020-10-22 08:41:01 +08:00
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO DragonJoker/ShaderWriter
REF v${VERSION}
HEAD_REF development
SHA512 7e7d5fec16998bf99225e01a990fcb29612eee8f59e32fbb4e9650a0d69ffc658588380fdfd9374cc5492bd4eac5c9c6dadeb583129c649e5d792346a2d1a743
2020-10-22 08:41:01 +08:00
)
vcpkg_from_github(OUT_SOURCE_PATH CMAKE_SOURCE_PATH
REPO DragonJoker/CMakeUtils
REF 7d355194fa795c437ce970cecf00e23ae10fc686
2020-10-22 08:41:01 +08:00
HEAD_REF master
SHA512 ca25b19bdeb3e8fda7abc32f8548731f0ba1cd09889a70f6f287ad76d2fdfa0fedbb7f6f65b26d356ea51543bed8926c6bb463f8e8461b7d51d3b7b33134374c
2020-10-22 08:41:01 +08:00
)
file(REMOVE_RECURSE "${SOURCE_PATH}/CMake")
file(COPY "${CMAKE_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/CMake")
2020-10-22 08:41:01 +08:00
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
spirv SDW_BUILD_EXPORTER_SPIRV
glsl SDW_BUILD_EXPORTER_HLSL
hlsl SDW_BUILD_EXPORTER_GLSL
)
vcpkg_cmake_configure(
2020-10-22 08:41:01 +08:00
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DPROJECTS_USE_PRECOMPILED_HEADERS=OFF
-DSDW_GENERATE_SOURCE=OFF
-DSDW_BUILD_VULKAN_LAYER=OFF
2020-10-22 08:41:01 +08:00
-DSDW_BUILD_TESTS=OFF
-DSDW_BUILD_STATIC_SDW=${BUILD_STATIC}
-DSDW_BUILD_STATIC_SDAST=${BUILD_STATIC}
-DSDW_UNITY_BUILD=ON
${FEATURE_OPTIONS}
2020-10-22 08:41:01 +08:00
)
vcpkg_copy_pdbs()
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME ShaderWriter CONFIG_PATH lib/cmake/shaderwriter)
2020-10-22 08:41:01 +08:00
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)