Re: [CMake] How to link archives (.a) into shared object (.so) with cmake ?

2015-11-18 Thread houssen
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)

[CMake] How to link archives (.a) into shared object (.so) with cmake ?

2015-11-17 Thread houssen
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

Re: [CMake] How to link archives (.a) into shared object (.so) with cmake ?

2015-11-17 Thread houssen
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

Re: [CMake] How to link archives (.a) into shared object (.so) with cmake ?

2015-11-17 Thread CHEVRIER, 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) with cmake ? > >I have an archive: >ADD_LIBRARY ( myArchive STATIC ${SRC} ) >Tha

Re: [CMake] How to link archives (.a) into shared object (.so) with cmake ?

2015-11-17 Thread CHEVRIER, 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) with cmake ? &