vcpkg/ports/shaderwriter/portfile.cmake

39 lines
1.5 KiB
CMake
Raw Normal View History

2020-10-22 08:41:01 +08:00
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO DragonJoker/ShaderWriter
REF c6bb7ee45ac378bb90d71ddb8d02488bf526be32
HEAD_REF master
SHA512 5aa5a4a001c3e5c00074c9706ccc7cbfa6ba010c71ba80d50b18115f84f584cdfdf8c735b19e2a7c727466cad143b70d56cff370b9a3c66118fd66c2d8e02b4e
2020-10-22 08:41:01 +08:00
)
vcpkg_from_github(OUT_SOURCE_PATH CMAKE_SOURCE_PATH
REPO DragonJoker/CMakeUtils
REF fdb7f99884dbd67082d637a9f6ef14b6a541700e
2020-10-22 08:41:01 +08:00
HEAD_REF master
SHA512 f8a1cf8e2ecb30a53e7fb46ce5ce38739d7a9620e351443c3a3d14e6f5d2a798d8071d07ccd3ab15d0f6742e66d50b83a5be62f97ad5df886cb3ac6dc3ce9ec7
2020-10-22 08:41:01 +08:00
)
get_filename_component(SRC_PATH ${CMAKE_SOURCE_PATH} DIRECTORY)
if (EXISTS ${SRC_PATH}/CMake)
file(REMOVE_RECURSE ${SRC_PATH}/CMake)
endif()
file(RENAME ${CMAKE_SOURCE_PATH} ${SRC_PATH}/CMake)
set(CMAKE_SOURCE_PATH ${SRC_PATH}/CMake)
file(COPY ${CMAKE_SOURCE_PATH} DESTINATION ${SOURCE_PATH})
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
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}
2020-10-22 08:41:01 +08:00
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(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)