yuqilin / ios-cmake Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/ios-cmake
Automatically exported from code.google.com/p/ios-cmake
This project provides a simple iOS toolchain file that may be used with CMake to build libraries and setup applications. A couple of sample projects are included. The iOS toolchain file was developed during the porting of the toadlet engine to iOS platforms. It is also used in that project. See the included HOWTO.txt file for details.
What steps will reproduce the problem?
1. configure the hello-lib with the latest cmake-3.0 snapshot
~/dev/cmake/bin/cmake -DCMAKE_TOOLCHAIN_FILE=../../../toolchain/iOS.cmake
-DIOS_PLATFORM=OS -GXcode ..
What is the expected output? What do you see instead?
output with cmake-3.0:
-------------------------------------------------------------------------
-- Toolchain using default iOS SDK:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
/SDKs/iPhoneOS7.1.sdk
CMake Error at CMakeLists.txt:3 (project):
The CMAKE_CXX_COMPILER:
g++
is not a full path and was not found in the PATH.
CMake Error at CMakeLists.txt:3 (project):
The CMAKE_C_COMPILER:
gcc
is not a full path and was not found in the PATH.
-- Configuring incomplete, errors occurred!
See also
"/Users/tim/dev/ios-cmake/samples/hello-lib/b/CMakeFiles/CMakeOutput.log".
-------------------------------------------------------------------------
output with cmake-2.8:
-------------------------------------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to:
/Users/tim/dev/ios-cmake/samples/hello-lib/b
-------------------------------------------------------------------------
What version of the product are you using? On what operating system?
hg checkout: 12:dd7a50cd8abc
osx: 10.9.2
Original issue reported on code.google.com by [email protected]
on 13 Apr 2014 at 8:48
What steps will reproduce the problem?
1. Open project with QT Creator
2. Set CMAKE_TOOLCHAIN_FILE, IOS_PLATFORM to SIMULATOR and CMAKE_IOS_SDK_ROOT
3. Build
What is the expected output? What do you see instead?
A normal build is expected but instead it returns this error : llvm-g++-4.2:
Invalid arch name : -Ipath/to/hello-lib/folder
What version of the product are you using? On what operating system?
OS X 10.8.3 on a mac mini
QT Creator 2.7.0 based on QT 5.0.2
CMAKE 2.8.11
Original issue reported on code.google.com by [email protected]
on 17 May 2013 at 10:05
Trying to compile hello-lib via generated project gives such error:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
/SDKs/iPhoneOS8.1.sdk/usr/include/sys/cdefs.h:680:2: error: Unsupported
architecture
Original issue reported on code.google.com by [email protected]
on 3 Dec 2014 at 1:20
Hello,
is that possible to use the iOS.cmake script to generate xcode project for both
targets (Device/Simulator)? We integrated successfully one library into our
project, but it would be nice to have possibility to switch in Xcode between
the both targets.
Thanks!
Original issue reported on code.google.com by kobalicek.petr
on 18 May 2012 at 11:51
What steps will reproduce the problem?
1. Run cmake using iOS toolchain
2. Open XCode Project
3. Set a breakpoint
4. Run the project
What is the expected output? What do you see instead?
The breakpoint should have been hit. It was not hit because Generate Debug
Symbols is not set to "Yes" by default
What version of the product are you using? On what operating system?
Latest on OSX with Xcode 4.4.1
Original issue reported on code.google.com by [email protected]
on 18 Sep 2012 at 12:09
I have a library that uses a lot of check_c_source_compiles,
check_function_exists, check_symbol_exists, etc. checks.
These checks are based on try_compile function which just tries to compile an
executable from a single source file.
When ios toolchain is active compiler is unable to make "ordinary" executables:
> Check dependencies
> target specifies product type 'com.apple.product-type.tool', but there's no
such product type for the 'iphoneos' platform
Original issue reported on code.google.com by Equidamoid
on 17 Nov 2013 at 8:30
What steps will reproduce the problem?
1. System testing features during CMake configuration that (internally) use the
TRY_COMPILE command shiping with CMake (i.e. CHECK_INCLUDE_FILE,
CHECK_FUNCTION_EXISTS, etc.) will not work since the MACOSX_BUNDLE property is
not enabled within these functions.
What is the expected output? What do you see instead?
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
=== BUILD NATIVE TARGET cmTryCompileExec392075837 OF PROJECT CMAKE_TRY_COMPILE
WITH CONFIGURATION Debug ===
Check dependencies
target specifies product type 'com.apple.product-type.tool', but there's no
such product type for the 'iphonesimulator' platform
What version of the product are you using? On what operating system?
CMake 2.8.7. iOS SDK 5.0, XCode 4.2, Mac OS X 10.6.8, ios-cmake as of
2012-03-14.
Please provide any additional information below.
This seems to be a problem with CMake, however I'm not sure since it does not
have been confirmed so far. See http://cmake.org/Bug/view.php?id=12288 .
Original issue reported on code.google.com by [email protected]
on 14 Mar 2012 at 4:16
With the latest version, the simulator version does not compile anymore.
Architecture should be set to i386 when building for simulator.
This patch fixes the problem.
Original issue reported on code.google.com by julien.hamaide
on 7 May 2012 at 10:54
Attachments:
What steps will reproduce the problem?
1. Try to use the CMake toolchain without iOS SDK.
What is the expected output? What do you see instead?
"No iOS SDK's found in default search path ..." -> "search" is incorrectly
spelled "seach".
Original issue reported on code.google.com by [email protected]
on 9 Apr 2013 at 1:41
What steps will reproduce the problem?
On command line,
1. export MACOSX_DEPLOYMENT_TARGET=10.8
2. cmake -DCMAKE_TOOLCHAIN_FILE=iOS.cmake -G "Xcode" path_to_project
CMake will report:
Xcode 4.6
Build version 4H127
-- Toolchain using default iOS SDK:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
/SDKs/iPhoneOS6.1.sdk
-- CMAKE_OSX_DEPLOYMENT_TARGET 10.8
CMake Error at /Applications/CMake
2.8-10.app/Contents/share/cmake-2.8/Modules/Platform/Darwin.cmake:192 (message):
CMAKE_OSX_DEPLOYMENT_TARGET is '10.8' but CMAKE_OSX_SYSROOT:
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk"
is not set to a MacOSX SDK with a recognized version. Either set
CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to
empty.
Call Stack (most recent call first):
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
CMakeLists.txt:42 (project)
-- Configuring incomplete, errors occurred!
As a workaround/remedy, if instead of step 1, one does "export
MACOSX_DEPLOYMENT_TARGET=", i.e. kills the environment variable, the above
error doesn't occur.
Should CMake ignore this environment variable when iOS toolchain is used? Can
this be done from the iOS toolchain itself?
Thanks!
Original issue reported on code.google.com by [email protected]
on 19 Apr 2013 at 5:22
When I use the iOS toolchain to build any applications, I'm getting the warning
warning: argument unused during compilation: '-headerpad_max_install_names'
on the compilation of every .cpp file in my projects. Looking more into what it
is, it seems that it's a linker flag instead of a compiler flag. I think the
directive has been misplaced in the ios toolchain by accident. That is, instead
of lines
set (CMAKE_CXX_FLAGS_INIT "-headerpad_max_install_names -fvisibility=hidden
-fvisibility-inlines-hidden")
set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
it should probably read
set (CMAKE_CXX_FLAGS_INIT "-fvisibility=hidden -fvisibility-inlines-hidden")
set (CMAKE_C_LINK_FLAGS "-headerpad_max_install_names -Wl,-search_paths_first
${CMAKE_C_LINK_FLAGS}")
set (CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names -Wl,-search_paths_first
${CMAKE_CXX_LINK_FLAGS}")
That change resolves the warning for me.
Original issue reported on code.google.com by [email protected]
on 16 Jun 2014 at 2:26
What steps will reproduce the problem?
Followed the tutorial
What is the expected output? What do you see instead?
Build successful.
I instead got errors about missing c**_compiler.cmake files
What version of the product are you using? On what operating system?
Version in download. Compiled using the latest public version of XCode updated
to date. (4.3 I think)
Please provide any additional information below.
The bug is fixed by changing the path of root from /Developer to
/Applications/Xcode.app/Contents/Developer
Attached fixed file.
Original issue reported on code.google.com by [email protected]
on 28 Jun 2012 at 11:00
Attachments:
Please add armv7s
Original issue reported on code.google.com by [email protected]
on 11 Dec 2013 at 9:37
What steps will reproduce the problem?
1. cmake -DCMAKE_INSTALL_PREFIX=$HOME/install -DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=../code/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR
-GXcode ../code
2. cmake --build . --target install --config Release
What is the expected output? What do you see instead?
The library are built but they are not installed as expected. No files are
installed but directory structure is created ($HOME/install/lib)
the second cmake command ends with:
-- Install configuration: "Release-iphones"
** BUILD SUCCEEDED **
No error reported.
What version of the product are you using? On what operating system?
cmake 2.8.10, macosx mountain lion, xcode 4.52 + command line tools.
Please provide any additional information below.
Looking into the file "cmake_install.cmake", I found that
CMAKE_INSTALL_CONFIG_NAME is set to Release-iphoneos but it is tested against
values Debug, Release, MinSizeRel, RelWithDebInfo.
Also, the CMAKE_INSTALL_COMPONENT variable is empty.
Thanks,
Julien.
Original issue reported on code.google.com by [email protected]
on 12 Nov 2012 at 9:44
What steps will reproduce the problem?
1. Run cmake from a build folder just below hello-lib folder
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../toolchain/iOS.cmake
-DIOS_PLATFORM=SIMULATOR
2. Compile hello-lib sample
make
What is the expected output? What do you see instead?
Should generate a static library. Instead I see the error:
/Users/braillenet/C++/ios-cmake/samples/hello-lib/HelloIOS.h:1:9: fatal error:
'UIKit/UIKit.h' file not found
What version of the product are you using? On what operating system?
Using MacOS 10.9 Mavericks and xcode 5.0.1
Please provide any additional information below.
installed iOS Simulator SDK 7.0
Original issue reported on code.google.com by cristeab
on 12 Dec 2013 at 2:52
I've been trying to solve this issue for a couple of days but without success.
I am building a static library written in C, which uses other static libraries
(like curl, libevent, defined as ExternalProjects in CMake and compiled from
sources). The output static library is merged from static dependencies and
library itself. After upgrading to iOS 7 and OS 10.9 I cannot compile library
dependencies due to error described below.
What steps will reproduce the problem?
1. cmake -DCMAKE_TOOLCHAIN_FILE=../iOS/iOS.cmake -DIOS_PLATFORM=OS -GXcode ..
2. xcodebuild -configuration Debug
What is the expected output? What do you see instead?
./configure --prefix=build.ios/libs/staging --disable-dependency-tracking
--disable-shared --with-pic "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" --disable-cookies
--disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap
--disable-ipv6 --disable-ldap --disable-ldaps --disable-manual --disable-pop3
--disable-proxy --disable-rtsp --disable-smtp --disable-sspi --disable-telnet
--disable-tftp --without-libidn --without-ssl --without-zlib --without-librtmp
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable c-ares for DNS lookups... no
checking for grep... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ar...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking curl version... 7.21.3
checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `build.ios/libs/src/curl':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [build.ios/libs/src/curl-stamp/Debug-iphoneos/curl-configure] Error 77
Command /bin/sh failed with exit code 2
What version of the product are you using? On what operating system?
Latest version of ios-cmake, on OS X Mavericks, trying to cross compile against
iOS 7.0.
Please provide any additional information below.
I've been successfully using ios-cmake on OS X 10.8 and iOS 6.0. After
upgrading I cannot get it working.
I managed to get it somehow working using:
1. cmake -DCMAKE_TOOLCHAIN_FILE=../iOS/iOS.cmake -DIOS_PLATFORM=SIMULATOR
-GXcode ..
but the output binary is somehow corrupted:
lipo -info build/Debug/library.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/lipo: archive member build/Debug/library.a(base64.o) cputype (16777223)
and cpusubtype (3) does not match previous archive members cputype (7) and
cpusubtype (3) (all members must match)
I tried reinstalling macports (to have new version of cmake), installed latest
Xcode (5.0.2), latest command-line-tools and accepted license for
command-line-tools (which could also generate similar error from clang/gcc).
I don't know if that is a bug ios-cmake, but I would appreciate any help.
Cheers,
Tomasz
Original issue reported on code.google.com by [email protected]
on 15 Nov 2013 at 5:30
What steps will reproduce the problem?
1. Run cmake using the ios toolchain, open the xcodeproject
What is the expected output?
Generate Debug Symbols should be "Yes" for "Debug" and "RelWithDebInfo", and
otherwise "No"
What do you see instead?
It is always set to "No"
Please provide any additional information below.
To solve this, removing the following lines from iOS.cmake works for me:
# Force the compilers to gcc for iOS
include (CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER (/usr/bin/clang Apple)
CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Apple)
set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
Original issue reported on code.google.com by [email protected]
on 4 Aug 2014 at 1:54
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.