cmake-conan icon indicating copy to clipboard operation
cmake-conan copied to clipboard

[Question]How to solve rpath-link problem?

Open Tumb1eweed opened this issue 2 years ago • 3 comments

Except for virtualrunenv, it's just not so convenient...How can I only use CMake to control path-link problem? Can I acquire dependencies's libdir in CMake using Conan-cmake?

Tumb1eweed avatar Jun 27 '22 16:06 Tumb1eweed

Hi @Tumb1eweed, Thanks for the question, could you provide a bit more information of your issue maybe with a reproducible case? Regarding your question about if you can acquire dependencies's libdir in CMake using Conan-cmake? That's not the purpouse of cmake-conan, It is just a wrapper to get conan settings from CMake and call conan install.

czoido avatar Jul 01 '22 10:07 czoido

Hi @Tumb1eweed, Thanks for the question, could you provide a bit more information of your issue maybe with a reproducible case? Regarding your question about if you can acquire dependencies's libdir in CMake using Conan-cmake? That's not the purpouse of cmake-conan, It is just a wrapper to get conan settings from CMake and call conan install.

Hey, can cmake-conan support setting LD_LIBRARY_PATH during cmake procudure? That would be very much helpful so we can leave rpath behind.

Tumb1eweed avatar Jul 12 '22 10:07 Tumb1eweed

Hi, I'm having the same question. For example I want to link toolA that is compiled into shared lib, so as it written in official conan guideline we should firstly install using conan install and before executing build we must source activate.sh file.

So it very hard to maintain such pipeline when adding source commands to cmake. Is it possible to somehow omit this and use environment variables provided by conan?

Psyhich avatar Sep 26 '22 11:09 Psyhich