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

Ruslan Baratov ruslan_baratov at yahoo.com
Fri Aug 7 06:40:02 EDT 2015


On 07-Aug-15 11:31, Gregor Jasny wrote:
> Hi,
>
> On 07/08/15 00:43, Ruslan Baratov via cmake-developers wrote:
>> Hi,
>>
>> I'm thinking about fixing bug
>> http://public.kitware.com/Bug/view.php?id=12506 and before I go deeper
>> in CMake internals just want to ask is there any work-in-progress
>> attempts already or hints/directions of how it can be done?
>
> I started to look into this and as far as I remember built a PoC for 
> the case where you do not build Simulator and non-Simulator within the 
> same Xcode project. But I never found the time to write down a summary 
> of that complicated topic.
>
> Currently I work around by calling from my build script:
> "${CMAKE}" -DBUILD_TYPE=${CONFIG} -P "${BUILD_DIR}/cmake_install.cmake"
>
> I will try to attach something to the bug report within the next days.
>
> Thanks,
> Gregor

Hi,

I've tried it with simple example and have an error:

 > rm -rf _builds
 > cmake -H. -B_builds -GXcode -DCMAKE_INSTALL_PREFIX="`pwd`/_install"
 > cmake -DBUILD_TYPE=Debug -P _builds/cmake_install.cmake
-- Install configuration: "Debug"
CMake Error at _builds/cmake_install.cmake:32 (file):
   file INSTALL cannot find
   "/.../_builds/Debug$(EFFECTIVE_PLATFORM_NAME)/libfoo.a".

Executable runs fine on device. Library builds fine too but install step 
fail. See CMakeLists.txt in attachment.

What generator and toolchain are you using?

Ruslo
-------------- next part --------------
cmake_minimum_required(VERSION 3.0)
project(Foo)

set(CMAKE_OSX_SYSROOT "iphoneos")
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")

set(CMAKE_MACOSX_BUNDLE YES)
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")

set(MACOSX_BUNDLE_GUI_IDENTIFIER com.example)

add_executable(foo_exe foo.cpp)
add_library(foo foo.cpp)

install(TARGETS foo DESTINATION lib)


More information about the cmake-developers mailing list