From 952aca54732d8506b2954edfd1e692f8cfd2d124 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Tue, 21 Jun 2016 15:53:37 -0600 Subject: Revert "layers: Make vklayer_utils a shared library" This reverts commit 5fa68457c16e57d90274d911adc49179024442b3. Change-Id: I5bd6c6be23859f271c84aa44ab62cab6c518db5a --- layers/CMakeLists.txt | 26 +++----------------------- layers/VkLayer_utils.def | 47 ----------------------------------------------- 2 files changed, 3 insertions(+), 70 deletions(-) delete mode 100644 layers/VkLayer_utils.def diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index 099b711f..acf67b8a 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -142,10 +142,11 @@ run_vk_layer_xml_generate(Threading thread_check.h) run_vk_layer_generate(unique_objects unique_objects.cpp) run_vk_layer_xml_generate(ParamChecker parameter_validation.h) - # Layer Utils Library +# For Windows, we use a static lib because the Windows loader has a fairly restrictive loader search +# path that can't be easily modified to point it to the same directory that contains the layers. if (WIN32) - add_library(VkLayer_utils SHARED vk_layer_config.cpp vk_layer_extension_utils.cpp vk_layer_utils.cpp VkLayer_utils.def) + add_library(VkLayer_utils STATIC vk_layer_config.cpp vk_layer_extension_utils.cpp vk_layer_utils.cpp) else() add_library(VkLayer_utils SHARED vk_layer_config.cpp vk_layer_extension_utils.cpp vk_layer_utils.cpp) install(TARGETS VkLayer_utils DESTINATION ${PROJECT_BINARY_DIR}/install_staging) @@ -165,24 +166,3 @@ add_vk_layer(parameter_validation parameter_validation.cpp parameter_validation. target_include_directories(VkLayer_core_validation PRIVATE ${GLSLANG_SPIRV_INCLUDE_DIR}) target_include_directories(VkLayer_core_validation PRIVATE ${SPIRV_TOOLS_INCLUDE_DIR}) target_link_libraries(VkLayer_core_validation ${SPIRV_TOOLS_LIBRARIES}) - -if (WIN32) - if (CMAKE_GENERATOR MATCHES "^Visual Studio.*") - file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/$/VkLayer_utils.dll COPY_SRC_PATH) - file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../demos/$/ COPY_DST_PATH) - file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../tests/$/ COPY_DST_TEST_PATH) - else() - file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/VkLayer_utils.dll COPY_SRC_PATH) - file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../demos/ COPY_DST_PATH) - file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../tests/ COPY_DST_TEST_PATH) - endif() - # Copy layer utils library to correct locations - add_custom_command(TARGET VkLayer_utils - POST_BUILD - COMMAND xcopy /Y /I ${COPY_SRC_PATH} ${COPY_DST_PATH} - COMMENT "Copying VkLayer_utils.dll to demos dir") - add_custom_command(TARGET VkLayer_utils - POST_BUILD - COMMAND xcopy /Y /I ${COPY_SRC_PATH} ${COPY_DST_TEST_PATH} - COMMENT "Copying VkLayer_utils.dll to demos dir") -endif() diff --git a/layers/VkLayer_utils.def b/layers/VkLayer_utils.def deleted file mode 100644 index 629c7d04..00000000 --- a/layers/VkLayer_utils.def +++ /dev/null @@ -1,47 +0,0 @@ -;;;; Begin Copyright Notice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Vulkan -; -; Copyright (c) 2015-2016 The Khronos Group Inc. -; Copyright (c) 2015-2016 Valve Corporation -; Copyright (c) 2015-2016 LunarG, Inc. -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. -; -; Author: Mark Lobodzinski -;;;; End Copyright Notice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; The following is required on Windows for exporting symbols from the DLL - -LIBRARY VkLayer_utils -EXPORTS -vk_format_is_depth_or_stencil -vk_format_is_depth_and_stencil -vk_format_is_stencil_only -vk_format_is_depth_only -vk_format_is_norm -vk_format_is_int -vk_format_is_uint -vk_format_is_sint -vk_format_is_float -vk_format_is_srgb -vk_format_is_compressed -vk_format_get_compatibility_class -vk_format_get_size -vk_format_get_channel_count -vk_safe_modulo -vk_string_validate -layer_debug_actions -util_GetExtensionProperties -util_GetLayerProperties -LogMessageInitialized -SetLogMessageInitialized -- cgit v1.2.3