These are chat archives for inbilla/CMake

18th
May 2018
Marcelo Duarte Trevisani
@marcelotrevisani
May 18 2018 08:52

Hi guys, I'm having a problem with cmake, like
One of the libraries which I want to link to my shared library which I'm compiling is boost
So, I tried like:

target_link_libraries(my_project
                      ${Boost_FILESYSTEM_LIBRARY}
                      ${Boost_SYSTEM_LIBRARY}
                      ${Boost_CHRONO_LIBRARY}
                      ${Boost_DATE_TIME_LIBRARY}
                      ${Boost_REGEX_LIBRARY}
                      ${Boost_SIGNALS_LIBRARY}
                      ${Boost_THREAD_LIBRARY}
                     )

However, when I do in the terminal to check the linkage

ldd libmy_project.so
...
        libboost_system.so.1.66.0 => not found
    libboost_chrono.so.1.66.0 => not found
    libboost_date_time.so.1.66.0 => not found
    libboost_regex.so.1.66.0 => not found
    libboost_signals.so.1.66.0 => not found
    libboost_thread.so.1.66.0 => not found
...

But the boost library was found by the cmake in the CMakeList.