Hello,

On 30/07/15 16:03, Brad King wrote:
> On 07/30/2015 07:38 AM, Gregor Jasny via cmake-developers wrote:
>> Do you have a better idea to detect the usage of iphone/simulator SDK?
>> Maybe we should handle this in the platform Darwin modules?
> 
> This occurs when cross-compiling to iOS, so should we check for
> CMAKE_SYSTEM_NAME set to "iOS"?  There is already code to do this
> for Android.

The problem I see with this approach is that CMake provides no official
iOS toolchain file (maybe we should?). And the popular cmake-ios project
[1] for example sets SYSTEM_NAME to Darwin.

Maybe we can detect iOS via SDK string for now. If there is a better way
to detect iOS the PlatformIsAppleIos() could easily be changed.

I pushed the ios-app-bundle-layout topic branch together with a test
case. Some words about the patch:

I decided to put the iOS platform detection into cmMakefile and not
cmTarget because I'll need it for another bug (iOS install #12506) later
within cmGlobalGenerator::CreateDefaultGlobalTargets where no target is
available. I also thought about just providing a static function which
only performs the string comparisons but could not find a proper place
for it. From my gut feeling I would have placed it somewhere in a
*Xcode* file. But as far as I understand these files are not built on
non-Apple platforms which would uglify the generic callers.

Please review the topic branch. If you think it would make sense to see
also the ios-install patch and review both in parallel,  I could polish
and push it within the next days.

Thanks,
Gregor

[1] https://code.google.com/p/ios-cmake/source/browse/toolchain/iOS.cmake
-- 

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-developers

Reply via email to