cmake/Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake

12 lines
434 B
CMake
Raw Normal View History

2015-11-17 17:22:37 +01:00
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
2021-09-14 00:13:48 +02:00
IMPORTED_LOCATION "imported${CMAKE_SHARED_LIBRARY_SUFFIX}"
IMPORTED_IMPLIB "imported${CMAKE_IMPORT_LIBRARY_SUFFIX}"
2015-11-17 17:22:37 +01:00
IMPORTED_LINK_DEPENDENT_LIBRARIES "/path/to/libSharedDep.so"
)
add_executable(empty empty.c)
target_link_libraries(empty imported)