View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014885CMakeCMakepublic2014-04-18 02:432016-06-10 14:31
ReporterAggelos Kolaitis 
Assigned ToKitware Robot 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformAppleOSMac OS XOS Version10.9
Product VersionCMake 2.8.12.2 
Target VersionFixed in Version 
Summary0014885: Linking to frameworks in Xcode generator is buggy
DescriptionWhen using the Xcode generator, even though CMake can properly find all frameworks, the building process will fail with 'framework not found' errors. In a discussion in the CMake mailing list, someone suggested that this happens because Apple no longer looks in /Library/Frameworks and ~/Library/Frameworks by default.
Steps To ReproduceUnzip the attached archive, you will see the following tree:

cmake_bug/
| CMakeLists.txt
| dummy.c
| FindSDL2.cmake

Download http://libsdl.org/release/SDL2-2.0.3.dmg [^] and install SDL2.framework in
/Library/Frameworks or ~/Library/Frameworks.

Run CMake and choose the Xcode generator. You should see this in the cache:

> SDL2_LIBRARY /Library/Frameworks/SDL2.framework

Hit generate and open the Xcode project. Building will fail with 'SDL2: framework not found'.

I can provide more information if needed.

Additional Information* A quick workaround is to link directly to the actual SDL2 dylib, but this is not a fix.

> SDL2_LIBRARY /Library/Frameworks/SDL2.framework/SDL2

* I haven't tested other frameworks other than SDL2 because I don't own a Mac, this has been reported by my users, but I was able to reproduce it in my friend's Macbook.

* This does not happen if I choose the makefile generator.
TagsNo tags attached.
Attached Fileszip file icon cmake_bug.zip [^] (3,496 bytes) 2014-04-18 02:43

 Relationships

  Notes
(0035741)
Brad King (manager)
2014-04-18 09:16

The example works for me with CMake 3.0.0-rc3. Please test it:

 http://www.cmake.org/files/v3.0/?C=M;O=D [^]
(0035760)
Aggelos Kolaitis (reporter)
2014-04-22 16:05

You mean that you don't get any errors when building the project?

Unfortunately, I can't test it right now because I won't have access to a Mac for the next few days.

Would it be rude to ask you to test again with CMake 2.8.12.2? Because the issue is probably solved with CMake 3 if I understood correctly your comment.
(0035761)
Brad King (manager)
2014-04-22 16:12

Re 0014885:0035760: Actually it works for me with 2.8.12.2 also.

The link line contains "-F/Users/<username>/Library/Frameworks", the location of the SDL2 framework.

I'm using Xcode 5.0.2 on OS X 10.9.
(0035765)
Aggelos Kolaitis (reporter)
2014-04-23 13:12

Well, I had SDL2.framework in /Library/Frameworks and not in ~/Library/Frameworks.
I don't think that's the problem though.

I will try once again when I the chance and get back with the results.

btw, I've also got Xcode 5.0.2 on 10.9
(0042537)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-04-18 02:43 Aggelos Kolaitis New Issue
2014-04-18 02:43 Aggelos Kolaitis File Added: cmake_bug.zip
2014-04-18 09:16 Brad King Note Added: 0035741
2014-04-22 16:05 Aggelos Kolaitis Note Added: 0035760
2014-04-22 16:12 Brad King Note Added: 0035761
2014-04-23 13:12 Aggelos Kolaitis Note Added: 0035765
2016-06-10 14:29 Kitware Robot Note Added: 0042537
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team