diff options
| author | Mike Stroyan <mike@LunarG.com> | 2015-07-10 12:51:14 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-17 10:05:21 -0600 |
| commit | 6fe4eedd84ed5bf4d1a1f91a61b12d654c7422d4 (patch) | |
| tree | 07a62bee793a6d8e1b5e6ab8d96db90ee5fe3f63 | |
| parent | d3680f62d0e133178835d12565630d7381f2057a (diff) | |
| download | usermoji-6fe4eedd84ed5bf4d1a1f91a61b12d654c7422d4.tar.xz | |
layers: Add install step for layers rpath settings
This allows a "make -Cbuild install' command to fix layer rpath.
The new layer shared libraries are created in build/install_staging/.
| -rw-r--r-- | layers/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index ea08e4d8..685f01ad 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -29,6 +29,9 @@ set(LAYER_JSON_FILES threading ) +set(VK_LAYER_RPATH /usr/lib/x86_64-linux-gnu/vulkan/layer:/usr/lib/i386-linux-gnu/vulkan/layer) +set(CMAKE_INSTALL_RPATH ${VK_LAYER_RPATH}) + if (NOT WIN32) # extra setup for out-of-tree builds if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)) @@ -71,6 +74,7 @@ else() target_link_Libraries(VKLayer${target} layer_utils) add_dependencies(VKLayer${target} generate_vk_layer_helpers) set_target_properties(VKLayer${target} PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic") + install(TARGETS VKLayer${target} DESTINATION ${PROJECT_BINARY_DIR}/install_staging) endmacro() endif() @@ -129,6 +133,8 @@ if (WIN32) add_library(layer_utils_static STATIC vk_layer_config.cpp vk_layer_extension_utils.cpp) set_target_properties(layer_utils_static PROPERTIES OUTPUT_NAME layer_utils) target_link_libraries(layer_utils) +else() + install(TARGETS layer_utils DESTINATION ${PROJECT_BINARY_DIR}/install_staging) endif() add_vk_layer(Basic basic.cpp vk_layer_table.cpp) |
