I have a CMake project which build library with external dependencies:
add_library(lib_name ${SRC})
target_link_libraries(lib_name ${DEPENDENCIES})
${DEPENDENCIES} contains of dependencies which found by find_package().
After I want to install my library in package:
install(TARGETS lib_name DESTINATION lib COMPONENT package)
So, and I want to add all (recursive) dynamic dependencies (*.so) of lib_name to package. I know that CMake solve recursive dependencies when build library, but I don't know how to install it to package. Maybe somebody know how to do it? Thanks in advance!