summaryrefslogtreecommitdiffstats
path: root/Tests/LinkDirectory
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-09-14 15:48:20 (GMT)
committerCraig Scott <craig.scott@crascit.com>2018-09-25 13:59:58 (GMT)
commita71caab46b205c2b0367c2b11c12a9b55b09bcca (patch)
treeb19ad25b6e8b87bc0e35eb7c93df8afcb6fde594 /Tests/LinkDirectory
parent5ca130e22394978814a9e59418529a7a3e1a61bd (diff)
downloadCMake-a71caab46b205c2b0367c2b11c12a9b55b09bcca.zip
CMake-a71caab46b205c2b0367c2b11c12a9b55b09bcca.tar.gz
CMake-a71caab46b205c2b0367c2b11c12a9b55b09bcca.tar.bz2
LINK_DIRECTORIES: Add new properties and commands
These new capabilities enable to manage link directories Two new properties: * target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES One new command * target_link_directories(): to populate target properties Fixes: #17215
Diffstat (limited to 'Tests/LinkDirectory')
-rw-r--r--Tests/LinkDirectory/External/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/LinkDirectory/External/CMakeLists.txt b/Tests/LinkDirectory/External/CMakeLists.txt
index f7c840f..d2a1f9f 100644
--- a/Tests/LinkDirectory/External/CMakeLists.txt
+++ b/Tests/LinkDirectory/External/CMakeLists.txt
@@ -1,6 +1,20 @@
cmake_minimum_required(VERSION 2.8)
project(LinkDirectoryExternal C)
+
+add_executable(myexe2 myexe.c)
+set_property(TARGET myexe2 PROPERTY OUTPUT_NAME LinkDirectory2)
+target_link_directories(myexe2 PRIVATE lib "${CMAKE_CURRENT_SOURCE_DIR}/../lib")
+target_link_libraries(myexe2 PRIVATE mylibA mylibB)
+
+add_library (mylibs INTERFACE)
+target_link_directories(mylibs INTERFACE lib "${CMAKE_CURRENT_SOURCE_DIR}/../lib")
+target_link_libraries(mylibs INTERFACE mylibA mylibB)
+add_executable(myexe3 myexe.c)
+set_property(TARGET myexe3 PROPERTY OUTPUT_NAME LinkDirectory3)
+target_link_libraries(myexe3 PRIVATE mylibs)
+
+
# Test CMP0015 OLD behavior: -L../lib
cmake_policy(SET CMP0015 OLD)
link_directories(../lib)