Ok, I have a project in CMake, structured as follows:
CMakeLists.txt
/libfoo/CMakeLists.txt
/frontend/qt/CMakeLists.txt
libfoo- this is the library I'm writing, and frontend/qt- this is a small interface, as well as an example of use. The problem is that CMake passes the relative path to libfoo.so.xthe linker instead of the option -l. The goal of Qt gui is declared as follows:
add_executable(qtgui ${qtgui_sources} ${qtgui_moced} ${qtgui_ui_h})
target_link_libraries(qtgui ${QT_LIBRARIES} foo)
I would prefer it to simply link againts -lfoolike all other libraries, rather than the full path. How to do it?
Thank!
source
share