You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
345 B

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)