|
1 | 1 | set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
2 | 2 |
|
3 |
| - |
4 | 3 | set(vulkan_result_file "${CURRENT_BUILDTREES_DIR}/vulkan-${TARGET_TRIPLET}.cmake.log")
|
5 | 4 | vcpkg_cmake_configure(
|
6 | 5 | SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}"
|
7 |
| - OPTIONS |
8 |
| - "-DVCPKG_VULKAN_VERSION=${VERSION}" |
9 | 6 | OPTIONS_RELEASE
|
10 | 7 | "-DOUTFILE=${vulkan_result_file}"
|
11 | 8 | )
|
12 | 9 |
|
13 | 10 | include("${vulkan_result_file}")
|
14 | 11 | if(DETECTED_Vulkan_FOUND)
|
15 |
| - message(STATUS "Found Vulkan SDK ${DETECTED_Vulkan_VERSION} (${DETECTED_Vulkan_LIBRARIES})") |
| 12 | + message(STATUS "Found Vulkan ${DETECTED_Vulkan_VERSION} (${DETECTED_Vulkan_LIBRARIES})") |
16 | 13 | else()
|
17 |
| - set(message "The Vulkan SDK wasn't found. ") |
18 |
| - if(VCPKG_TARGET_IS_WINDOWS) |
19 |
| - string(APPEND message "Refer to Getting Started with the Windows Vulkan SDK: https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html") |
20 |
| - elseif(VCPKG_TARGET_IS_OSX) |
21 |
| - string(APPEND message "Refer to Getting Started with the MacOS Vulkan SDK: https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html") |
22 |
| - elseif(VCPKG_TARGET_IS_LINUX) |
23 |
| - string(APPEND message "Refer to Getting Started with the Linux Vulkan SDK: https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html") |
| 14 | + set(message "Vulkan wasn't found.") |
| 15 | + if(VCPKG_TARGET_IS_ANDROID AND DETECTED_ANDROID_NATIVE_API_LEVEL AND DETECTED_ANDROID_NATIVE_API_LEVEL LESS "24") |
| 16 | + string(APPEND message " Vulkan support from the Android NDK requires API level 24 (found: ${DETECTED_ANDROID_NATIVE_API_LEVEL})") |
24 | 17 | endif()
|
25 | 18 | message(FATAL_ERROR "${message}")
|
26 | 19 | endif()
|
27 | 20 |
|
28 |
| -find_file(vulkan_license NAMES LICENSE.txt PATHS ${DETECTED_Vulkan_INCLUDE_DIRS} "${CURRENT_PORT_DIR}" PATH_SUFFIXES "..") |
29 |
| -vcpkg_install_copyright(FILE_LIST "${vulkan_license}") |
| 21 | +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" |
| 22 | + "${CMAKE_CURRENT_LIST_DIR}/vulkan-result.cmake.in" |
| 23 | + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/detect-vulkan" |
| 24 | +) |
30 | 25 |
|
31 | 26 | file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
| 27 | +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" [[ |
| 28 | +This is a stub package. Copyright and license information |
| 29 | +is provided with Vulkan headers and loader. |
| 30 | +For Android, the loader is provided by the NDK. |
| 31 | +]]) |
0 commit comments