summaryrefslogtreecommitdiff
path: root/Tests/InterfaceLibrary
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-11-15 13:01:36 -0500
committerKyle Edwards <kyle.edwards@kitware.com>2019-12-13 10:51:46 -0500
commit5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2 (patch)
tree7e456292c9299223c3bd851261595f24371d2f3b /Tests/InterfaceLibrary
parent3bc63e99e44b3ef82c19d018f939ea839882a131 (diff)
downloadcmake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.tar.gz
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.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt
index 954c02d511..311ca2a4e7 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