mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 20:19:53 +00:00
Merge topic 'tll-global-unknown-lib'
a47a8533
target_link_libraries: Allow linking to UNKNOWN IMPORTED GLOBAL libs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1220
This commit is contained in:
commit
b568a18997
@ -366,6 +366,7 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
|
||||
|
||||
if (tgt && (tgt->GetType() != cmStateEnums::STATIC_LIBRARY) &&
|
||||
(tgt->GetType() != cmStateEnums::SHARED_LIBRARY) &&
|
||||
(tgt->GetType() != cmStateEnums::UNKNOWN_LIBRARY) &&
|
||||
(tgt->GetType() != cmStateEnums::INTERFACE_LIBRARY) &&
|
||||
!tgt->IsExecutableWithExports()) {
|
||||
std::ostringstream e;
|
||||
|
@ -10,3 +10,4 @@ run_cmake(SubDirTarget)
|
||||
run_cmake(SharedDepNotTarget)
|
||||
run_cmake(StaticPrivateDepNotExported)
|
||||
run_cmake(StaticPrivateDepNotTarget)
|
||||
run_cmake(UNKNOWN-IMPORTED-GLOBAL)
|
||||
|
@ -0,0 +1,4 @@
|
||||
enable_language(C)
|
||||
add_library(UnknownImportedGlobal UNKNOWN IMPORTED GLOBAL)
|
||||
add_library(mylib empty.c)
|
||||
target_link_libraries(mylib UnknownImportedGlobal)
|
Loading…
Reference in New Issue
Block a user