Mac OS. Cmake changes it's behaviout when building framework for iOS simulator

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Mac OS. Cmake changes it's behaviout when building framework for iOS simulator

Сергей Бойцов
Hello.
I'm looking for some help cause i have faced a really strange problem with building frameworks on Mac OS
So i have:
 
Mac OS X : el captain
Xcode 8.0
CMake 3.3.2 [1],
CMake 3.4.5 [2],
CMake 3.5-3.6 [3]
 
And simple test project consisted from 4 files
1) empty header file
2) empty c file
3) CMakeLists.txt
4) TestToolchain.cmake
 
content of CMakeLists.txt
 
add_library(dynamicFramework SHARED
            dynamicFramework.c
            dynamicFramework.h
)
set_target_properties(dynamicFramework PROPERTIES
  FRAMEWORK TRUE
  FRAMEWORK_VERSION C
  VERSION 16.4.0
  SOVERSION 1.0.0
  PUBLIC_HEADER dynamicFramework.h
)
 
content of TestToolchain.cmake
 
set(IOS TRUE)
set(CMAKE_OSX_SYSROOT /path/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk)
or
/path/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk/  )
 
so if CMAKE_OSX_SYSROOT equals to Mac OS sdk all CMakes veriosn [1,2,3] produced correct framework structure with Headers and Versions folders
if CMAKE_OSX_SYSROOT was set to simulator
CMake [1] produced correct framework
CMake [2] produced incorrect Version folder that points to C but no C folder is produced
CMake [3] produced no Version folder at all
 
As i know correct framework must collect Headers and Version fodler
 
 
 
 
 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mac OS. Cmake changes it's behaviout when building framework for iOS simulator

CMake mailing list
Hello,

On 02/02/2017 16:15, Сергей Бойцов wrote:

> Hello.
> I'm looking for some help cause i have faced a really strange problem
> with building frameworks on Mac OS
> So i have:
>
> Mac OS X : el captain
> Xcode 8.0
> CMake 3.3.2 [1],
> CMake 3.4.5 [2],
> CMake 3.5-3.6 [3]

> CMake [1] produced correct framework
> CMake [2] produced incorrect Version folder that points to C but no C
> folder is produced
> CMake [3] produced no Version folder at all

In contrast to macOS bundles the iOS ones have a more flattened
structure without Version links:

https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1

See also https://cmake.org/Bug/view.php?id=15833

So the CMake 3.5/3.6 behavior is the desired one. CMake versions before
were buggy in that regard.

Thanks,
Gregor
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...