Notes |
|
(0033218)
|
Edward Rudd
|
2013-06-03 22:25
|
|
It looks like the culprit commit is 2bc22bdaacfc0f0f91c229685dc5dbadd0267601 that broke it.
After that the Target specific FRAMEWORK_SEARCH_PATHS don't work in Xcode projects.
I'll do more git bisecting tomorrow to be sure..
|
|
|
(0033225)
|
Brad King
|
2013-06-04 09:00
|
|
I cannot reproduce this. I constructed a test case with the code
add_executable(foo foo.c)
target_link_libraries(foo ${CMAKE_CURRENT_SOURCE_DIR}/Frameworks/OpenGL2.framework)
where "OpenGL2.framework" was created by copying the OpenGL.framework and renaming it. The foo.c source does #include <OpenGL2/gl.h> and it works with the Xcode generator in CMake 2.8.10 and 2.8.11. The -F option shows up on the compile line. Only if I manually remove it does the compilation fail. |
|
|
(0033226)
|
Edward Rudd
|
2013-06-04 09:07
|
|
You are adding it to the executable.. I am not adding it to an executable target but a library target.
try this.
add_library(bar bar.c)
target_link_libraries(bar ${CMAKE_CURRENT_SOURCE_DIR}/Frameworks/OpenGL2.framework)
add_executable(foo foo.c)
target_link_libraries(foo bar) |
|
|
(0033227)
|
Brad King
|
2013-06-04 09:15
|
|
Ahh, more specifically it is a STATIC library target that fails. This works:
add_library(foo SHARED foo.c)
target_link_libraries(foo ${CMAKE_CURRENT_SOURCE_DIR}/Frameworks/OpenGL2.framework)
but this fails:
add_library(foo STATIC foo.c)
target_link_libraries(foo ${CMAKE_CURRENT_SOURCE_DIR}/Frameworks/OpenGL2.framework) |
|
|
(0033229)
|
Edward Rudd
|
2013-06-04 09:18
|
|
Correct, sorry I forgot that detail.. |
|
|
(0033232)
|
Brad King
|
2013-06-04 09:44
|
|
The commit you reported from git bisect:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2bc22bda [^]
makes it pretty clear what is wrong:
+ if(target.GetType() != cmTarget::OBJECT_LIBRARY &&
+ target.GetType() != cmTarget::STATIC_LIBRARY)
{
...
+ // Add framework search paths needed for linking.
I added that because those library types do not actually link but forgot about the influence of FRAMEWORK_SEARCH_PATHS on the compile line. |
|
|
(0033233)
|
Edward Rudd
|
2013-06-04 10:15
|
|
Sweet.. so it should be a simple fix.. |
|
|
(0033235)
|
Brad King
|
2013-06-04 10:22
|
|
|
|
(0033237)
|
Brad King
|
2013-06-04 10:58
|
|
|
|
(0034368)
|
Robert Maynard
|
2013-11-04 09:33
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|