Merge topic 'use-generator-target'
9b449e9c
cmComputeLinkInformation: Lookup a target only if we have one
This commit is contained in:
commit
cb99eff642
|
@ -761,7 +761,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
|
|||
return;
|
||||
}
|
||||
|
||||
cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt);
|
||||
cmGeneratorTarget *gtgt = 0;
|
||||
|
||||
// Get a full path to the dependent shared library.
|
||||
// Add it to the runtime path computation so that the target being
|
||||
|
|
|
@ -7,3 +7,4 @@ run_cmake(CMP0023-NEW-2)
|
|||
run_cmake(MixedSignature)
|
||||
run_cmake(Separate-PRIVATE-LINK_PRIVATE-uses)
|
||||
run_cmake(SubDirTarget)
|
||||
run_cmake(SharedDepNotTarget)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
enable_language(C)
|
||||
set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
|
||||
add_library(imported SHARED IMPORTED)
|
||||
set_target_properties(imported PROPERTIES
|
||||
IMPORTED_LOCATION "imported"
|
||||
IMPORTED_LINK_DEPENDENT_LIBRARIES "/path/to/libSharedDep.so"
|
||||
)
|
||||
add_executable(empty empty.c)
|
||||
target_link_libraries(empty imported)
|
Loading…
Reference in New Issue