[CMake] need two compilation to achieve success

Bill Hoffman bill.hoffman at kitware.com
Wed Jun 3 15:56:33 EDT 2009


Michael Jackson wrote:
> Sorry, that should be:
> 
> link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
> 
> 
No, this is not needed.   This is all taken care of by CMake for 
internal targets.

add_library(foobar ...)
add_executable(car ...)
target_link_libraries(car foobar)  # link_directories should not be 
needed for this at all.


-Bill


More information about the CMake mailing list