diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-11-15 18:01:36 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2019-12-13 15:51:46 (GMT) |
commit | 5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2 (patch) | |
tree | 7e456292c9299223c3bd851261595f24371d2f3b /Tests/InterfaceLibrary | |
parent | 3bc63e99e44b3ef82c19d018f939ea839882a131 (diff) | |
download | CMake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.zip CMake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.tar.gz CMake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.tar.bz2 |
Ninja: Add multi-config variant
Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
Diffstat (limited to 'Tests/InterfaceLibrary')
-rw-r--r-- | Tests/InterfaceLibrary/CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt index 954c02d..311ca2a 100644 --- a/Tests/InterfaceLibrary/CMakeLists.txt +++ b/Tests/InterfaceLibrary/CMakeLists.txt @@ -3,6 +3,12 @@ cmake_minimum_required(VERSION 2.8) project(InterfaceLibrary) +set(cfg_dir) +get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(_isMultiConfig) + set(cfg_dir /$<CONFIG>) +endif() + add_library(iface_nodepends INTERFACE) target_compile_definitions(iface_nodepends INTERFACE IFACE_DEFINE) @@ -32,7 +38,7 @@ add_library(item_iface INTERFACE IMPORTED) set_property(TARGET item_iface PROPERTY IMPORTED_LIBNAME item_real) add_dependencies(item_iface item_real) get_property(item_iface_dependencies TARGET item_iface PROPERTY MANUALLY_ADDED_DEPENDENCIES) -link_directories(${CMAKE_CURRENT_BINARY_DIR}) +link_directories(${CMAKE_CURRENT_BINARY_DIR}${cfg_dir}) add_executable(InterfaceLibrary definetestexe.cpp) target_link_libraries(InterfaceLibrary |