MantisBT - CMake
View Issue Details
0014908CMakeCMakepublic2014-05-06 16:332014-11-03 08:38
James Bigler 
 
normalminoralways
closedfixed 
AppleOSX10.8
CMake 2.8.12.2 
CMake 3.0 
0014908: CMAKE_OSX_SYSROOT being ignored with frameworks in /Library/Frameworks
I have CMAKE_OSX_SYSROOT defined as something:

set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" CACHE LIST "OSX sysroot SDK directory" FORCE)

Then later I do a find_library command and it finds a library framework in /Library/Frameworks/mylib.framework

The cache entry for mylib has the full path to the library, but later during linking it removes the full path and instead uses the name directly:

-framework mylib

Unfortunately, because the -isysroot command is invoked the linker no longer looks in the standard locations. I have to use -F /Library/Frameworks -framework mylib. I can't even use -framework /Library/Frameworks/mylib.framework
No tags attached.
Issue History
2014-05-06 16:33James BiglerNew Issue
2014-05-07 08:43Brad KingNote Added: 0035832
2014-05-07 14:03James BiglerNote Added: 0035842
2014-05-07 14:22James BiglerNote Added: 0035843
2014-05-07 15:27Brad KingStatusnew => resolved
2014-05-07 15:27Brad KingResolutionopen => fixed
2014-05-07 15:27Brad KingFixed in Version => CMake 3.0
2014-11-03 08:38Robert MaynardNote Added: 0037133
2014-11-03 08:38Robert MaynardStatusresolved => closed

Notes
(0035832)
Brad King   
2014-05-07 08:43   
In this case it is expected that CMake ensures the -F /Library/Frameworks option appears.

Please try with 3.0.0-rc4.

Side note: LIST is not a valid cache entry type.
(0035842)
James Bigler   
2014-05-07 14:03   
OK, it seems to work properly in 3.0.0-rc4.
(0035843)
James Bigler   
2014-05-07 14:22   
Oh, and yeah LIST. Not sure where that came from. CMake has never complained about it.

Ah, I see why now:

cmCacheManager::CacheEntryType cmCacheManager::StringToType(const char* s)
{
  int i = 0;
  while(cmCacheManagerTypes[i])
    {
    if(strcmp(s, cmCacheManagerTypes[i]) == 0)
      {
      return static_cast<CacheEntryType>(i);
      }
    ++i;
    }
  return STRING;
}

Unknown types are STRING.
(0037133)
Robert Maynard   
2014-11-03 08:38   
Closing resolved issues that have not been updated in more than 4 months.