diff options
author | Deniz Bahadir <dbahadir@benocs.com> | 2017-11-23 11:59:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-01 14:24:24 (GMT) |
commit | 51249e69eaab33fe43805b9fe2262b4ddab01b56 (patch) | |
tree | 1a33d55faf49c0bd9107ea4be7ac8efa756ebea2 /Tests/RunCMake/ObjectLibrary/LinkObjLHSShared.cmake | |
parent | e22c45d4c97c713734b8349132fa881f602f7ae3 (diff) | |
download | CMake-51249e69eaab33fe43805b9fe2262b4ddab01b56.zip CMake-51249e69eaab33fe43805b9fe2262b4ddab01b56.tar.gz CMake-51249e69eaab33fe43805b9fe2262b4ddab01b56.tar.bz2 |
objlib: Allow `OBJECT` libraries to link to other libraries.
The proper way to use libraries is now through `target_link_libraries`
for things such as usage requirements, compile definitions, include
directories, etc. To facilitate this, allow `OBJECT` libraries to "link"
to other libraries.
Co-Author: Ben Boeckel <ben.boeckel@kitware.com>
Issue: #14778
Diffstat (limited to 'Tests/RunCMake/ObjectLibrary/LinkObjLHSShared.cmake')
-rw-r--r-- | Tests/RunCMake/ObjectLibrary/LinkObjLHSShared.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/ObjectLibrary/LinkObjLHSShared.cmake b/Tests/RunCMake/ObjectLibrary/LinkObjLHSShared.cmake new file mode 100644 index 0000000..4aa7bba --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/LinkObjLHSShared.cmake @@ -0,0 +1,7 @@ +project(LinkObjLHSShared C) + +add_library(OtherLib SHARED a.c) +target_compile_definitions(OtherLib INTERFACE REQUIRED) + +add_library(AnObjLib OBJECT requires.c) +target_link_libraries(AnObjLib OtherLib) |