<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 21-Dec-15 17:19, Bartosz Kosiorek
wrote:<br>
</div>
<blockquote cite="mid:1450693159551.19800@tomtom.com" type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; } @font-face { font-family: Helvetica; } @font-face { font-family: Calibri; } @font-face { font-family: Tahoma; } p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; color: black; } a:link, span.MsoHyperlink { color: blue; text-decoration: underline; } a:visited, span.MsoHyperlinkFollowed { color: purple; text-decoration: underline; } p.MsoAcetate, li.MsoAcetate, div.MsoAcetate { margin: 0cm 0cm 0.0001pt; font-size: 8pt; font-family: Tahoma, sans-serif; color: black; } p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph { margin: 0cm 0cm 0.0001pt 36pt; font-size: 12pt; font-family: 'Times New Roman', serif; color: black; } span.EmailStyle20 { font-family: Calibri, sans-serif; color: rgb(31, 73, 125); } span.BalloonTextChar { font-family: Tahoma, sans-serif; color: black; } .MsoChpDefault { font-size: 10pt;
} @page WordSection1 { margin: 70.85pt; } ol { margin-bottom: 0cm; } ul { margin-bottom: 0cm; }--></style>
<p>Thanks Ruslan for explanation.<br>
</p>
<p><br>
</p>
<p>Currently we already building fat library for arm
(armv7;armv7s;arm64) and x86 (i386;x86_64). </p>
<p><br>
</p>
<p>That's why my original assumption was that it could be easily
enabled for Simulator/device
<span style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px; background-color: rgb(255, 255, 255);">
(armv7;</span><span style="font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 16px; background-color:
rgb(255, 255, 255);">armv7s;</span><span style="font-family:
Calibri, Arial, Helvetica, sans-serif; font-size: 16px;
background-color: rgb(255, 255, 255);">arm64</span>;<span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px; background-color: rgb(255, 255, 255);">i386;</span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px; background-color: rgb(255, 255, 255);">x86_64</span>).<br>
</p>
<p>I could start working on that but if it will be too hacky, then
I will leave that idea.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>BTW I made some benchmarks of Xcode vs Make comparison for our
internal subproject (with "time" command). Here are results:<br>
</p>
<p><br>
</p>
<p class="p1"><span class="s1">Xcode generation:</span></p>
<p class="p1"><span class="s1"> real<span class="Apple-tab-span">
</span>6m31.733s</span></p>
<p class="p1"><span class="s1"> user<span class="Apple-tab-span">
</span>4m51.862s</span></p>
<p class="p1"><span class="s1"> sys<span class="Apple-tab-span">
</span>0m20.268s</span></p>
<p><br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px;">Make generation:<br>
</p>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px; background-color: rgb(255, 255, 255);"></span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px; background-color: rgb(255, 255, 255);"></span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px; background-color: rgb(255, 255, 255);"></span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px; background-color: rgb(255, 255, 255);"></span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px; background-color: rgb(255, 255, 255);"></span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 16px; background-color: rgb(255, 255, 255);"></span>
<p class="p1" style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 16px;">
<span class="s1"> real<span class="Apple-tab-span"> </span>4m45.089s</span></p>
<p class="p1" style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 16px;">
<span class="s1"> user<span class="Apple-tab-span"> </span>2m56.117s</span></p>
<p class="p1" style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 16px;">
<span class="s1"> sys<span class="Apple-tab-span"> </span>0m17.481s</span></p>
<p class="p1" style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 16px;">
<span class="s1"><br>
</span></p>
<p class="p1" style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 16px;">
<span class="s1">Ninja generation:</span></p>
<p class="p1"><span class="s1"> real<span class="Apple-tab-span">
</span>2m48.585s</span></p>
<p class="p1"><span class="s1"> user<span class="Apple-tab-span">
</span>2m30.712s</span></p>
<p class="p1"><span class="s1"> sys<span class="Apple-tab-span">
</span>0m6.313s</span></p>
<p class="p1" style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 16px;">
<span class="s1"><br>
</span></p>
<p><br>
</p>
<p>Xcode generation + build time:<br>
</p>
<p class="p1"><span class="s1"> real<span class="Apple-tab-span">
</span>64m3.238s</span></p>
<p class="p1"><span class="s1"> user<span class="Apple-tab-span">
</span>353m36.825s</span></p>
<p class="p1"><span class="s1"> sys<span class="Apple-tab-span">
</span>46m52.415s</span></p>
<p><br>
</p>
<p>Make generation + build time:</p>
<p class="p2"><span class="s1"> real<span class="Apple-tab-span">
</span>61m2.583s</span></p>
<p class="p2"><span class="s1"> user<span class="Apple-tab-span">
</span>358m7.464s</span></p>
<p class="p2"><span class="s1"> sys<span class="Apple-tab-span">
</span>47m21.512s</span></p>
<p><br>
</p>
<p>So it seems in our case, for Generation performance step, we
should use Ninja.<br>
</p>
</blockquote>
Ok, thanks for sharing it. This proves what I was thinking - there
is no difference in build time, but generate time is better for
Makefile. Probably you can profile CMake and find some bottlenecks.<br>
<br>
<blockquote cite="mid:1450693159551.19800@tomtom.com" type="cite">
<p>
</p>
<p><br>
</p>
<p>Best Regards<br>
</p>
<p>Bartosz<br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
color="#000000" face="Calibri, sans-serif"><b>From:</b>
Ruslan Baratov <a class="moz-txt-link-rfc2396E" href="mailto:ruslan_baratov@yahoo.com"><ruslan_baratov@yahoo.com></a><br>
<b>Sent:</b> Saturday, December 19, 2015 6:27 PM<br>
<b>To:</b> Bartosz Kosiorek<br>
<b>Cc:</b> Clinton Stimpson; Gregor Jasny; CMake Developers<br>
<b>Subject:</b> Re: [cmake-developers] Create subdirectories
in Resource directory for Frameworks and Application bundle.</font>
<div> </div>
</div>
<div>
<div class="moz-cite-prefix">On 18-Dec-15 22:46, Bartosz
Kosiorek wrote:<br>
</div>
<blockquote type="cite">
<style type="text/css" style="">
<!--
p
{margin-top:0px;
margin-bottom:0px}
@font-face
{font-family:Helvetica}
@font-face
{font-family:Calibri}
@font-face
{font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm 0cm 0.0001pt;
font-size:12pt;
font-family:'Times New Roman',serif;
color:black}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{margin:0cm 0cm 0.0001pt;
font-size:8pt;
font-family:Tahoma,sans-serif;
color:black}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{margin:0cm 0cm 0.0001pt 36pt;
font-size:12pt;
font-family:'Times New Roman',serif;
color:black}
span.EmailStyle20
{font-family:Calibri,sans-serif;
color:rgb(31,73,125)}
span.BalloonTextChar
{font-family:Tahoma,sans-serif;
color:black}
.MsoChpDefault
{font-size:10pt}
@page WordSection1
{margin:70.85pt}
ol
{margin-bottom:0cm}
ul
{margin-bottom:0cm}
-->
</style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:#1F497D" lang="EN-US">Thank you all for your
tips/advice.</span></p>
<p class="MsoNormal"><span style="text-indent:-18pt;
font-size:11pt; font-family:Calibri,sans-serif;
color:rgb(31,73,125)" lang="EN-US"><br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:#1F497D" lang="EN-US"></span><span
style="text-indent:-18pt; font-size:11pt;
font-family:Calibri,sans-serif; color:rgb(31,73,125)"
lang="EN-US">From our experience IDE generators (<span
class="SpellE">eg</span>. Visual Studio, Xcode) is
much slower than Make or Ninja. I will attach
benchmarks later.</span></p>
<p class="MsoNormal"><span style="text-indent:-18pt;
font-size:11pt; font-family:Calibri,sans-serif;
color:rgb(31,73,125)" lang="EN-US"><br>
</span></p>
<p class="MsoNormal">Unfortunately I'm unable to build
Universal libraries for x86 and arm architectures by
using Makefile.</p>
</div>
</blockquote>
This feature will work only for Xcode. For Makefile generator
variable/property IOS_INSTALL_COMBINED is ignored. Xcode and
Makefile differs in internals. Xcode can hold in build
directory all variants of library like Release/Debug +
Simulator/Device:<br>
<br>
Debug-iphoneos/libfoo.a # xcodebuild -sdk iphoneos -config
Debug<br>
Debug-iphonesimulator/libfoo.a # xcodebuild -sdk
iphonesimulator -config Debug<br>
Release-iphoneos/libfoo.a # xcodebuild -sdk iphoneos -config
Release<br>
Release-iphonesimulator/libfoo.a # xcodebuild -sdk
iphonesimulator -config Release<br>
<br>
Makefile holds only one variant so building both
Simulator/Device in one project is tricky. You can
build/install several libraries by Makefile and combine them
with lipo using some external script.<br>
<br>
<blockquote type="cite">
<div class="WordSection1">
<p class="MsoNormal">See attached logs.<br>
</p>
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal">It seems that two different
SDK's (iPhoneOS and iPhoneSimulator) needs to be used in
that case.<br>
</p>
<p class="MsoNormal">Do you know how it could be fixed?<br>
</p>
<p class="MsoNormal">Maybe I should add "CMAKE_OSX_SYSROOT
"iphoneos" support for other generators?<br>
</p>
<p class="MsoNormal">What do you think about that idea?<br>
</p>
<p class="MsoNormal" style=""><br
class="Apple-interchange-newline">
Thanks in advance<br>
</p>
<p class="MsoNormal" style="">Bartosz<br>
</p>
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal">PS<br>
</p>
<p class="MsoNormal">I'm attaching the script which I'm
using for testing purposes.<br>
</p>
<p class="MsoNormal">To reproduce it just run command
(from command line):<br>
</p>
<p class="MsoNormal"> cd builddir && cmake ..
&& cmake --build .<br>
</p>
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal"><span style="font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:#1F497D" lang="EN-US"> </span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt;
padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><a moz-do-not-send="true"
name="_MailOriginal"><b><span
style="font-size:10.0pt;
font-family:"Tahoma","sans-serif";
color:windowtext" lang="EN-US">From:</span></b></a><span
style=""><span style="font-size:10.0pt;
font-family:"Tahoma","sans-serif";
color:windowtext" lang="EN-US">
<span class="SpellE">Ruslan</span> <span
class="SpellE">Baratov</span> [<a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="mailto:ruslan_baratov@yahoo.com"><a class="moz-txt-link-freetext" href="mailto:ruslan_baratov@yahoo.com">mailto:ruslan_baratov@yahoo.com</a></a>]
<br>
<b>Sent:</b> Saturday, December 12, 2015 6:49 AM<br>
<b>To:</b> Bartosz Kosiorek<br>
<b>Cc:</b> Clinton Stimpson; Gregor Jasny; CMake
Developers<br>
<b>Subject:</b> Re: [cmake-developers] Create
subdirectories in Resource directory for
Frameworks and Application bundle.</span></span></p>
</div>
</div>
<p class="MsoNormal"><span style=""> </span></p>
<div>
<p class="MsoNormal"><span style=""><span style="">On
12-Dec-15 10:08, Bartosz Kosiorek wrote:</span></span></p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p><span style="">Thanks Ruslan.</span></p>
<p><span style=""> </span></p>
<p><span style="">I would like to create instruction
which is universal for all generators.</span></p>
</blockquote>
<p class="MsoNormal"><span style=""><span style="">I think
it's not possible. E.g. IOS_INSTALL_COMBINED will
work only for Xcode.<br>
<br style="">
<br style="">
</span></span></p>
<p><span style="">Currently we would like to support both
Make/Ninja and Xcode generators,</span></p>
<p class="MsoNormal"><span style=""><span style="">...<br>
<br style="">
<br style="">
</span></span></p>
<p><span style="">because Make is much faster than Xcode
generator, and we are using it in our CI system.</span></p>
<p class="MsoNormal"><span style=""><span style="">Do you
mean generate step or build? I've used to compile
quite big projects like OpenCV with Xcode and
according to the `top` it uses all my cores with
clang++ at 100% CPU time.<br>
Can you show any benchmarks? Also note that Xcode
can add some additional stuff, like dSYM:
</span></span><a moz-do-not-send="true"
href="https://github.com/headupinclouds/gatherer/pull/69"><span
style=""><span style="">https://github.com/headupinclouds/gatherer/pull/69</span></span><span
style=""></span></a><span style=""><span style=""><br>
<br style="">
<br style="">
</span></span></p>
<p><span style="">Make is also common for other
architectures (Linux, QNX, Android etc.)</span></p>
<p><span style=""> </span></p>
<p><span style="">Unfortunately</span></p>
<p><span style=""><span class="pl-c1"><span
style="font-family:"Calibri","sans-serif";
color:#212121; background:white"> set</span></span></span><span
style=""><span
style="font-family:"Calibri","sans-serif";
color:#212121; background:white">(CMAKE_OSX_SYSROOT <span
class="pl-s">"iphoneos"</span>)</span></span></p>
<p><span style="">is not working for me.</span></p>
<p><span style="">It displays error:</span></p>
<p><span style=""> </span></p>
<div>
<p class="MsoNormal"><span style=""><span style=""> /Users/warsaw/Perforce/cmake-dev/cmake-build/bin/cmake
.. &&
/Users/warsaw/Perforce/cmake-dev/cmake-build/bin/cmake
--build .</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style=""> --
Configuring done</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style=""> --
Generating done</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style=""> --
Build files have been written to:
/Users/warsaw/Perforce/cmake_ios_framework_with_resource2/builddir</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style=""> [
14%] Building C object
shared_empty/heymath/CMakeFiles/heymath.dir/add.c.o</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style=""> clang:
warning: no such sysroot directory: 'iphoneos'</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style="">...</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style="">Do
you have some tip for that?</span></span></p>
</div>
<p class="MsoNormal"><span style=""><span style="">Yes,
this hint was for Xcode generator.<br>
<br style="">
<br style="">
</span></span></p>
<div>
<p class="MsoNormal"><span style=""><span style=""> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style=""> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style="">After
removing "-isysroot ${CMAKE_OSX_SYSROOT}"
everything works perfectly. Thanks</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style=""> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style="">Unfortunately CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET
is not working with Make.</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style="">Is it
possible to introduce CMAKE_IOS_DEPLOYMENT_TARGET,
as we already have CMAKE_OSX_DEPLOYMENT_TARGET?</span></span></p>
</div>
<p class="MsoNormal"><span style=""><span style="">Since
OSX_ARCHITECTURES controls iOS architectures too I
think request should sounds like "Extend
OSX_DEPLOYMENT_TARGET property for iOS platform".<br>
<br style="">
<br style="">
</span></span></p>
<div>
<p class="MsoNormal"><span style=""><span style=""><br>
I have attached my example script which I'm using.</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style="">
Could you please modify it to be better (and
still support other generators)?</span></span></p>
</div>
<p class="MsoNormal"><span style=""><span style="">I don't
know how to use iOS target with Makefile generator.<br>
<br>
Some notes about project you've sent:<br>
* You need to add instructions to codesign your
bundle<br>
* Instead of hardcoding `set(CMAKE_OSX_SYSROOT
"/Applications/Xcode.app/.../iPhoneSimulator.sdk")`
you can run `xcode-select -print-path` to detect
location of default Xcode version<br>
* Should be `set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
-mios-version-min=8.0")` instead of
`set(CMAKE_CXX_FLAGS "-mios-version-min=8.0")`
otherwise some flags may be lost<br>
<br>
Ruslan<br style="">
<br style="">
</span></span></p>
<div>
<p class="MsoNormal"><span style=""><span style=""> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style="">Best
Regards</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style="">Bartosz </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span style=""> </span></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style=""><span style=""> </span></span></p>
</div>
<p><span style=""> </span></p>
<p><span style=""> </span></p>
<div>
<div class="MsoNormal" style="text-align:center"
align="center"><span style=""><span
style="color:#212121">
<hr align="center" size="3" width="98%">
</span></span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal" style=""><span style=""><b><span
style="font-size:11.0pt;
font-family:"Calibri","sans-serif"">From:</span></b></span><span
style=""><span style="font-size:11.0pt;
font-family:"Calibri","sans-serif"">
Ruslan Baratov
</span></span><a moz-do-not-send="true"
href="mailto:ruslan_baratov@yahoo.com"><span
style=""><span style="font-size:11.0pt;
font-family:"Calibri","sans-serif""><ruslan_baratov@yahoo.com></span></span><span
style=""></span></a><span style=""><span
style="font-size:11.0pt;
font-family:"Calibri","sans-serif""><br>
<b>Sent:</b> Saturday, December 12, 2015 1:58 AM<br>
<b>To:</b> Bartosz Kosiorek<br>
<b>Cc:</b> </span></span><a
moz-do-not-send="true"
href="mailto:clinton@elemtech.com"><span style=""><span
style="font-size:11.0pt;
font-family:"Calibri","sans-serif""><a class="moz-txt-link-abbreviated" href="mailto:clinton@elemtech.com">clinton@elemtech.com</a></span></span><span
style=""></span></a><span style=""><span
style="font-size:11.0pt;
font-family:"Calibri","sans-serif"">;
Gregor Jasny; CMake Developers<br>
<b>Subject:</b> Re: [cmake-developers] Create
subdirectories in Resource directory for
Frameworks and Application bundle.</span></span><span
style=""><span style="color:#212121">
</span></span></p>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121"> </span></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121">On 12-Dec-15 03:46,
Bartosz Kosiorek wrote:</span></span></p>
</div>
<blockquote style="margin-top:5.0pt;
margin-bottom:5.0pt">
<p><span style=""><span style="color:#212121">Hi</span></span></p>
<p><span style=""><span style="color:#212121">To
enable iOS build, I'm using following settings
in CMakeLists.txt:</span></span></p>
<p><span style=""><span style="color:#212121"> </span></span></p>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121">set(APPLE_PLATFORM
"iphonesimulator")</span></span></p>
</div>
</blockquote>
<p class="MsoNormal"><span style=""><span
style="color:#212121">I think this one not
needed. Can't find any place where it parsed.<br>
<br style="">
<br style="">
</span></span></p>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121">set(CMAKE_OSX_SYSROOT
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk")</span></span></p>
</div>
<p class="MsoNormal"><span style=""><span
class="pl-c1"><span style="color:#212121">Can be
set to:</span></span></span><span style=""><span
style="color:#212121"></span></span></p>
<p class="MsoNormal"><span style=""><span
class="pl-c1"><span style="color:#212121">set</span></span></span><span
style=""><span style="color:#212121">(CMAKE_OSX_SYSROOT
<span class="pl-s">"iphoneos"</span>)</span></span></p>
<p class="MsoNormal"><span style=""><span
style="color:#212121">in this case will support
both simulator and device<br>
<br style="">
<br style="">
</span></span></p>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121">set(CMAKE_C_FLAGS
"-isysroot ${CMAKE_OSX_SYSROOT}
-mios-version-min=7.0")</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121">set(CMAKE_CXX_FLAGS
"-isysroot ${CMAKE_OSX_SYSROOT}
-mios-version-min=7.0")</span></span></p>
</div>
<p class="MsoNormal"><span style=""><span
style="color:#212121">You can set minimum
version by
</span></span><span style=""><span
style="font-family:"Calibri","sans-serif";
color:#212121; background:white">CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET </span></span><span
style=""><span style="color:#212121">variable.<br>
In case of `CMAKE_OSX_SYSROOT` variable is set
to `iphoneos` option `-isysroot` is redundant.<br>
<br style="">
<br style="">
</span></span></p>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121"> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121">Do you think it should
be documented?</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121"> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121">Where is the good place
to do so?</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121">Maybe somewhere here:</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""></span><a
moz-do-not-send="true"
href="https://cmake.org/cmake/help/v3.4/variable/CMAKE_OSX_SYSROOT.html"><span
style=""><span style=""></span></span></a><a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://cmake.org/cmake/help/v3.4/variable/CMAKE_OSX_SYSROOT.html"><a class="moz-txt-link-freetext" href="https://cmake.org/cmake/help/v3.4/variable/CMAKE_OSX_SYSROOT.html">https://cmake.org/cmake/help/v3.4/variable/CMAKE_OSX_SYSROOT.html</a></a><span
style=""></span><span style=""><span
style="color:#212121"></span></span></p>
</div>
<p><span style=""><span style="color:#212121"> </span></span></p>
<p><span style=""><span style="color:#212121">What do
you think?</span></span></p>
<p><span style=""><span style="color:#212121"></span></span></p>
<p><span style=""><span style="color:#212121"> </span></span></p>
<div>
<div class="MsoNormal" style="text-align:center"
align="center"><span style=""><span
style="color:#212121">
<hr align="center" size="3" width="98%">
</span></span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal" style=""><span style=""><b><span
style="font-size:11.0pt;
font-family:"Calibri","sans-serif"">From:</span></b></span><span
style=""><span style="font-size:11.0pt;
font-family:"Calibri","sans-serif"">
</span></span><a moz-do-not-send="true"
href="mailto:clinton@elemtech.com"><span
style=""><span style="font-size:11.0pt;
font-family:"Calibri","sans-serif"">clinton@elemtech.com</span></span><span
style=""></span></a><span style=""><span
style="font-size:11.0pt;
font-family:"Calibri","sans-serif"">
</span></span><a moz-do-not-send="true"
href="mailto:clinton@elemtech.com"><span
style=""><span style="font-size:11.0pt;
font-family:"Calibri","sans-serif""><clinton@elemtech.com></span></span><span
style=""></span></a><span style=""><span
style="font-size:11.0pt;
font-family:"Calibri","sans-serif""><br>
<b>Sent:</b> Friday, December 11, 2015 8:21
PM<br>
<b>To:</b> Bartosz Kosiorek<br>
<b>Cc:</b> Bartosz Kosiorek;
cmake-developers; Gregor Jasny<br>
<b>Subject:</b> Re: [cmake-developers]
Create subdirectories in Resource directory
for Frameworks and Application bundle.</span></span><span
style=""><span style="color:#212121">
</span></span></p>
<div>
<p class="MsoNormal"><span style=""><span
style="color:#212121"> </span></span></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif""> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif""> </span></span></p>
</div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif"">-----
On Dec 11, 2015, at 11:44 AM, Bartosz
Kosiorek
</span></span><a moz-do-not-send="true"
href="mailto:gang65@poczta.onet.pl"><span
style=""><span
style="font-family:"Arial","sans-serif""><gang65@poczta.onet.pl></span></span><span
style=""></span></a><span style=""><span
style="font-family:"Arial","sans-serif"">
wrote:<br style="">
<br style="">
</span></span></p>
<div>
<blockquote style="border:none;
border-left:solid #1010FF 1.5pt; padding:0cm
0cm 0cm 4.0pt; margin-left:3.75pt;
margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"
style="margin-bottom:12.0pt"><span style=""><span
style="font-family:"Helvetica","sans-serif"">Hi</span></span></p>
</div>
<p class="MsoNormal"><span
style=""><span
style="font-family:"Helvetica","sans-serif"">Because
there is
difference
between OS X and
iOS Bundles
directory
structure (see:
Apple
specification<br>
</span></span><a
moz-do-not-send="true"
href="https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html"
target="_blank"><span
style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html"><a class="moz-txt-link-freetext" href="https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html">https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html</a></a><span
style=""></span><span
style=""><span
style="font-family:"Helvetica","sans-serif"">),
<br>
in trunk (In
CMake 3.5)
RESOURCE
property create
corresponding
directory
structure.</span></span></p>
</div>
<p class="MsoNormal"><span
style=""><span
style="font-family:"Helvetica","sans-serif"">I
have already fix
that with:<br>
</span></span><a
moz-do-not-send="true"
href="https://public.kitware.com/Bug/view.php?id=15848" target="_blank"><span
style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://public.kitware.com/Bug/view.php?id=15848"><a class="moz-txt-link-freetext" href="https://public.kitware.com/Bug/view.php?id=15848">https://public.kitware.com/Bug/view.php?id=15848</a></a><span
style=""></span><span
style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif"">Ok.
I hadn't been following all your
work.</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif"">Also,
I didn't see a toggle in the CMake
code you sent to choose an iOS bundle
instead of OS X bundles. How is that
toggled?</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif""> </span></span></p>
</div>
<blockquote style="border:none;
border-left:solid #1010FF 1.5pt; padding:0cm
0cm 0cm 4.0pt; margin-left:3.75pt;
margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span
style=""><span
style="font-family:"Helvetica","sans-serif"">So
RESOURCE gives you a
level of
abstraction:</span></span></p>
</div>
<p class="MsoNormal"><span
style=""><span
style="font-family:"Helvetica","sans-serif"">For
OSX:</span></span></p>
</div>
<p class="MsoNormal"
style="margin-bottom:12.0pt"><span
style=""><span
style="font-family:"Helvetica","sans-serif"">it
will create "Resource"
directory</span></span></p>
</div>
<p class="MsoNormal"
style="margin-bottom:12.0pt"><span
style=""><span
style="font-family:"Helvetica","sans-serif"">For
iOS it will create "flat"
directory structure.</span></span></p>
</div>
<p class="MsoNormal"><span
style=""><span
style="font-family:"Helvetica","sans-serif"">In
your example "Resource"
directory will be created in
both cases (for OSX and
iOS).</span></span></p>
</div>
<p class="MsoNormal"
style="margin-bottom:12.0pt"><span
style=""><span
style="font-family:"Helvetica","sans-serif"">Which
is wrong:
<br>
For OSX: it should create
"Resource" directory<br>
For iOS it will create "flat"
directory structure.</span></span></p>
</div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif"">I could
provide patch to fix that issue,
if you agree with that.</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif"">What do
you think about that?</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif"">Do you
think the same should be applied
to "Headers"?</span></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif""> </span></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif"">I think
the abstraction seems reasonable, as
well as what you are proposing.
However, I'm not an Apple guru.</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif"">I wonder if
there are other Apple experts that
can weigh in this if better feedback
is needed.</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif""> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Arial","sans-serif"">Clint</span></span></p>
</div>
</div>
<blockquote style="border:none;
border-left:solid #1010FF 1.5pt; padding:0cm
0cm 0cm 4.0pt; margin-left:3.75pt;
margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif""> </span></span></p>
</div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif""><br>
Best Regards</span></span></p>
</div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif"">Bartosz
</span></span></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span
style=""><span
style="font-family:"Helvetica","sans-serif""> </span></span></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span
style=""><span
style="font-family:"Helvetica","sans-serif""> </span></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif""> </span></span></p>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif"">2015-12-11
19:06 GMT+01:00 Clinton Stimpson
<</span></span><a
moz-do-not-send="true"
href="mailto:clinton@elemtech.com"
target="_blank"><span style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:clinton@elemtech.com"><a class="moz-txt-link-abbreviated" href="mailto:clinton@elemtech.com">clinton@elemtech.com</a></a><span
style=""></span><span style=""><span
style="font-family:"Helvetica","sans-serif"">>:</span></span></p>
<div>
<div>
<p class="MsoNormal"
style="margin-bottom:12.0pt"><span
style=""><span
style="font-family:"Helvetica","sans-serif""><br>
<br>
On Friday, December 11, 2015
05:01:41 PM Bartosz Kosiorek
wrote:<br>
> Thanks Clint<br>
><br>
> Unfortunately
MACOSX_PACKAGE_LOCATION is not
working correctly with
RESOURCE<br>
> property. For every
resource which is marked as
RESOURCE, will be placed in<br>
> root "Resources"
directory.<br>
><br>
> The CMake code below
create following directory
structure for OS X:<br>
><br>
> ── mul.framework<br>
> ├── Headers ->
Versions/Current/Headers<br>
> ├── Resources ->
Versions/Current/Resources<br>
> ├── Versions<br>
> │ ├── A<br>
> │ │ ├── Headers<br>
> │ │ │ └── mul.h<br>
> │ │ ├── Modules<br>
> │ │ │ └──
module.modulemap<br>
> │ │ ├── Resources<br>
> │ │ │ ├──
Info.plist<br>
> │ │ │ ├──
mulres.txt<br>
> │ │ │ ├──
pl.txt<br>
> │ │ │ └──
resourcefile.txt<br>
> │ │ ├── lang<br>
> │ │ │ └──
en.txt<br>
> │ │ └── mul<br>
> │ └── Current ->
A<br>
> └── mul ->
Versions/Current/mul<br>
><br>
><br>
> As you can see eveything
which is marked as "RESOURCE"
will be placed in<br>
> Versions/A/ directory My
expectation will be that
lang/pl.txt and<br>
> lang/en.txt should be in
Resources/lang/ directory.
Here is complete<br>
> directory structure:<br>
><br>
> ── mul.framework<br>
> ├── Headers ->
Versions/Current/Headers<br>
> ├── Resources ->
Versions/Current/Resources<br>
> ├── Versions<br>
> │ ├── A<br>
> │ │ ├── Headers<br>
> │ │ │ └── mul.h<br>
> │ │ ├── Modules<br>
> │ │ │ └──
module.modulemap<br>
> │ │ ├── Resources<br>
> │ │ │ ├──
Info.plist<br>
> │ │ │ ├──
mulres.txt<br>
> │ │ │ ├── lang<br>
> │ │ │ │ └──
pl.txt<br>
> │ │ │ │ └──
en.txt<br>
> │ │ │ └──
resourcefile.txt<br>
> │ │ ├── lang<br>
> │ │ │ └──
en.txt<br>
> │ │ └── mul<br>
> │ └── Current ->
A<br>
> └── mul ->
Versions/Current/mul<br>
><br>
><br>
> What do you think about
that?<br>
><br>
> Here is the source code:<br>
><br>
> set_property(SOURCE
module.modulemap<br>
> PROPERTY
MACOSX_PACKAGE_LOCATION
"Modules")<br>
><br>
> set_property(<br>
> SOURCE lang/en.txt
lang/pl.txt<br>
> PROPERTY
MACOSX_PACKAGE_LOCATION
"lang")<br>
><br>
> set(RESLIST<br>
> mulres.txt<br>
> lang/pl.txt<br>
> resourcefile.txt<br>
> )<br>
><br>
> add_library(mul SHARED<br>
> mul.c<br>
> mul.h<br>
>
module.modulemap<br>
> lang/pl.txt<br>
> lang/en.txt<br>
>
resourcefile.txt<br>
> mulres.txt)<br>
><br>
> # Create an iOS Framework
bundle<br>
> set_target_properties(mul
PROPERTIES<br>
> FRAMEWORK TRUE<br>
>
MACOSX_FRAMEWORK_IDENTIFIER
org.cmake.mul<br>
>
MACOSX_FRAMEWORK_SHORT_VERSION_STRING
42<br>
>
MACOSX_FRAMEWORK_BUNDLE_VERSION
3.2.10<br>
>
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY
"iPhone Developer"<br>
> PUBLIC_HEADER mul.h<br>
> RESOURCE "${RESLIST}"<br>
> )<br style="">
<br style="">
</span></span></p>
</div>
</div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif"">Here is
a CMakeLists.txt that will give
you the desired layout.<br>
I also see that
MACOSX_PACKAGE_LOCATION doesn't
work with RESOURCE.<br>
<br>
<br>
set_property(SOURCE
module.modulemap<br>
PROPERTY MACOSX_PACKAGE_LOCATION
"Modules")<br>
<br>
set_property(<br>
SOURCE lang/pl.txt lang/en.txt<br>
PROPERTY MACOSX_PACKAGE_LOCATION
"Resources/lang")<br>
<br>
set(RESLIST<br>
mulres.txt<br>
resourcefile.txt<br>
)<br>
<br>
add_library(mul SHARED<br>
mul.c<br>
mul.h<br>
module.modulemap<br>
lang/pl.txt<br>
lang/en.txt<br>
resourcefile.txt<br>
mulres.txt)<br>
<br>
# Create an iOS Framework bundle<br>
set_target_properties(mul
PROPERTIES<br>
FRAMEWORK TRUE<br>
MACOSX_FRAMEWORK_IDENTIFIER
org.cmake.mul<br>
MACOSX_FRAMEWORK_SHORT_VERSION_STRING
42<br>
MACOSX_FRAMEWORK_BUNDLE_VERSION
3.2.10<br>
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY
"iPhone Developer"<br>
PUBLIC_HEADER mul.h<br>
RESOURCE "${RESLIST}"<br>
)<br>
<br>
<br>
Now I'm wondering what does the
RESOURCE target property do that<br>
MACOSX_PACKAGE_LOCATION doesn't
already support?</span></span></p>
<div>
<div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif""><br>
Clint<br>
--<br>
<br>
Powered by </span></span><a
moz-do-not-send="true"
href="http://www.kitware.com"
target="_blank"><span style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="http://www.kitware.com"><a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a></a><span
style=""></span><span style=""><span
style="font-family:"Helvetica","sans-serif""><br>
<br>
Please keep messages on-topic
and check the CMake FAQ at: </span></span><a
moz-do-not-send="true"
href="http://www.cmake.org/Wiki/CMake_FAQ"><span
style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.cmake.org/Wiki/CMake_FAQ"><a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a></a><span
style=""></span><span style=""><span
style="font-family:"Helvetica","sans-serif""><br>
<br>
Kitware offers various
services to support the CMake
community. For more
information on each offering,
please visit:<br>
<br>
CMake Support: </span></span><a
moz-do-not-send="true"
href="http://cmake.org/cmake/help/support.html"><span
style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://cmake.org/cmake/help/support.html"><a class="moz-txt-link-freetext" href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a></a><span
style=""></span><span style=""><span
style="font-family:"Helvetica","sans-serif""><br>
CMake Consulting: </span></span><a
moz-do-not-send="true"
href="http://cmake.org/cmake/help/consulting.html"><span
style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://cmake.org/cmake/help/consulting.html"><a class="moz-txt-link-freetext" href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a></a><span
style=""></span><span style=""><span
style="font-family:"Helvetica","sans-serif""><br>
CMake Training Courses: </span></span><a
moz-do-not-send="true"
href="http://cmake.org/cmake/help/training.html"><span
style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://cmake.org/cmake/help/training.html"><a class="moz-txt-link-freetext" href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a></a><span
style=""></span><span style=""><span
style="font-family:"Helvetica","sans-serif""><br>
<br>
Visit other Kitware
open-source projects at </span></span><a
moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"><span
style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.kitware.com/opensource/opensource.html"><a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></a><span
style=""></span><span style=""><span
style="font-family:"Helvetica","sans-serif""><br>
<br>
Follow this link to
subscribe/unsubscribe:<br>
</span></span><a
moz-do-not-send="true"
href="http://public.kitware.com/mailman/listinfo/cmake-developers"
target="_blank"><span style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></a><a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://public.kitware.com/mailman/listinfo/cmake-developers"><a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/cmake-developers">http://public.kitware.com/mailman/listinfo/cmake-developers</a></a><span
style=""></span><span style=""><span
style="font-family:"Helvetica","sans-serif""></span></span></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span style=""><span
style="font-family:"Helvetica","sans-serif""> </span></span></p>
</blockquote>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span style=""><span
style="color:#212121"><br style="">
<br style="">
</span></span></p>
<p class="MsoNormal"><span style=""><span
style="color:#212121"> </span></span></p>
</div>
</div>
<span style=""></span>
<p class="MsoNormal"><span style=""> </span></p>
</div>
</blockquote>
<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>