diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/vulkan/portfile.cmake | |
Diffstat (limited to 'vcpkg/ports/vulkan/portfile.cmake')
| -rw-r--r-- | vcpkg/ports/vulkan/portfile.cmake | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vcpkg/ports/vulkan/portfile.cmake b/vcpkg/ports/vulkan/portfile.cmake new file mode 100644 index 0000000..cd19811 --- /dev/null +++ b/vcpkg/ports/vulkan/portfile.cmake @@ -0,0 +1,31 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +set(vulkan_result_file "${CURRENT_BUILDTREES_DIR}/vulkan-${TARGET_TRIPLET}.cmake.log") +vcpkg_cmake_configure( + SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}" + OPTIONS_RELEASE + "-DOUTFILE=${vulkan_result_file}" +) + +include("${vulkan_result_file}") +if(DETECTED_Vulkan_FOUND) + message(STATUS "Found Vulkan ${DETECTED_Vulkan_VERSION} (${DETECTED_Vulkan_LIBRARIES})") +else() + set(message "Vulkan wasn't found.") + if(VCPKG_TARGET_IS_ANDROID AND DETECTED_ANDROID_NATIVE_API_LEVEL AND DETECTED_ANDROID_NATIVE_API_LEVEL LESS "24") + string(APPEND message " Vulkan support from the Android NDK requires API level 24 (found: ${DETECTED_ANDROID_NATIVE_API_LEVEL})") + endif() + message(FATAL_ERROR "${message}") +endif() + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" + "${CMAKE_CURRENT_LIST_DIR}/vulkan-result.cmake.in" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/detect-vulkan" +) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" [[ +This is a stub package. Copyright and license information +is provided with Vulkan headers and loader. +For Android, the loader is provided by the NDK. +]]) |