[CMake] target_link_libraries fails dependencies
Andrea Galeazzi
galeazzi at korg.it
Wed Nov 14 06:34:04 EST 2012
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)
but when lib1 or lib2 changes, my_TARGET_NAME doesn't rebuild the
executable. On the other hand if I use the absolute path in
target_link_libraries (path1/lib1.a) everything works fine.
Is this behavior a bug of CMake or is not possible to detect this kind
of dependencies at all?
More information about the CMake
mailing list