My target linked with several libraries using TARGET_LINK_LIBRARIES with PUBLIC keyword, The INSTALL command looks like INSTALL(TARGETS foo DESTINATION ${CMAKE_INSTALL_PREFIX}/bin). I want somehow to force the cmake to include all (preferably excluding system libraries) libraries (SOs only) I link with to be included in the installation process. I've tried EXPORT keyword but looks like it affects only libraries which I build with in my project and marked with the same EXPORT as foo library.
Is it possible?
EDIT001: Additional information that may affect answer.
I'm using vcpkg to manage third parties. So the TARGET_LINK_LIBRARIES looks like
TARGET_LINK_LIBRARIES(foo PUBLIC
                      GTest::GTest
                      GTest::Main
                      ${GOOGLE_MOCK}
                      event
                      ${THRIFT_LIBRARIES}
                      ${Boost_LIBRARIES}
                      lzo2
                      sqlite3
                      ${ZeroMQ_LIBRARY}
                      gRPC::grpc
                      gRPC::grpc++
                      xml2
                      stdc++fs
                      bfd
                      -l:libisal.so.2
                      sgutils2
                      pthread
                      uuid
                      rt
                      )
So, essentially what I want to achieve is to take all these libraries which are macro'ed by vcpkg, like ${THRIFT_LIBRARIES}, ${Boost_LIBRARIES} and gRPC::grpc and so on