diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-07 14:27:31 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-07 17:57:49 -0600 |
| commit | 0f07ea55a9a63dab44c6e6062fdd626d0191aadf (patch) | |
| tree | 9ece6c7b0168f0880bf3911e8962c28134f983f6 | |
| parent | 87ac66c1bf01339de4964becd3a9a26a5840b874 (diff) | |
| download | usermoji-0f07ea55a9a63dab44c6e6062fdd626d0191aadf.tar.xz | |
layers: Copy json config files to build directory
JSON library_path field should contain relative
path to the layer library. Easiest if both json and
library file live in the same spot.
| -rw-r--r-- | layers/CMakeLists.txt | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index 7b3b97b5..1d7247ea 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -14,6 +14,43 @@ macro(run_vk_layer_generate subcmd output) ) endmacro() +set(LAYER_JSON_FILES + api_dump_config + basic_config + draw_state_config + generic_config + image_config + mem_tracker_config + multi_config + object_tracker_config + param_checker_config + screenshot_config + shader_checker_config + threading_config + ) + +if (NOT WIN32) + # extra setup for out-of-tree builds + if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)) + foreach (config_file ${LAYER_JSON_FILES}) + add_custom_target(${config_file}-json ALL + COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/${config_file}.json + VERBATIM + ) + endforeach(config_file) + endif() +else() + if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)) + foreach (config_file ${LAYER_JSON_FILES}) + FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${config_file}.json ${config_file}-JSON) + add_custom_target(binary-dir-symlinks ALL + COMMAND copy ${config_file}-JSON ${config_file}.json + VERBATIM + ) + endforeach(config_file) + endif() +endif() + if (WIN32) macro(add_vk_layer target) add_custom_command(OUTPUT VKLayer${target}.def |
