【发布时间】:2015-04-16 16:03:46
【问题描述】:
在 CMake 中,我们使用 TARGET_LINK_LIBRARIES() 将共享库链接到库/可执行文件。
For example:
TARGET_LINK_LIBRARIES(ExecutableName xxx)
where ExecutableName - is the name of executable
xxx - is the library name.
据我了解,CMake 在 LINK_DIRECTORIES() 宏中提到的路径中搜索“libxxx.so”。 但是,如果我有一个名为“libxxx.a”的第三方库,那么如何使用 CMake 将该库链接到可执行文件。
提前感谢您的帮助!
【问题讨论】:
标签: cmake