9b449e9c5d
The change in commit 27252b24 (cmComputeLinkInformation: Simplify generator object access, 2015-08-02) broke the conditional use of a target introduced in commit 41abdc17 (cmGeneratorTarget: Move GetSOName from cmTarget, 2015-08-04). Restore the conditional lookup. Add a test case that hacks platform information variables to trigger this code everywhere.
11 lines
345 B
CMake
11 lines
345 B
CMake
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)
|