CMake: iOS SDK not found (Xcode 4.3.3)

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
aleroy
Kobold
Posts: 31
Joined: Thu Feb 02, 2012 9:34 pm
x 6

CMake: iOS SDK not found (Xcode 4.3.3)

Post by aleroy »

I was attempting to build the latest 1.8 (from the current repo) and ran into an issue with CMake ... it's telling me it couldn't find the iOS SDK. This also prevents the Samples build files from being generated. Here's relevant part of the CMake log:
-- Found CppUnit: optimized;/usr/local/lib/libcppunit.dylib;debug;/usr/local/lib/libcppunit.dylib
-- Looking for iOS SDK...
--

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ zlib
+ zziplib
+ freeimage
+ freetype
+ OpenGL
+ OpenGL ES 1.x
+ OpenGL ES 2.x
+ boost
+ boost-thread
+ boost-date_time
+ GLSL Optimizer
+ HLSL2GLSL
+ OIS
+ Doxygen
+ CppUnit
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ POCO: POCO framework <http://pocoproject.org/>
+ tbb: Threading Building Blocks <http://www.threadingbuildingblocks.org/>
+ Softimage: Softimage SDK needed for building XSIExporter <FALSE>
+ iOS SDK: iOS SDK <http://developer.apple.com/ios>
-----------------------------------------------------------------------------

INSTALL TARGETS - target OgreMain has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
INSTALL TARGETS - target OgreMain has RESOURCE files but no RESOURCE DESTINATION.
INSTALL TARGETS - target OgreMain has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
INSTALL TARGETS - target OgreMain has RESOURCE files but no RESOURCE DESTINATION.
INSTALL TARGETS - target OgreMain has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
INSTALL TARGETS - target OgreMain has RESOURCE files but no RESOURCE DESTINATION.
INSTALL TARGETS - target OgreMain has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
INSTALL TARGETS - target OgreMain has RESOURCE files but no RESOURCE DESTINATION.
-- Could not find dependency: IOKit
-- Skipping samples build
--
I built CMake from source myself. I know it works with other iOS projects. This wasn't an issue a few months ago ... but, I had the same issue when I ran the same SDK build script I used to build the binaries I'm using now (the sh script from the wiki article). So, possibly a result of one of the last two Xcode updates (4.3.2 or 4.3.3)?? Any ideas?

Normally, if I saw something like this, I would simply install whatever it wants ... but, in this case, I'm hesitant.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by masterfalcon »

Yes, this is a known issue with CMake 2.8.7 and before. You will need to use their latest trunk code where Xcode 4.3 is now supported. The issue is scheduled to be fixed in 2.8.8
aleroy
Kobold
Posts: 31
Joined: Thu Feb 02, 2012 9:34 pm
x 6

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by aleroy »

Thank you for the prompt response. Unfortunately, it does not resolve the issue I am having. As mentioned, I have already built and installed the latest code from the CMake repository. I did so again, just to be sure. I can confirm my CMake build is working with other projects using CMake---successfully generating Xcode 4.3.3 projects with MacOSX as well as iOS targets.
aleroy
Kobold
Posts: 31
Joined: Thu Feb 02, 2012 9:34 pm
x 6

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by aleroy »

Still trying to solve this. I'm really not sure why cmake is able to find my iOS SDK for another project (SOCI) but unable to find it for Ogre.

Anyways, I tried some things:

Code: Select all

xcode-select -print-path
/Applications/Xcode.app/Contents/Developer

Code: Select all

cmake -D OGRE_BUILD_PLATFORM_APPLE_IOS=1 -G Xcode ../build
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler using: Xcode
-- Check for working CXX compiler using: Xcode -- works

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring OGRE 1.8.0unstable
-- Check size of void*
-- Check size of void* - done
-- Performing Test OGRE_GCC_HAS_SSE
-- Performing Test OGRE_GCC_HAS_SSE - Success
-- Performing Test OGRE_GCC_VISIBILITY
-- Performing Test OGRE_GCC_VISIBILITY - Success
-- Detected g++ 4.2.1

-- Enabling GCC visibility flags
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Search path: /Users/andrew/Documents/code/ogre_src_1.80/build/iOSDependencies;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies;/Users/andrew/Documents/code/ogre_src_1.80/build/../iOSDependencies;/Users/andrew/Documents/code/ogre_src_1.80/ogre/../iOSDependencies
-- Looking for ZLIB...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found ZLIB: optimized;/usr/lib/libz.dylib;debug;/usr/lib/libz.dylib
-- Looking for ZZip...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found ZZip: optimized;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/release/libzzip.a;debug;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/debug/libzzip.a
-- Looking for FreeImage...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found FreeImage: optimized;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/release/libFreeImage.a;debug;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/debug/libFreeImage.a
-- Looking for FREETYPE...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- CMAKE_PREFIX_PATH: /Users/andrew/Documents/code/ogre_src_1.80/build/iOSDependencies;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies;/Users/andrew/Documents/code/ogre_src_1.80/build/../iOSDependencies;/Users/andrew/Documents/code/ogre_src_1.80/ogre/../iOSDependencies;/usr/local;/usr/lib/i386-linux-gnu
-- CMAKE_PREFIX_PATH: /Users/andrew/Documents/code/ogre_src_1.80/build/iOSDependencies;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies;/Users/andrew/Documents/code/ogre_src_1.80/build/../iOSDependencies;/Users/andrew/Documents/code/ogre_src_1.80/ogre/../iOSDependencies;/usr/local;/usr/lib/i386-linux-gnu
-- Found FREETYPE: optimized;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/release/libFreeType.a;debug;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/debug/libFreeType.a
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- Looking for POCO...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could not locate POCO
-- Looking for TBB...
-- Could not locate TBB
-- Looking for GLSL_Optimizer...
-- GLSL_Optimizer_PREFIX_PATH changed.
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found GLSL_Optimizer: optimized;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/release/libmesaglsl2.a;debug;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/debug/libmesaglsl2.a
-- Looking for HLSL2GLSL...
-- HLSL2GLSL_PREFIX_PATH changed.
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found HLSL2GLSL: optimized;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/release/libhlsl2glsl.a;debug;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/debug/libhlsl2glsl.a
-- Looking for OIS...
-- OIS_PREFIX_PATH changed.
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found OIS: optimized;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/release/libOIS.a;debug;/Users/andrew/Documents/code/ogre_src_1.80/ogre/iOSDependencies/lib/debug/libOIS.a
-- Found Doxygen: /Applications/Doxygen.app/Contents/Resources/doxygen
-- Looking for Softimage...
-- Softimage_PREFIX_PATH changed.
-- Could not locate Softimage
-- Looking for CppUnit...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found CppUnit: optimized;/usr/local/lib/libcppunit.dylib;debug;/usr/local/lib/libcppunit.dylib
-- Looking for iOS SDK...
--

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ zlib
+ zziplib
+ freeimage
+ freetype
+ OpenGL
+ OpenGL ES 1.x
+ OpenGL ES 2.x
+ boost
+ boost-thread
+ boost-date_time
+ GLSL Optimizer
+ HLSL2GLSL
+ OIS
+ Doxygen
+ CppUnit
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ POCO: POCO framework <http://pocoproject.org/>
+ tbb: Threading Building Blocks <http://www.threadingbuildingblocks.org/>
+ Softimage: Softimage SDK needed for building XSIExporter <FALSE>
+ iOS SDK: iOS SDK <http://developer.apple.com/ios>
-----------------------------------------------------------------------------

INSTALL TARGETS - target OgreMain has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
INSTALL TARGETS - target OgreMain has RESOURCE files but no RESOURCE DESTINATION.
INSTALL TARGETS - target OgreMain has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
INSTALL TARGETS - target OgreMain has RESOURCE files but no RESOURCE DESTINATION.
INSTALL TARGETS - target OgreMain has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
INSTALL TARGETS - target OgreMain has RESOURCE files but no RESOURCE DESTINATION.
INSTALL TARGETS - target OgreMain has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
INSTALL TARGETS - target OgreMain has RESOURCE files but no RESOURCE DESTINATION.
-- Could not find dependency: IOKit
-- Skipping samples build
--

----------------------------------------------------------------------------
FEATURE SUMMARY
----------------------------------------------------------------------------

Building components:
+ Paging
+ Property
+ Terrain
+ RTShader System
+ RTShader System Core Shaders
+ RTShader System Extensions Shaders
Building plugins:
+ BSP scene manager
+ Octree scene manager
+ Portal connected zone scene manager
+ Particle FX
Building rendersystems:
+ OpenGL ES 1.x
+ OpenGL ES 2.x
Building executables:
+ Samples
+ Tools
Building core features:
+ DDS image codec
+ PVRTC image codec
+ FreeImage codec
+ ZIP archives

Build type: static
Threading support: background (boost)
Use double precision: disabled
Allocator type: nedmalloc (pooling)
STL containers use allocator: enabled
Strings use allocator: disabled
Memory tracker (debug): disabled
Memory tracker (release): disabled
Use new script compilers: enabled
Use Boost: enabled

----------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/andrew/Documents/code/ogre_src_1.80/build
As you can see, this is not the issue reference here: http://www.cmake.org/Bug/view.php?id=12621
But rather that the iOS SDK headers path and IOKit are not found. So, I looked at the CMake cache values:

Code: Select all

cmake -L
-- Cache values
Boost_DIR:PATH=Boost_DIR-NOTFOUND
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/Users/andrew/Documents/code/ogre_src_1.80/build/sdk
CMAKE_OSX_ARCHITECTURES:STRING=
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=
CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
CMAKE_XCODE_SELECT:FILEPATH=/usr/bin/xcode-select
OGRE_BUILD_COMPONENT_PAGING:BOOL=ON
OGRE_BUILD_COMPONENT_PROPERTY:BOOL=ON
OGRE_BUILD_COMPONENT_RTSHADERSYSTEM:BOOL=ON
OGRE_BUILD_COMPONENT_TERRAIN:BOOL=ON
OGRE_BUILD_PLATFORM_NACL:BOOL=OFF
OGRE_BUILD_PLUGIN_BSP:BOOL=ON
OGRE_BUILD_PLUGIN_OCTREE:BOOL=ON
OGRE_BUILD_PLUGIN_PCZ:BOOL=ON
OGRE_BUILD_PLUGIN_PFX:BOOL=ON
OGRE_BUILD_RENDERSYSTEM_GLES:BOOL=TRUE
OGRE_BUILD_RENDERSYSTEM_GLES2:BOOL=TRUE
OGRE_BUILD_SAMPLES:BOOL=ON
OGRE_BUILD_TESTS:BOOL=OFF
OGRE_BUILD_TOOLS:BOOL=ON
OGRE_CONFIG_THREADS:STRING=2
OGRE_CONFIG_THREAD_PROVIDER:STRING=boost
OGRE_COPY_DEPENDENCIES:BOOL=ON
OGRE_DEPENDENCIES_DIR:PATH=
OGRE_INSTALL_DEPENDENCIES:BOOL=ON
OGRE_INSTALL_DOCS:BOOL=OFF
OGRE_INSTALL_SAMPLES:BOOL=OFF
OGRE_INSTALL_TOOLS:BOOL=ON
OGRE_STATIC:BOOL=TRUE
OGRE_UNITY_BUILD:BOOL=OFF
OGRE_UNITY_FILES_PER_UNIT:STRING=50
iOSSDK_INCLUDE_DIR:PATH=iOSSDK_INCLUDE_DIR-NOTFOUND
Over at Apple Developer website, I found:
(http://developer.apple.com/library/ios/ ... works.html)

Each version of the iOS SDK includes a local copy of the dynamic shared libraries that are installed with the system. These copies are installed on your development system so that you can link to them from your Xcode projects. To see the list of libraries for a particular version of iOS, look in <Xcode>/Platforms/iPhoneOS.platform/Developer/SDKs/<iOS_SDK>/usr/lib, where <Xcode> is the path to your Xcode installation directory and <iOS_SDK> is the specific SDK version you are targeting. For example, the shared libraries for the iOS 4.2 SDK would be located in the /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/lib directory, with the corresponding headers in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include.
So, I tried setting iOSSDK_INCLUDE_DIR:PATH in the cmake command:

Code: Select all

cmake -D OGRE_BUILD_PLATFORM_APPLE_IOS=1 iOSSDK_INCLUDE_DIR:PATH=/Applications/Xcode.app/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include -G Xcode ../ogre
Which produced the same output as above.

Building the OgreMain target of the generated OGRE.xcodeproj fails (whether by command-line or Xcode) with errors:
(copied from Xcode's build log)

OgreErrorDialog.mm
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreErrorDialog.mm:30:10: fatal error: 'Cocoa/Cocoa.h' file not found

OgreConfigDialog.mm

/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:43:10: error: use of undeclared identifier 'mWindowDelegate'
[mWindowDelegate release]; mWindowDelegate = nil;
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:43:36: error: use of undeclared identifier 'mWindowDelegate'
[mWindowDelegate release]; mWindowDelegate = nil;
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:48:9: error: use of undeclared identifier 'mWindowDelegate'
mWindowDelegate = [[OgreConfigWindowDelegate alloc] init];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:48:29: error: use of undeclared identifier 'OgreConfigWindowDelegate'
mWindowDelegate = [[OgreConfigWindowDelegate alloc] init];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:50:14: error: use of undeclared identifier 'mWindowDelegate'
if (!mWindowDelegate)
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:54:9: error: use of undeclared identifier 'NSArray'
NSArray *keys = [[NSArray alloc] initWithObjects:@"Full Screen", @"FSAA", @"Colour Depth", @"RTT Preferred Mode", @"Video Mode", @"sRGB Gamma Conversion", @"macAPI", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:54:18: error: use of undeclared identifier 'keys'
NSArray *keys = [[NSArray alloc] initWithObjects:@"Full Screen", @"FSAA", @"Colour Depth", @"RTT Preferred Mode", @"Video Mode", @"sRGB Gamma Conversion", @"macAPI", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:54:27: error: use of undeclared identifier 'NSArray'
NSArray *keys = [[NSArray alloc] initWithObjects:@"Full Screen", @"FSAA", @"Colour Depth", @"RTT Preferred Mode", @"Video Mode", @"sRGB Gamma Conversion", @"macAPI", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:55:9: error: use of undeclared identifier 'NSArray'
NSArray *fullScreenOptions = [[NSArray alloc] initWithObjects:@"Yes", @"No", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:55:18: error: use of undeclared identifier 'fullScreenOptions'
NSArray *fullScreenOptions = [[NSArray alloc] initWithObjects:@"Yes", @"No", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:55:40: error: use of undeclared identifier 'NSArray'
NSArray *fullScreenOptions = [[NSArray alloc] initWithObjects:@"Yes", @"No", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:56:9: error: use of undeclared identifier 'NSArray'
NSArray *colourDepthOptions = [[NSArray alloc] initWithObjects:@"32", @"16", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:56:18: error: use of undeclared identifier 'colourDepthOptions'
NSArray *colourDepthOptions = [[NSArray alloc] initWithObjects:@"32", @"16", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:56:41: error: use of undeclared identifier 'NSArray'
NSArray *colourDepthOptions = [[NSArray alloc] initWithObjects:@"32", @"16", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:57:9: error: use of undeclared identifier 'NSArray'
NSArray *rttOptions = [[NSArray alloc] initWithObjects:@"FBO", @"PBuffer", @"Copy", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:57:18: error: use of undeclared identifier 'rttOptions'
NSArray *rttOptions = [[NSArray alloc] initWithObjects:@"FBO", @"PBuffer", @"Copy", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:57:33: error: use of undeclared identifier 'NSArray'
NSArray *rttOptions = [[NSArray alloc] initWithObjects:@"FBO", @"PBuffer", @"Copy", nil];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:58:9: error: use of undeclared identifier 'NSMutableArray'
NSMutableArray *videoModeOptions = [[NSMutableArray alloc] initWithCapacity:1];
^
/Users/andrew/Documents/code/ogre_src_1.80/ogre/OgreMain/src/OSX/OgreConfigDialog.mm:58:25: error: use of undeclared identifier 'videoModeOptions'
NSMutableArray *videoModeOptions = [[NSMutableArray alloc] initWithCapacity:1];
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Other things of note

Build Settings (target:OgreMain):
Base SDK = Latest iOS (iOS 5.1)
iOS Deployment Target = iOS 5.1

From "Build Phases": if I add "Link Binary with Libraries" and click the "+" to add a new entry, none of the iOS frameworks/libraries appear in list of choices ... also, the "Other" button isn't there to select a library manually.


Please, I am not a hobbiest playing at making a game for fun. I could really use some help here.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by masterfalcon »

Ok, I think I see your problem. Make sure that you are inside the build folder then your CMake line shouldn't be:

cmake -D OGRE_BUILD_PLATFORM_APPLE_IOS=1 -G Xcode ../build

but instead

cmake -D OGRE_BUILD_PLATFORM_APPLE_IOS=1 -G Xcode ..
aleroy
Kobold
Posts: 31
Joined: Thu Feb 02, 2012 9:34 pm
x 6

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by aleroy »

Oh, sorry, that was a typo. I actually have the folders setup as follows:

ogre_src_1.80
|--build
|--ogre

where ogre is the src pulled from the git repo. I'm calling the CMake command from the build folder:

cmake -D OGRE_BUILD_PLATFORM_APPLE_IOS=1 -G Xcode ../ogre

{EDIT: I just tried it with the build folder within the ogre folder (using the command you suggest) and had the same results}
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by masterfalcon »

Check here: http://www.ogre3d.org/tikiwiki/Building ... e+-+iPhone. I suspect either a problem with xcode-select or command line tools not being installed.
aleroy
Kobold
Posts: 31
Joined: Thu Feb 02, 2012 9:34 pm
x 6

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by aleroy »

I found this: http://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.
I'm checking it out now ... to see if, perhaps, it may shed some light on my problem.

...
Check here: http://www.ogre3d.org/tikiwiki/Building ... e+-+iPhone. I suspect either a problem with xcode-select or command line tools not being installed.
I'll look into xcode-select. I know that I have command line tools installed ... but I recall there was once an error during an update (it says [installed] in my preferences->downloads ... but I'll try uninstalling/reinstalling)
AnotherBrian
Gnoblar
Posts: 16
Joined: Fri Feb 11, 2011 2:24 am
x 1

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by AnotherBrian »

Alright.. I'm at the same place as you now. Getting the same error.

I got past my previous stuck point by using a checkout instead of the release candidate source for 1.8.
AnotherBrian
Gnoblar
Posts: 16
Joined: Fri Feb 11, 2011 2:24 am
x 1

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by AnotherBrian »

Looks like the cmake scripts are looking for the libraries in the old locations.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by masterfalcon »

Which cmake scripts, which libraries, which locations?
AnotherBrian
Gnoblar
Posts: 16
Joined: Fri Feb 11, 2011 2:24 am
x 1

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by AnotherBrian »

In ogre/CMake/Packages/FindiOSSDK.cmake, I changed the find_path line to find_path(iOSSDK_INCLUDE_DIR iPhoneOS.platform /Applications/Xcode.app/Contents/Developer/Platforms/)

I think FindIOKit.cmake might need a change as well.

I also had to rename the directories in iOSDependencies from Release and Debug to release and debug.

Currently it looks like my first error is "xcodebuild: error: The directory [user_path_stuff]/ogre/build/iOS does not contain an Xcode project."

Edit:.. ahh.. it's generating an xcode project, but it's not putting it in $BUILD
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by masterfalcon »

I think there's something else going on locally with your setup. I just ran the script just fine(with a couple issues for lipo near the end). But otherwise, building is just fine. IOKit will not be searched for if you are configuring for iOS, that's the first red flag.
AnotherBrian
Gnoblar
Posts: 16
Joined: Fri Feb 11, 2011 2:24 am
x 1

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by AnotherBrian »

Do you still have libraries in /Developer?
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by masterfalcon »

No.

I think you may have a messed up CMakeCache.txt in your build/iOS folder. delete the whole thing and start over.
AnotherBrian
Gnoblar
Posts: 16
Joined: Fri Feb 11, 2011 2:24 am
x 1

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by AnotherBrian »

Ah.. I was wondering how to clear that. Looks like it's getting farther now. Building a lot of things... Not sure if any of my changes were required.. I'll have to start from scratch again once I get it working to see.

Update: Got the template project running in the simulator! Building for the device i get a couple errors about copying InfoPlist.strings and one other thing... Looks like something related to this issue: http://www.ogre3d.org/forums/viewtopic.php?f=2&t=69170

Another update: Got the template app working on the device.. Had to fiddle with the build script some. Still get one error, but it runs.

in "ditto "$PROJECT_DIR/$PROJECT_NAME/media/" "$BUILT_PRODUCTS_DIR/Stereo.app/media/"
The first slash after media is incorrect I believe. Needs to be:
ditto "$PROJECT_DIR/$PROJECT_NAME/media" "$BUILT_PRODUCTS_DIR/Stereo.app/media/"
aleroy
Kobold
Posts: 31
Joined: Thu Feb 02, 2012 9:34 pm
x 6

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by aleroy »

AnotherBrian wrote:In ogre/CMake/Packages/FindiOSSDK.cmake, I changed the find_path line to find_path(iOSSDK_INCLUDE_DIR iPhoneOS.platform /Applications/Xcode.app/Contents/Developer/Platforms/)
That did the trick! Thanks AnotherBrian; thanks masterfalcon.
Arkiruthis
Gremlin
Posts: 178
Joined: Fri Dec 24, 2010 7:55 pm
x 10

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by Arkiruthis »

aleroy wrote:
AnotherBrian wrote:In ogre/CMake/Packages/FindiOSSDK.cmake, I changed the find_path line to find_path(iOSSDK_INCLUDE_DIR iPhoneOS.platform /Applications/Xcode.app/Contents/Developer/Platforms/)
That did the trick! Thanks AnotherBrian; thanks masterfalcon.
Thank you! I had exactly the same issue as you guys and this fixed it for me. (building the latest cmake from git didn't seem to fix it for me, but maybe that's not the release candidate)
Ogrergo
Gnoblar
Posts: 10
Joined: Wed Apr 04, 2012 11:40 pm

Re: CMake: iOS SDK not found (Xcode 4.3.3)

Post by Ogrergo »

Had the same problem.
aleroy wrote:
AnotherBrian wrote:
In ogre/CMake/Packages/FindiOSSDK.cmake, I changed the find_path line to find_path(iOSSDK_INCLUDE_DIR iPhoneOS.platform /Applications/Xcode.app/Contents/Developer/Platforms/)


That did the trick! Thanks AnotherBrian; thanks masterfalcon.
This was the fix.

Thanks!