jiridanek commented on a change in pull request #312:
URL: https://github.com/apache/qpid-proton/pull/312#discussion_r632677317
##########
File path: c/CMakeLists.txt
##########
@@ -419,6 +419,8 @@ if (BUILD_STATIC_LIBS)
add_library (qpid-proton-core-static STATIC ${qpid-proton-core-src})
target_compile_definitions(qpid-proton-core-static PUBLIC
PROTON_DECLARE_STATIC)
target_link_libraries (qpid-proton-core-static ${SSL_LIB} ${SASL_LIB}
${PLATFORM_LIBS})
+ set_target_properties(qpid-proton-core-static PROPERTIES
+ POSITION_INDEPENDENT_CODE ON)
Review comment:
@astitcher ideally, I want a cmake object library which dispatch then
sucks in; I am not actually interested in creating an artifact here, I just
want to put the proton symbols into dispatch...
I got inspired here by
> For this to happen, first create the static library with an option that
makes the compiler generate “Position Independent Code” for every object that
is archived as a part of the static library. This is required, because, a
dynamic library, by its definition, is a “shared library” - which means it is
relocatable. In order to have object files in the static library packed within
the dynamic library, it is important these objects are also relocatable - i.e.,
made position independent.
>
https://blog.ramdoot.in/how-can-i-link-a-static-library-to-a-dynamic-library-e1f25c8095ef
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]