vcpkg/ports/lunarg-vulkantools/portfile.cmake
2024-08-15 18:37:52 -07:00

38 lines
1.2 KiB
CMake

vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO LunarG/VulkanTools
REF "vulkan-sdk-${VERSION}"
SHA512 6F5081BDA20BDC79CCA89E515B5DA902884562460312FCAE6FDF4DB8029D00401B445E96BD37DA05EA8FB0CC169DE93E2821550DAC90C49CE2EBD7489593F256
HEAD_REF main
)
vcpkg_replace_string("${SOURCE_PATH}/via/CMakeLists.txt" "jsoncpp_static" "JsonCpp::JsonCpp")
x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES jsonschema OUT_PYTHON_VAR PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DVULKAN_HEADERS_INSTALL_DIR=${CURRENT_INSTALLED_DIR}
-DBUILD_TESTS:BOOL=OFF
OPTIONS_RELEASE
-DVULKAN_LOADER_INSTALL_DIR=${CURRENT_INSTALLED_DIR}
OPTIONS_DEBUG
-DVULKAN_LOADER_INSTALL_DIR=${CURRENT_INSTALLED_DIR}/debug
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
vcpkg_copy_tools(TOOL_NAMES vkvia vkconfig AUTO_CLEAN )
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)