Re: [CMake] Link order (Ubuntu)

2018-11-06 Thread Giorgio Scorzelli
Thanks for you help. They are really shared lib, not static. I know it sounds weird: it's a python extension which must not link the ${PYTHON_LIBRARY} (according to official docs; in fact If I do so I get a segmentation fault) but finally in my executable,a sort of custom/home made ${PYTHON_EXEC

Re: [CMake] Link order (Ubuntu)

2018-11-06 Thread Robert Maynard
You have order dependent static libraries which can be solved by constructing a cycle. As Bo stated by constructing the cycle B;A;ImportedExtLib;B;A each library can see each other. Looking at your original code example it looks like you are importing the libraries as SHARED, but I think these are

Re: [CMake] Link order (Ubuntu)

2018-11-06 Thread Giorgio Scorzelli
I read the docs about LINK_INTERFACE_MULTIPLICITYtoo. But I'm not in the situation of a "cyclic dependency" so I 'm not sure if it solve my problem. In my case (with B A and ImpLib) what would be the syntax? Il giorno mar 6 nov 2018 alle ore 06:30 Robert Maynard < robert.mayn...@kitware.com>

Re: [CMake] Link order (Ubuntu)

2018-11-06 Thread Robert Maynard
The target_link_libraries has a property called LINK_INTERFACE_MULTIPLICITY that should help you out. https://cmake.org/cmake/help/v3.13/command/target_link_libraries.html#cyclic-dependencies-of-static-libraries On Tue, Nov 6, 2018 at 8:24 AM scrgiorgio wrote: > > Thanks for the help, > > trying

Re: [CMake] Link order (Ubuntu)

2018-11-06 Thread scrgiorgio
Thanks for the help, trying this (or any combination): target_link_libraries(MyExe B) target_link_libraries(MyExe A ) target_link_libraries(MyExe ImpLib) I get this order: 'B;...whatever...;A;ImpLib" and the last past is causing the problem. Apparently there is no way to change the right part

[CMake] Unable to get working RPATH (even absolute) on macOS

2018-11-06 Thread Nicholas Devenish
Hi All, Like many, I've been having trouble understanding the RPATH control settings. In particular, I can't seem to get external libraries (e.g. boost) to link in *any* way that allows it to find dependent libraries without DYLD_LIBRARY_PATH. Eventually I'd like to refer to them with relative pa