On 10/12/2011 2:22 AM, Stephen Kelly wrote:
using set(CMAKE_LINK_INTERFACE_LIBRARIES "") should be the same as using
target_link_libraries(libA LINK_INTERFACE_LIBRARIES "")
for each library.
It is. The example under discussion has the same behavior even if you
explicitly set it on each target.
It works for me, but I don't know why it doesn't work for you. Maybe Brad
can have some insight?
The Modules/Platform/Darwin.cmake contains these lines:
# Need to list dependent shared libraries on link line. When building
# with -isysroot (for universal binaries), the linker always looks for
# dependent libraries under the sysroot. Listing them on the link
# line works around the problem.
SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1)
which were added here:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cff26fa#patch1
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82fcaebe#patch4
The behavior we are seeing in the test on Apple can be changed to the
expected behavior by adding
SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 0)
to the CMakeLists.txt file. However, I don't remember the details of why
I had to add that to Darwin.cmake in the first place. Hopefully there is
a better fix for the original problem.
-Brad
--
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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers