Hi, I've noticed that when I pass a directory through LINK_DIRECTORIES after ADD_LIBRARY, the directory is not added to the library search path. However, INCLUDE_DIRECTORIES does not suffer such problem. This causes a problem when I try to use Boost package. For example:
ADD_LIBRARY(foo ...) FIND_PACKAGE(Boost) IF(Boost_FOUND) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) TARGET_LINK_LIBRARIES(foo boost_filesystem) ENDIF(Boost_FOUND) In this case TARGET_LINK_LIBRARIES doesn't add ${Boost_LIBRARY_DIRS} to the library search path for 'foo' library. However, INCLUDE_DIRECTORIES works fine. Moving ADD_LIBRARY below the IF-statement, will not work because 'foo' will not be defined for TARGET_LINK_LIBRARIES. Is this a bug with LINK_DIRECTORIES? Is there some command like TARGET_LINK_DIRECTORIES(foo "/my_library_path") that I can use after ADD_LIBRARY(foo .) is called? -- Artur Kedzierski
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake