aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2016-06-21 15:53:37 -0600
committerMark Lobodzinski <mark@lunarg.com>2016-06-21 16:31:14 -0600
commit952aca54732d8506b2954edfd1e692f8cfd2d124 (patch)
tree9157420a63d2e723d0990ee9ddb7f175a63d33c3
parentd3f5fa37594de4936ce4d166898e4214873230e8 (diff)
downloadusermoji-952aca54732d8506b2954edfd1e692f8cfd2d124.tar.xz
Revert "layers: Make vklayer_utils a shared library"
This reverts commit 5fa68457c16e57d90274d911adc49179024442b3. Change-Id: I5bd6c6be23859f271c84aa44ab62cab6c518db5a
-rw-r--r--layers/CMakeLists.txt26
-rw-r--r--layers/VkLayer_utils.def47
2 files changed, 3 insertions, 70 deletions
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}/$<CONFIGURATION>/VkLayer_utils.dll COPY_SRC_PATH)
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../demos/$<CONFIGURATION>/ COPY_DST_PATH)
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../tests/$<CONFIGURATION>/ 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 <mark@LunarG.com>
-;;;; 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