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

2015-08-27 Thread Ruslan Baratov via cmake-developers

On 26-Aug-15 22:53, Gregor Jasny wrote:

Hallo,

On 13/08/15 12:56, Ruslan Baratov wrote:

On 13-Aug-15 08:46, Gregor Jasny wrote:

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.

I just pushed the fix-ios-install topic including a test. Basically the
patch changes the invocation line of the script from

cmake -DBUILD_TYPE=Release-iphoneos -P cmake_install.cmake

to

cmake -DBUILD_TYPE=Release -DEFFECTIVE_PLATFORM_NAME=-iphoneos -P
cmake_install.cmake

and within the install script

file(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/lib TYPE
STATIC_LIBRARY FILES .../Release/libfoo.a)


to

file(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/lib TYPE
STATIC_LIBRARY FILES .../Release${EFFECTIVE_PLATFORM_NAME}/libfoo.a)


By keeping the ${EFFECTIVE_PLATFORM_NAME} a variable one is able to use
the same install script for iphoneos and iphonesimulator SDKs.

Please review and merge.

Thanks,
Gregor

Works fine for me with rebased version. Though some tests failed:

The following tests FAILED:
   14 - kwsys.testDynamicLoader (Failed)
  372 - RunCMake.FindPkgConfig (Failed)
  392 - FindPackageModeMakefileTest (Failed)

I've tried version without patches (81ad562) and see this failures too, 
so I guess it's not because of iOS fixes.


From my experience changes expected to be in format of `git 
format-patch` command, so attaching them.


Thanks, Ruslo
From daa92aa633809c196380ef544b8a193cfcd15d27 Mon Sep 17 00:00:00 2001
From: Gregor Jasny gja...@googlemail.com
Date: Thu, 20 Aug 2015 22:29:49 +0200
Subject: [PATCH 1/3] Replace CMAKE_XCODE_EFFECTIVE_PLATFORMS with call to
 PlatformIsAppleIos

Currently the CMAKE_XCODE_EFFECTIVE_PLATFORMS property acts only as
a kind of toggle switch to enable iOS project layout features.
But instead of relying on this undocumented property, better detect
the presence of an iOS SDK directly.
---
 Source/cmTarget.cxx| 5 ++---
 Tests/RunCMake/XcodeProject/XcodeBundles.cmake | 1 -
 Tests/iOSNavApp/CMakeLists.txt | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 49b3239..da314a6 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3566,10 +3566,9 @@ bool cmTarget::ComputeOutputDir(const std::string config,
   // The generator may add the configuration's subdirectory.
   if(!conf.empty())
 {
-const char *platforms = this-Makefile-GetDefinition(
-  CMAKE_XCODE_EFFECTIVE_PLATFORMS);
+bool iosPlatform = this-Makefile-PlatformIsAppleIos();
 std::string suffix =
-  usesDefaultOutputDir  platforms ? $(EFFECTIVE_PLATFORM_NAME) : ;
+  usesDefaultOutputDir  iosPlatform ? $(EFFECTIVE_PLATFORM_NAME) : ;
 this-Makefile-GetGlobalGenerator()-
   AppendDirectoryForConfig(/, conf, suffix, out);
 }
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
index d5cb51f..2cbccfa 100644
--- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
@@ -6,7 +6,6 @@ enable_language(C)
 if(TEST_IOS)
   set(CMAKE_OSX_SYSROOT iphoneos)
   set(CMAKE_OSX_ARCHITECTURES armv7)
-  set(CMAKE_XCODE_EFFECTIVE_PLATFORMS -iphoneos;-iphonesimulator)
   set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
   set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE NO)
 endif(TEST_IOS)
diff --git a/Tests/iOSNavApp/CMakeLists.txt b/Tests/iOSNavApp/CMakeLists.txt
index 12c3ada..1fc33e0 100644
--- a/Tests/iOSNavApp/CMakeLists.txt
+++ b/Tests/iOSNavApp/CMakeLists.txt
@@ -3,7 +3,6 @@ project(NavApp3)
 
 set(CMAKE_OSX_SYSROOT iphoneos4.3)
 set(CMAKE_OSX_ARCHITECTURES 

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

2015-08-26 Thread Gregor Jasny via cmake-developers
Hallo,

On 13/08/15 12:56, Ruslan Baratov wrote:
 On 13-Aug-15 08:46, Gregor Jasny wrote:
 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.

I just pushed the fix-ios-install topic including a test. Basically the
patch changes the invocation line of the script from

cmake -DBUILD_TYPE=Release-iphoneos -P cmake_install.cmake

to

cmake -DBUILD_TYPE=Release -DEFFECTIVE_PLATFORM_NAME=-iphoneos -P
cmake_install.cmake

and within the install script

file(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/lib TYPE
STATIC_LIBRARY FILES .../Release/libfoo.a)


to

file(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/lib TYPE
STATIC_LIBRARY FILES .../Release${EFFECTIVE_PLATFORM_NAME}/libfoo.a)


By keeping the ${EFFECTIVE_PLATFORM_NAME} a variable one is able to use
the same install script for iphoneos and iphonesimulator SDKs.

Please review and merge.

Thanks,
Gregor
-- 

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


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

2015-08-15 Thread Gregor Jasny via cmake-developers
On 15/08/15 21:00, Gregor Jasny wrote:
 On 13/08/15 12:56, Ruslan Baratov wrote:
 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.
 
 I start working on a unit test for this now.

I have a first test here:
https://github.com/gjasny/CMake/commit/dcfc8f6f637ffdebe0e7f71ba2768c2acd0811eb

Will add some more during the next days.

-- 

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


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

2015-08-15 Thread Gregor Jasny via cmake-developers
On 13/08/15 12:56, Ruslan Baratov wrote:
 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.

I start working on a unit test for this now.
-- 

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


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

2015-08-13 Thread Ruslan Baratov via cmake-developers

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
From a85eaddb5d1df693606a3c86b754d01a0efcb4e7 Mon Sep 17 00:00:00 2001
From: Gregor Jasny gja...@googlemail.com
Date: Thu, 13 Aug 2015 13:03:02 +0300
Subject: [PATCH] Fix installation of iOS targets

Since cmTarget::ComputeOutputDir results can be used in CMake code of script
cmake_install.cmake and in Xcode internals, string ${EFFECTIVE_PLATFORM_NAME}
should be used instead of $(EFFECTIVE_PLATFORM_NAME) because it works for both.

Value of CMAKE_CFG_INTDIR can't be used in BUILD_TYPE argument of install
command since it contains $(EFFECTIVE_PLATFORM_NAME) (e.g. equals to
`Release-iphoneos`, `Debug-iphoneos`, etc.).

Fix bug: http://public.kitware.com/Bug/view.php?id=12506
---
 Source/cmGlobalGenerator.cxx | 13 -
 Source/cmTarget.cxx  |  2 +-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index cda26cd..933839c 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2472,7 +2472,18 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
 if ( cmakeCfgIntDir  *cmakeCfgIntDir  cmakeCfgIntDir[0] != '.' )
   {
   std::string cfgArg = -DBUILD_TYPE=;
-  cfgArg += mf-GetDefinition(CMAKE_CFG_INTDIR);
+  const char *platforms =
+mf-GetDefinition(CMAKE_XCODE_EFFECTIVE_PLATFORMS);
+  if(platforms)
+{
+cfgArg += $(CONFIGURATION);
+singleLine.push_back(cfgArg);
+cfgArg = -DEFFECTIVE_PLATFORM_NAME=$(EFFECTIVE_PLATFORM_NAME);
+}
+  else
+{
+cfgArg += mf-GetDefinition(CMAKE_CFG_INTDIR);
+}
   singleLine.push_back(cfgArg);
   }
 singleLine.push_back(-P);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 316d85c..3ac9e8e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3536,7 +3536,7 @@ bool cmTarget::ComputeOutputDir(const std::string config,
 const char *platforms = this-Makefile-GetDefinition(
   CMAKE_XCODE_EFFECTIVE_PLATFORMS);
 std::string suffix =
-  usesDefaultOutputDir  platforms ? $(EFFECTIVE_PLATFORM_NAME) : ;
+  usesDefaultOutputDir  platforms ? ${EFFECTIVE_PLATFORM_NAME} : ;
 this-Makefile-GetGlobalGenerator()-
   AppendDirectoryForConfig(/, conf, suffix, out);
 }
-- 
2.4.5

-- 

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

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

2015-08-12 Thread Ruslan Baratov via cmake-developers

On 07-Aug-15 01: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?


Thanks, Ruslo


Hi,

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).


Ruslo
From 17aec9b5ff32f6dcbaced4b38ceeb6ccbe3a8c66 Mon Sep 17 00:00:00 2001
From: Ruslan Baratov ruslan_bara...@yahoo.com
Date: Thu, 13 Aug 2015 02:03:35 +0300
Subject: [PATCH 1/2] Fix EFFECTIVE_PLATFORM_NAME in cmake_install.cmake

$(EFFECTIVE_PLATFORM_NAME) in Xcode will be substituted with
`-iphoneos`/`-iphonesimulator` depending on the currently enabled SDK,
however for cmake_install.cmake script this will not happen and
explicit environment variable should be used.

Working on bug: http://public.kitware.com/Bug/view.php?id=12506
---
 Source/cmInstallTargetGenerator.cxx | 24 
 1 file changed, 24 insertions(+)

diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 30cf175..6b6808d 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -84,6 +84,30 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream os,
 {
 fromDirConfig =
 this-Target-Target-GetDirectory(config, this-ImportLibrary);
+const char *platforms = this-Target-Target-GetMakefile()-GetDefinition(
+CMAKE_XCODE_EFFECTIVE_PLATFORMS);
+
+// Replace $(EFFECTIVE_PLATFORM_NAME) at the end with
+// $ENV{EFFECTIVE_PLATFORM_NAME}.
+//
+// $(EFFECTIVE_PLATFORM_NAME) in Xcode will be substituted with
+// `-iphoneos`/`-iphonesimulator` depending on the currently enabled SDK,
+// however for cmake_install.cmake script this will not happen and
+// explicit environment variable should be used.
+if (platforms)
+  {
+  const std::string oldStr = $(EFFECTIVE_PLATFORM_NAME);
+  const std::string newStr = $ENV{EFFECTIVE_PLATFORM_NAME};
+
+  if (oldStr.size() = fromDirConfig.size())
+{
+const size_t subBegin = fromDirConfig.size() - oldStr.size();
+if (fromDirConfig.compare(subBegin, oldStr.size(), oldStr) == 0)
+  {
+  fromDirConfig.replace(subBegin, oldStr.size(), newStr);
+  }
+}
+  }
 fromDirConfig += /;
 }
   std::string toDir =
-- 
1.9.3 (Apple Git-50)

From 3c031415a3a9d58b7fcb8db7866da96f3c7a534c Mon Sep 17 00:00:00 2001
From: Ruslan Baratov ruslan_bara...@yahoo.com
Date: Thu, 13 Aug 2015 02:06:52 +0300
Subject: [PATCH 2/2] Fix install arguments for iOS

CMAKE_CFG_INTDIR can't be used for the BUILD_TYPE for iOS since it equals
to `Debug-iphoneos`,`Debug-iphonesimulator` etc.

Working on bug: http://public.kitware.com/Bug/view.php?id=12506
---
 Source/cmGlobalGenerator.cxx | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index cda26cd..fb93f5c 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2471,8 +2471,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
 singleLine.push_back(cmd);
 if ( cmakeCfgIntDir  *cmakeCfgIntDir  cmakeCfgIntDir[0] != '.' )
   {
+  const char *platforms = mf-GetDefinition(
+CMAKE_XCODE_EFFECTIVE_PLATFORMS);
   std::string cfgArg = -DBUILD_TYPE=;
-  cfgArg += mf-GetDefinition(CMAKE_CFG_INTDIR);
+  cfgArg += platforms ? $(CONFIGURATION) :
+mf-GetDefinition(CMAKE_CFG_INTDIR);
   singleLine.push_back(cfgArg);
   }
 singleLine.push_back(-P);
-- 
1.9.3 (Apple Git-50)

-- 

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:

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

2015-08-12 Thread Gregor Jasny via cmake-developers

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


I will give your patches a try this weekend.

Thanks,
Gregor
--

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


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

2015-08-07 Thread Gregor Jasny via cmake-developers

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

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


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

2015-08-07 Thread Ruslan Baratov via cmake-developers

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

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

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

2015-08-06 Thread Ruslan Baratov via cmake-developers

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?


Thanks, Ruslo
--

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