<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mv="http://macVmlSchemaUri" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Arial;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Hi Harry,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">I’m not sure about any official instructions, but here’s how I’m doing it:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Adapted from https://code.google.com/p/ios-cmake/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Standard settings<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_SYSTEM_NAME Darwin)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_SYSTEM_VERSION 1)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (UNIX True)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (APPLE True)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (IOS True)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Required as of cmake 2.8.10<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Figure out where Xcode is installed<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">execute_process (COMMAND "xcode-select" "--print-path" OUTPUT_VARIABLE CMAKE_XCODE_ROOT OUTPUT_STRIP_TRAILING_WHITESPACE)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_XCODE_ROOT ${CMAKE_XCODE_ROOT} CACHE PATH "Location of Xcode. Normally auto-detected via 'xcode-select', but can be overridden")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Skip the platform compiler checks for cross compiling<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_CXX_COMPILER_WORKS TRUE)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_C_COMPILER_WORKS TRUE)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Setup iOS platform unless specified manually with DEVICE_OR_SIMULATOR<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">if (NOT DEFINED DEVICE_OR_SIMULATOR)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    set (DEVICE_OR_SIMULATOR "OS")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">endif ()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (DEVICE_OR_SIMULATOR ${DEVICE_OR_SIMULATOR} CACHE STRING "Set to 'Simulator' (for simulators), or 'OS' (for devices)")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Check the platform selection and setup for developer root<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">if (NOT((${DEVICE_OR_SIMULATOR} STREQUAL "OS") OR (${DEVICE_OR_SIMULATOR} STREQUAL "Simulator")))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    message (FATAL_ERROR "Unsupported DEVICE_OR_SIMULATOR value selected. Please choose 'OS' or 'Simulator'")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">endif ()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_IOS_DEVELOPER_ROOT "${CMAKE_XCODE_ROOT}/Platforms/iPhone${DEVICE_OR_SIMULATOR}.platform/Developer")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Find and use the most recent iOS sdk unless specified manually with CMAKE_IOS_SDK_ROOT<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">if (NOT DEFINED CMAKE_IOS_SDK_ROOT)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    if (_CMAKE_IOS_SDKS)
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">        list (SORT _CMAKE_IOS_SDKS)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">        list (REVERSE _CMAKE_IOS_SDKS)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">        list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    else ()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">        message (FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    endif ()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">endif ()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Set the sysroot default to the most recent SDK<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># If we're generating Xcode projects, the keyword "iphoneos" is all that's needed; otherwise<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># we need to specify the complete path<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">if (${CMAKE_GENERATOR} STREQUAL "Xcode")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    set (CMAKE_OSX_SYSROOT "iphoneos")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">else ()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    # set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    # Actually, just fail - we haven't yet done the work to support any generator except Xcode for iOS<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    message (FATAL_ERROR "Only the Xcode generator is supported at this time. Be sure to specify '-GXcode' on the cmd line.")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">endif ()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># Set the find root to the iOS developer roots and to user defined paths<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_FIND_ROOT_PATH "${CMAKE_XCODE_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin" ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE string  "iOS find
 search path root")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># default to searching for frameworks first<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_FIND_FRAMEWORK FIRST)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"># set up the default search directories for frameworks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">set (CMAKE_SYSTEM_FRAMEWORK_PATH<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    ${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    ${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">    ${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri;color:black"><br>
<b>Parag Chandra<br>
</b>Technical Lead, Mobile Team<br>
Mobile: +1.919.824.1410<br>
<br>
Ionic Security Inc.<br>
1170 Peachtree St. NE STE 400, Atlanta, GA 30309<o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellpadding="0" style="background:white">
<tbody>
<tr>
<td nowrap="" style="padding:.75pt .75pt .75pt .75pt"></td>
<td nowrap="" valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
<td nowrap="" style="padding:.75pt .75pt .75pt .75pt"></td>
<td nowrap="" style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
<tr>
<td width="5" nowrap="" style="width:3.75pt;padding:.75pt .75pt .75pt .75pt"></td>
<td width="70" nowrap="" valign="top" style="width:52.5pt;padding:.75pt .75pt .75pt .75pt">
</td>
<td width="5" nowrap="" style="width:3.75pt;padding:.75pt .75pt .75pt .75pt"></td>
<td width="287" nowrap="" valign="top" style="width:215.25pt;padding:.75pt .75pt .75pt .75pt">
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">CMake <cmake-bounces@cmake.org> on behalf of Harry Mallon <Harry@codexdigital.com><br>
<b>Date: </b>Monday, January 9, 2017 at 6:54 AM<br>
<b>To: </b>"cmake@cmake.org" <cmake@cmake.org><br>
<b>Subject: </b>[EXTERNAL]: [CMake] Up to date iOS instructions<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Hello, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Are there any up to date instructions for doing iOS builds? There are load of tutorials going back many years on Google. I am using something based on this <a href="https://github.com/cristeab/ios-cmake">https://github.com/cristeab/ios-cmake</a> as
 a toolchain file currently but I am seeing the ${EFFECTIVE_PLATFORM_NAME} generator expression problem mentioned here last year (<a href="https://cmake.org/pipermail/cmake/2016-March/063113.html">https://cmake.org/pipermail/cmake/2016-March/063113.html</a>).
 I have heard something about CMAKE_OSX_SYSROOT = iphoneos and maybe CMAKE_IOS_INSTALL_COMBINED?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Yours,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Harry<o:p></o:p></p>
</div>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:1.5pt;margin-left:0in;line-height:12.0pt" id="c1-id-6">
<span style="font-size:10.0pt;font-family:Arial;color:black">Harry Mallon<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:7.5pt;margin-left:0in;line-height:12.0pt" id="c1-id-7">
<span style="font-size:10.0pt;font-family:Arial;color:black">CODEX | Software Engineer<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:1.5pt;margin-left:0in;line-height:12.0pt" id="c1-id-8">
<span style="font-size:10.0pt;font-family:Arial;color:gray">60 Poland Street</span><span style="font-size:10.0pt;font-family:Arial"> |
<span style="color:gray">London</span> | <span style="color:gray">England </span>
| <span style="color:gray">W1F 7NT </span><o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:3.0pt;margin-left:0in;line-height:12.0pt" id="c1-id-14">
<span style="font-size:10.0pt;font-family:Arial;color:gray">E <a href="mailto:harry@codexdigital.com">
<span style="color:gray;text-decoration:none">harry@codexdigital.com</span></a> </span><span style="font-size:10.0pt;font-family:Arial;color:black">|</span><span style="font-size:10.0pt;font-family:Arial;color:gray"> T
<a href="callto:+44%20203%207000%20989"><span style="color:gray;text-decoration:none">+44 203 7000 989</span></a> <o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:1.5pt;margin-left:0in;line-height:12.0pt">
<span style="font-size:10.0pt;font-family:Arial"><a href="http://codex.online" title="Visit our website"><span style="color:gray;text-decoration:none">Website</span></a> |
<a href="https://www.facebook.com/codexdigital" title="Find us on Facebook"><span style="color:gray;text-decoration:none">Facebook</span></a> |
<a href="http://twitter.com/codexdigital" title="Follow us on Twitter"><span style="color:gray;text-decoration:none">Twitter</span></a><o:p></o:p></span></p>
<p style="margin-top:11.25pt" id="c1-id-22"><span style="font-size:10.0pt;font-family:Arial"><a href="http://codex.online" title="See us at IBC!"><span style="border:none windowtext 1.0pt;padding:0in;text-decoration:none"><img border="0" width="560" height="84" id="c1-id-24" src="http://codex.online/?action=asset&id=5B21DF7C-EC27-4199-852F-D596F5F28DA9"></span></a><o:p></o:p></span></p>
</div>
</body>
</html>