CMake⽂件link_directories()使⽤相对路径失败的问题柠檬汁英语
今天再编译⼯程时,遇到了这个问题:陈胜墓
Policy CMP0015 is not t: link_directories() treats paths relative to the source dir.
看到了这⼀篇
关于坚持的议论文烟花作文400字解决了这个问题,核⼼如下:
共面向量定理>坚强的女人In CMake 2.8.0 and lower the link_directories() command pasd relative paths unchanged to the linker. In CMake 2.8.1 and
above the link_directories() command prefers to interpret relative paths with respect to CMAKE_CURRENT_SOURCE_DIR,
which is consistent with include_directories() and other commands. The OLD behavior for this policy is to u relative paths
职业年金是什么意思verbatim in the linker command. The NEW behavior for this policy is to convert relative paths to absolute paths by appending
给某人打电话用英语怎么说the relative path to CMAKE_CURRENT_SOURCE_DIR.
CMake 2.8.0 以下的版本,加载动态链接库link_directories()时使⽤相对路径,链接时也使⽤相对路径;CMake 2.8.1 及以上版本加载动态链接库link_directories()时使⽤CMAKE_CURRENT_SOURCE_DIR修饰对路径,链接时先转换成绝对路径再进⾏链接。