diff options
author | Mike Schuchardt <mikes@lunarg.com> | 2018-03-29 10:12:04 -0600 |
---|---|---|
committer | Mike Schuchardt <mikes@lunarg.com> | 2018-03-29 13:32:59 -0600 |
commit | dbf91d8403e01152ca6de3059e6547fa23c106d0 (patch) | |
tree | 60a39879bcdcf5b82482d00243d8b0ac4dab13d8 /tests | |
parent | f220ce6c05b4b9ff335cd5ff39efd361aea5aa0d (diff) | |
download | Vulkan-Loader-dbf91d8403e01152ca6de3059e6547fa23c106d0.tar.gz Vulkan-Loader-dbf91d8403e01152ca6de3059e6547fa23c106d0.tar.bz2 Vulkan-Loader-dbf91d8403e01152ca6de3059e6547fa23c106d0.zip |
tests: macOS CMake fixes for Xcode generator
Put icd and test layer json files in $<CONFIG> directory when using
Xcode generator so layer tests can be executed and debugged from within
Xcode.
Change-Id: I079a89ea065ddeec98ce95766e284220c67b1859
Diffstat (limited to 'tests')
-rw-r--r-- | tests/layers/CMakeLists.txt | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/layers/CMakeLists.txt b/tests/layers/CMakeLists.txt index d985455a..ad15e41b 100644 --- a/tests/layers/CMakeLists.txt +++ b/tests/layers/CMakeLists.txt @@ -29,12 +29,23 @@ if (WIN32) elseif(APPLE) # 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}/macos/${config_file}.json - VERBATIM - ) - endforeach(config_file) + if (CMAKE_GENERATOR MATCHES "^Xcode.*") + add_custom_target(mk_test_layer_config_dir ALL COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>) + foreach (config_file ${LAYER_JSON_FILES}) + add_custom_target(${config_file}-json ALL + DEPENDS mk_test_layer_config_dir + COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/macos/${config_file}.json $<CONFIG> + VERBATIM + ) + endforeach(config_file) + else() + foreach (config_file ${LAYER_JSON_FILES}) + add_custom_target(${config_file}-json ALL + COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/macos/${config_file}.json + VERBATIM + ) + endforeach(config_file) + endif() endif() else() # extra setup for out-of-tree builds |