View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014191 | CMake | CMake | public | 2013-06-03 21:56 | 2013-11-04 09:33 | ||||
Reporter | Edward Rudd | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.11 | ||||||||
Target Version | CMake 2.8.11.1 | Fixed in Version | CMake 2.8.11.1 | ||||||
Summary | 0014191: Regression.. framework paths are not added to compile args in XCode generator | ||||||||
Description | I have a cmake that has lines like this to find private framework FIND_LIBRARY(SDL2_LIBRARY SDL2 PATHS ${CommonRoot}/SDL2/lib/osx NO_DEFAULT_PATH) and then later for a add_library target does this to add the framework path into the build TARGET_LINK_LIBRARIES(MyLIB ${SDL2_LIBRARY}) with 2.8.10 this would add a -F/path/to/SDL2/lib/osx argument to GCC/G++. However in 2.8.11 this does not happen and compiles fail due to gcc' not being able to find the frameworks for fetching the headers inside of them (e.g. <SDL2/SDL.h> ) if I use the Make generator it works fine and continues to add in the -F parameter. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0033218) Edward Rudd (reporter) 2013-06-03 22:25 edited on: 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 (manager) 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 (reporter) 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 (manager) 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 (reporter) 2013-06-04 09:18 |
Correct, sorry I forgot that detail.. |
(0033232) Brad King (manager) 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 (reporter) 2013-06-04 10:15 |
Sweet.. so it should be a simple fix.. |
(0033235) Brad King (manager) 2013-06-04 10:22 |
Re 0014191:0033233: Yes, I'm running the test suite with the fix now. |
(0033237) Brad King (manager) 2013-06-04 10:58 |
Fixed: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21a0beac [^] |
(0034368) Robert Maynard (manager) 2013-11-04 09:33 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-06-03 21:56 | Edward Rudd | New Issue | |
2013-06-03 22:25 | Edward Rudd | Note Added: 0033218 | |
2013-06-03 22:25 | Edward Rudd | Note Edited: 0033218 | |
2013-06-04 08:33 | Brad King | Relationship added | related to 0013397 |
2013-06-04 09:00 | Brad King | Note Added: 0033225 | |
2013-06-04 09:07 | Edward Rudd | Note Added: 0033226 | |
2013-06-04 09:15 | Brad King | Note Added: 0033227 | |
2013-06-04 09:18 | Edward Rudd | Note Added: 0033229 | |
2013-06-04 09:44 | Brad King | Note Added: 0033232 | |
2013-06-04 09:45 | Brad King | Assigned To | => Brad King |
2013-06-04 09:45 | Brad King | Status | new => assigned |
2013-06-04 09:45 | Brad King | Target Version | => CMake 2.8.12 |
2013-06-04 10:15 | Edward Rudd | Note Added: 0033233 | |
2013-06-04 10:22 | Brad King | Note Added: 0033235 | |
2013-06-04 10:58 | Brad King | Note Added: 0033237 | |
2013-06-04 10:58 | Brad King | Status | assigned => resolved |
2013-06-04 10:58 | Brad King | Resolution | open => fixed |
2013-06-04 10:58 | Brad King | Fixed in Version | => CMake 2.8.12 |
2013-06-07 15:16 | Robert Maynard | Fixed in Version | CMake 2.8.12 => CMake 2.8.11.1 |
2013-06-07 15:16 | Robert Maynard | Target Version | CMake 2.8.12 => CMake 2.8.11.1 |
2013-11-04 09:33 | Robert Maynard | Note Added: 0034368 | |
2013-11-04 09:33 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |