On Wednesday 14 November 2012, Andrea Galeazzi wrote:
> I'm using cmake_policy(SET CMP0015 NEW) to link external libraries (I
> don't have the sources of them) in order to avoid to specify the
> absolute path of each library. So I wrote the following commands:
> link_directories(path1 path2 ...)
> target_link_libraries(${my_TARGET_NAME} lib1 lib2)
Whenever possible, you should use absolute paths to libraries.
CMP0015 actually does not change this.
The only thing it does, is that if you use a relative path, e.g. "mylibs/",
then with CMP0015 set to OLD, this will be interpreted as
${CMAKE_CURRENT_BINARY_DIR}/mylibs/, while with CMOP0015 set to NEW, it will
be interpreted as ${CMAKE_CURRENT_SOURCE_DIR}/mylibs/
Alex
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake