MantisBT - CMake
View Issue Details
0013397CMakeCMakepublic2012-07-12 17:052013-06-04 08:33
carsten schiemann 
Brad King 
normalminoralways
closedfixed 
Apple MacOS X10.4.10
CMake 2.8.8 
CMake 2.8.11CMake 2.8.11 
0013397: frameworks are not transitive like libraries in the project dependency graph
while normal target_link_libraries setups with static libraries forward the dependency to targets adding the static library, this is broken for frameworks. the library dependency is kept but the related Framework Search Path is forgotten.

there was no problem as long as the static library was the only one adding a framework. adding a framework in "/System/Library/Frameworks" to the the final application seems ok too (i did add cocoa). adding a framework in a custom location (like /Library/Frameworks) breaks the forwarding.
a rough description of my setup:
static library A
find_library(LIBONE libOne /some)
target_link_libraries(A ${LIBONE}) #/some/libOne.framework

application B
target_link_libraries(B A)
find_library(LIBTWO libTwo /somemore)
target_link_libraries(B LIBTWO) #/somemore/libTwo.framework

generating the Xcode project file shows the Framework Search Path to "/somemore" but it forgot "/some"
i added a patch which seems to fix the issue. but as my understanding of this code is slim at best i might have missed something.
No tags attached.
related to 0014191closed Brad King Regression.. framework paths are not added to compile args in XCode generator 
patch AnalyseLibDependencies-Framework-forward.patch (462) 2012-07-12 17:05
https://public.kitware.com/Bug/file/4392/AnalyseLibDependencies-Framework-forward.patch
Issue History
2012-07-12 17:05carsten schiemannNew Issue
2012-07-12 17:05carsten schiemannFile Added: AnalyseLibDependencies-Framework-forward.patch
2012-07-16 09:21Brad KingNote Added: 0030053
2012-07-16 09:21Brad KingStatusnew => backlog
2012-12-07 13:37Brad KingAssigned To => Brad King
2012-12-07 13:37Brad KingStatusbacklog => assigned
2012-12-07 13:37Brad KingTarget Version => CMake 2.8.11
2012-12-07 14:05Brad KingNote Added: 0031852
2012-12-07 14:05Brad KingStatusassigned => resolved
2012-12-07 14:05Brad KingResolutionopen => fixed
2012-12-07 14:05Brad KingFixed in Version => CMake 2.8.11
2012-12-07 15:50Brad KingNote Added: 0031855
2013-05-06 09:32Robert MaynardNote Added: 0032984
2013-05-06 09:32Robert MaynardStatusresolved => closed
2013-06-04 08:33Brad KingRelationship addedrelated to 0014191

Notes
(0030053)
Brad King   
2012-07-16 09:21   
cmTarget::AnalyzeLibDependencies has been replaced by cmComputeLinkDepends. I wasn't aware it the old implementation was still used for anything except the outdated export_library_dependencies command. It looks like the list of Frameworks is still used for Xcode.

The generation of FRAMEWORK_SEARCH_PATHS in the Xcode generator needs to be converted to use the results of cmComputeLinkDepends/cmComputeLinkInformation instead.
(0031852)
Brad King   
2012-12-07 14:05   
It turns out we were already computing the correct value but it was not getting used because the old incorrect computation was never removed. Fixed:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a4448071 [^]
(0031855)
Brad King   
2012-12-07 15:50   
Upon further analysis I realized the situation was a bit more subtle than I thought in 0013397:0031852. Here is a better explanation and fix:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2bc22bda [^]
(0032984)
Robert Maynard   
2013-05-06 09:32   
Closing resolved issues that have not been updated in more than 4 months.