Hi Bill, Is it the same thing if static lib is built by CMake?
Cheers, Jean. Message: 2 Date: Wed, 09 Apr 2008 08:35:17 -0400 From: Bill Hoffman <[EMAIL PROTECTED]> Subject: Re: [CMake] Relinking static libs To: Ilya Shvetsov <[EMAIL PROTECTED]> Cc: "[email protected]" <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed You must use a FULL path to the library or CMake will not know what depend information to add. If you have: add_executable(foo foo.c) link_directories(foobar) target_link_libraries(foo A B C) And A, B and C are libraries in the foobar directory that are not built by CMake, then there will be no depends on the external libraries as CMake does not know where they are. The correct thing to do would be: find_library(ALIB A) find_library(BLIB B) find_library(CLIB C) target_link_libraries(foo "${ALIB}" "${BLIB}" "${CLIB}") Then CMake will have the full path to A,B, and C, and if one of them changes foo will be relinked. -Bill _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
