From: Jan Engelhardt Date: 2020-08-19 13:21:33.156157310 +0200 We do not want static archives in openSUSE, so need to turn on SHARED mode. As a result, a version needs to be added. --- CMakeLists.txt | 3 ++- layers/CMakeLists.txt | 2 +- layers/vk_layer_config.h | 2 +- tests/CMakeLists.txt | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) Index: Vulkan-ValidationLayers-sdk-1.3.204.0/CMakeLists.txt =================================================================== --- Vulkan-ValidationLayers-sdk-1.3.204.0.orig/CMakeLists.txt +++ Vulkan-ValidationLayers-sdk-1.3.204.0/CMakeLists.txt @@ -319,11 +319,12 @@ set(SCRIPTS_DIR "${PROJECT_SOURCE_DIR}/s # files directly in layers. add_library(VkLayer_utils - STATIC + SHARED layers/vk_layer_config.cpp layers/vk_layer_extension_utils.cpp layers/vk_layer_utils.cpp layers/generated/vk_format_utils.cpp) +set_target_properties(VkLayer_utils PROPERTIES OUTPUT_NAME "VkLayer_utils-@PACKAGE_VERSION@") target_link_libraries(VkLayer_utils PUBLIC Vulkan::Headers) set_target_properties(VkLayer_utils PROPERTIES CXX_STANDARD ${VVL_CPP_STANDARD}) if (VVL_ENABLE_ASAN) Index: Vulkan-ValidationLayers-sdk-1.3.204.0/layers/CMakeLists.txt =================================================================== --- Vulkan-ValidationLayers-sdk-1.3.204.0.orig/layers/CMakeLists.txt +++ Vulkan-ValidationLayers-sdk-1.3.204.0/layers/CMakeLists.txt @@ -315,7 +315,7 @@ if(BUILD_LAYERS) target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR}) endif() - target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Tools-static SPIRV-Tools-opt) + target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Tools SPIRV-Tools-opt) # The output file needs Unix "/" separators or Windows "\" separators On top of that, Windows separators actually need to be doubled Index: Vulkan-ValidationLayers-sdk-1.3.204.0/layers/vk_layer_config.h =================================================================== --- Vulkan-ValidationLayers-sdk-1.3.204.0.orig/layers/vk_layer_config.h +++ Vulkan-ValidationLayers-sdk-1.3.204.0/layers/vk_layer_config.h @@ -33,7 +33,7 @@ #define SECONDARY_VK_REGISTRY_HIVE_STR "HKEY_CURRENT_USER" #endif -std::string GetEnvironment(const char *variable); +VK_LAYER_EXPORT std::string GetEnvironment(const char *variable); #ifdef __cplusplus extern "C" { Index: Vulkan-ValidationLayers-sdk-1.3.204.0/tests/CMakeLists.txt =================================================================== --- Vulkan-ValidationLayers-sdk-1.3.204.0.orig/tests/CMakeLists.txt +++ Vulkan-ValidationLayers-sdk-1.3.204.0/tests/CMakeLists.txt @@ -154,7 +154,7 @@ target_link_libraries(vk_layer_validatio PRIVATE VkLayer_utils ${GLSLANG_LIBRARIES} SPIRV-Headers::SPIRV-Headers - SPIRV-Tools-static SPIRV-Tools-opt + SPIRV-Tools SPIRV-Tools-opt GTest::gtest GTest::gtest_main) if(NOT WIN32)