在我的 CMakeLists.txt 中,我有第 33 行:
link_directories (${QT_LIBRARIES})
其中${QT_LIBRARIES}
扩展为:
optimized;C:/QtSDK/Desktop/Qt/4.8.1/msvc2010/lib/QtOpenGL4.lib;debug;C:/QtSDK/Desktop/Qt/4.8.1/msvc2010/lib/QtOpenGLd4.lib
更新到 CMake 2.8.10.1 后,我收到以下警告:
CMake Warning (dev) at CMakeLists.txt:33 (link_directories):
This command specifies the relative path
optimized
as a link directory.
Policy CMP0015 is not set: link_directories() treats paths relative to the
source dir. Run "cmake --help-policy CMP0015" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
但是,如您所见,${QT_LIBRARIES}
不包含相对路径。在我看来,CMP0015 政策与此无关。
是我的错误还是CMake中的错误?