From cc0f252d0e74de46f5c9256d2bbd6a5b043d5924 Mon Sep 17 00:00:00 2001 From: Mark Callow Date: Sat, 3 Aug 2024 12:33:53 +0900 Subject: [PATCH] Avoid error from install command. Don't add vulkan directory to RESOURCE property. --- tests/loadtests/vkloadtests.cmake | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/loadtests/vkloadtests.cmake b/tests/loadtests/vkloadtests.cmake index ea4bef5f3f..e4e632dd55 100644 --- a/tests/loadtests/vkloadtests.cmake +++ b/tests/loadtests/vkloadtests.cmake @@ -110,8 +110,15 @@ list( TRANSFORM VK_TEST_IMAGES ) set( KTX_RESOURCES ${LOAD_TEST_COMMON_RESOURCE_FILES} ${VK_TEST_IMAGES} ) -if(IOS) - list( APPEND KTX_RESOURCES ${Vulkan_SHARE_VULKAN} ) +if(APPLE) +# Adding this directory to KTX_RESOURCES and ultimately vkloadtests's +# RESOURCE property causes the install command (later in this file) to +# raise an error at configuration time: "RESOURCE given directory". Use +# this instead to cause the files to be added to Resources in the bundle. + set_source_files_properties( ${Vulkan_SHARE_VULKAN} + PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) endif() add_executable( vkloadtests @@ -261,6 +268,7 @@ if(APPLE) # generators. Since configure_file() is happening use the standard # property names for consistency with the standard Info.plist template. set_target_properties( vkloadtests PROPERTIES + MACOSX_BUNDLE TRUE MACOSX_BUNDLE_BUNDLE_NAME ${product_name} MACOSX_BUNDLE_EXECUTABLE_NAME ${product_name} MACOSX_BUNDLE_COPYRIGHT "© 2024 Khronos Group, Inc." @@ -332,7 +340,7 @@ if(APPLE) # Specify destination for cmake --install. install(TARGETS vkloadtests BUNDLE - DESTINATION /Applications + DESTINATION ${CMAKE_INSTALL_PREFIX}/Applications COMPONENT VkLoadTestApp )