You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have a library foo that is built as a static library, then if you try to install it with install(EXPORT) then it fails unless all its dependencies are also installed, even when the target_link_libraries is PRIVATE. The same does not occur if foo is a shared library or an executable.
Why does this occur?
Posibility: the symbols in libfoo.a contain only the ones that it built for itself and not that of the dependencies, so in order to consume libfoo.a you would need it to consume its dependencies as well?
(Confirmed in: https://github.com/LecrisUT/cmake_install_static_issue)
Should installation of static libraries be supported? How to install the dependencies as well?
How to limit the installation of PRIVATE linked dependencies to not install header files, Config.cmake, etc.
If we have a library
foo
that is built as a static library, then if you try to install it withinstall(EXPORT)
then it fails unless all its dependencies are also installed, even when thetarget_link_libraries
isPRIVATE
. The same does not occur iffoo
is a shared library or an executable.Posibility:the symbols inlibfoo.a
contain only the ones that it built for itself and not that of the dependencies, so in order to consumelibfoo.a
you would need it to consume its dependencies as well?(Confirmed in: https://github.com/LecrisUT/cmake_install_static_issue)
PRIVATE
linked dependencies to not install header files, Config.cmake, etc.BUILD_LOCAL_INTERFACE
:The text was updated successfully, but these errors were encountered: