[cmake-developers] Fixing bug #12506 (iOS install)

Ruslan Baratov ruslan_baratov at yahoo.com
Thu Aug 13 06:56:46 EDT 2015


On 13-Aug-15 08:46, Gregor Jasny wrote:
> Hi,
>
> On 13/08/15 01:44, Ruslan Baratov via cmake-developers wrote:
>> Sending patches with fix. Now it's possible to install simulator
>> libraries by:
>>
>>  > cmake --build _builds --config Release --target install -- -sdk
>> iphonesimulator
>>
>> and device libraries by:
>>
>>  > cmake --build _builds --config Release --target install -- -sdk 
>> iphoneos
>>
>> or from Xcode IDE (build target install).
>>
>> However this commands will install both libraries to the same location.
>> This behaviour can be improved by adding some code that will do lipo of
>> all libraries before install (i.e. universal libraries will be
>> installed). This can be achieved by using ONLY_ACTIVE_ARCHS=NO while
>> running Xcode build. The only question is about making install target
>> depends on two type of builds (-sdk iphonesimulator and -sdk iphoneos).
>
> This was my preliminary work:
>> https://github.com/gjasny/CMake/commit/978dca25ac387bdec894a1ba2c934317f5f6169f 
>>
>
This looks great! I've spent several hours trying to figure out how 
'$(EFFECTIVE_PLATFORM_NAME)' can be set to Xcode and some CMake friendly 
string to cmake_install.cmake script. I didn't know Xcode understand 
`${VAR}` syntax (probably it didn't, it's just expanded as an 
environment variable). I've tested your fix and it works fine for me. 
Since we don't need to replace string with path manually I think your 
solution is neater. I've added description to commit and rebased it, see 
attachment.

Thanks, Ruslo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-installation-of-iOS-targets.patch
Type: text/x-patch
Size: 2361 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150813/0dd69de3/attachment-0001.bin>


More information about the cmake-developers mailing list