lution is to add this line to your CMakeLists.txt
file:
Set (CMAKE_POSITION_INDEPENDENT_CODE ON)
Marc
On 17/11/15 11:44, "CMake on behalf of houssen"
<cmake-boun...@cmake.org on behalf of hous...@ipgp.fr> wrote:
Hello,
How to link archives (.a) into shared object (.so)
Hello,
How to link archives (.a) into shared object (.so) with cmake ?
I have an archive:
ADD_LIBRARY ( myArchive STATIC ${SRC} )
That I need to link with a shared object:
ADD_LIBRARY ( mySharedObject SHARED ${SRC} )
TARGET_LINK_LIBRARIES ( mySharedObject PUBLIC myArchive )
I get a compilation
your problem.
The easiest solution is to add this line to your CMakeLists.txt file:
Set (CMAKE_POSITION_INDEPENDENT_CODE ON)
Marc
On 17/11/15 11:44, "CMake on behalf of houssen"
<cmake-boun...@cmake.org on behalf of hous...@ipgp.fr> wrote:
Hello,
How to link archives
On 17/11/15 11:44, "CMake on behalf of houssen" <cmake-boun...@cmake.org on
behalf of hous...@ipgp.fr> wrote:
>Hello,
>
>How to link archives (.a) into shared object (.so) with cmake ?
>
>I have an archive:
>ADD_LIBRARY ( myArchive STATIC ${SRC} )
>Tha
>>
>>
>>
>> On 17/11/15 11:44, "CMake on behalf of houssen"
>> <cmake-boun...@cmake.org on behalf of hous...@ipgp.fr> wrote:
>>
>>>Hello,
>>>
>>>How to link archives (.a) into shared object (.so) with cmake ?
&