this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added ios-cmake toolchain and made GLES renderers disable GPU_CreateImageUsingTexture().

+1160 -8
+18 -4
CMakeLists.txt
··· 8 8 set(SDL_gpu_INSTALL_BY_DEFAULT OFF) 9 9 endif(UNIX) 10 10 11 + if(IOS) 12 + message(" Using iOS defaults.") 13 + set(SDL_gpu_INSTALL_BY_DEFAULT OFF) 14 + set(SDL_gpu_DEFAULT_BUILD_DEMOS OFF) 15 + set(SDL_gpu_DEFAULT_BUILD_TOOLS OFF) 16 + set(SDL_gpu_DEFAULT_DISABLE_OPENGL ON) 17 + set(SDL_gpu_DEFAULT_DISABLE_GLES OFF) 18 + else(IOS) 19 + set(SDL_gpu_DEFAULT_BUILD_DEMOS ON) 20 + set(SDL_gpu_DEFAULT_BUILD_TOOLS ON) 21 + set(SDL_gpu_DEFAULT_DISABLE_OPENGL OFF) 22 + set(SDL_gpu_DEFAULT_DISABLE_GLES ON) 23 + endif(IOS) 24 + 11 25 option(SDL_gpu_INSTALL "Install SDL_gpu libs, includes, and CMake scripts" ${SDL_gpu_INSTALL_BY_DEFAULT}) 12 26 option(SDL_gpu_BUILD_DEBUG "Build with debugging symbols" ON) 13 27 option(SDL_gpu_BUILD_SHARED "Build SDL_gpu shared libraries" ON) 14 28 option(SDL_gpu_BUILD_STATIC "Build SDL_gpu static libraries" ON) 15 - option(SDL_gpu_BUILD_DEMOS "Build SDL_gpu demo programs" ON) 29 + option(SDL_gpu_BUILD_DEMOS "Build SDL_gpu demo programs" ${SDL_gpu_DEFAULT_BUILD_DEMOS}) 16 30 option(SDL_gpu_BUILD_TESTS "Build SDL_gpu test programs" OFF) 17 31 option(SDL_gpu_BUILD_VIDEO_TEST "Build SDL_gpu video test program (requires FFMPEG)" OFF) 18 - option(SDL_gpu_BUILD_TOOLS "Build SDL_gpu tool programs" ON) 32 + option(SDL_gpu_BUILD_TOOLS "Build SDL_gpu tool programs" ${SDL_gpu_DEFAULT_BUILD_TOOLS}) 19 33 option(SDL_gpu_USE_SDL1 "Use SDL 1.2 headers and library instead of SDL 2" OFF) 20 - option(SDL_gpu_DISABLE_OPENGL "Disable OpenGL renderers. Overrides specific OpenGL renderer flags." OFF) 21 - option(SDL_gpu_DISABLE_GLES "Disable OpenGLES renderers. Overrides specific GLES renderer flags." ON) 34 + option(SDL_gpu_DISABLE_OPENGL "Disable OpenGL renderers. Overrides specific OpenGL renderer flags." ${SDL_gpu_DEFAULT_DISABLE_OPENGL}) 35 + option(SDL_gpu_DISABLE_GLES "Disable OpenGLES renderers. Overrides specific GLES renderer flags." ${SDL_gpu_DEFAULT_DISABLE_GLES}) 22 36 option(SDL_gpu_DISABLE_OPENGL_1_BASE "Disable OpenGL 1 BASE renderer" OFF) 23 37 option(SDL_gpu_DISABLE_OPENGL_1 "Disable OpenGL 1.X renderer" OFF) 24 38 option(SDL_gpu_DISABLE_OPENGL_2 "Disable OpenGL 2.X renderer" OFF)
+22
README-ios.txt
··· 1 + 2 + Building SDL2_gpu for iOS 3 + ------------------------- 4 + 5 + Building for iOS takes a little extra effort. As of writing, CMake does not include explicit support for the iOS toolchain, so we have to use a toolchain file to specify the correct programs for CMake to use. 6 + 7 + SDL_gpu includes a version of the ios-cmake toolchain file. 8 + 9 + The FindSDL2.cmake script also does not handle locating the appropriate binaries for iOS (the default SDL framework does not include iOS). 10 + 11 + You will need to build the SDL2 library for iOS first. 12 + 13 + 14 + Here's an example command line invokation of CMake for SDL_gpu. You may need to adjust the paths yourself. 15 + 16 + mkdir ios-build 17 + cd ios-build 18 + cmake -DCMAKE_TOOLCHAIN_FILE=../scripts/ios-cmake/toolchain/iOS.cmake -DCMAKE_IOS_SDK_ROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -DSDL2_LIBRARY=../../SDL2/lib/ios/libSDL2.a -DSDL2_INCLUDE_DIR=../../SDL2/include/SDL2 .. -G "Xcode" 19 + 20 + The settings in CMakeLists.txt will automatically pick the OpenGL ES renderers for you. It will also disable building of the demos and tools. 21 + 22 + If you do not get a message saying that the iOS default settings are being used, then the path to ios-cmake may be incorrect. You will have to delete the CMake cache files before trying again.
+143
scripts/ios-cmake/HOWTO.txt
··· 1 + #summary Guide to the ios-cmake project 2 + 3 + 4 + 5 + == Introduction == 6 + 7 + 8 + 9 + This project provides a simple iOS toolchain file that may be used with CMake to build libraries. 10 + 11 + 12 + 13 + 14 + 15 + == Contents == 16 + 17 + 18 + 19 + * [#Toolchain_file] 20 + 21 + * [#Sample_library] 22 + 23 + * [#Sample_application] 24 + 25 + 26 + 27 + 28 + 29 + ==Toolchain_file== 30 + 31 + 32 + 33 + The toolchain is located in at toolchain/iOS.cmake location. Using the toolchain is quite straightforward. It only requires you to call CMake with: 34 + 35 + 36 + 37 + {{{ 38 + 39 + cmake -DCMAKE_TOOLCHAIN_FILE=path/to/iOS.cmake -GXcode 40 + 41 + }}} 42 + 43 + 44 + 45 + *NOTE:* Since this toolchain by default builds both arm6 and arm7 fat libraries and applications, you need to use the Xcode generator. Makefiles currently do not work. 46 + 47 + 48 + 49 + The iOS.cmake file only has a few different options, all of which are documented in the file itself. 50 + 51 + 52 + 53 + 54 + 55 + ===IOS_PLATFORM=== 56 + 57 + 58 + 59 + *Values:* OS (default) or SIMULATOR 60 + 61 + 62 + 63 + This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders 64 + 65 + * OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch. 66 + 67 + * SIMULATOR - used to build for the Simulator platforms, which have an x86 arch. 68 + 69 + 70 + 71 + ===CMAKE_IOS_DEVELOPER_ROOT=== 72 + 73 + 74 + 75 + *Values:* automatic(default) or /path/to/platform/ eveloper folder 76 + 77 + 78 + 79 + By default this location is automatically chosen based on the IOS_PLATFORM value above. If set manually, it will override the default location and force the user of a particular Developer Platform 80 + 81 + 82 + 83 + ===CMAKE_IOS_SDK_ROOT=== 84 + 85 + 86 + 87 + *Values:* automatic(default) or /path/to/platform/Developer/SDKs/SDK folder 88 + 89 + 90 + 91 + By default this location is automatically chosen based on the CMAKE_IOS_DEVELOPER_ROOT value. In this case it will always be the most up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path. If set manually, this will force the use of a specific SDK version 92 + 93 + 94 + 95 + 96 + 97 + ==Sample_library== 98 + 99 + 100 + 101 + The iOS.cmake toolchain is great for building libraries. 102 + 103 + 104 + 105 + A sample library is located in the samples/hello-lib location. It creates a small static sample library. You can build the library in the standard CMake way using a build subdirectory: 106 + 107 + 108 + 109 + {{{ 110 + 111 + 1. mkdir build.ios 112 + 113 + 2. cd build.ios 114 + 115 + 3. cmake -DCMAKE_TOOLCHAIN_FILE=../../../toolchains/iOS.cmake -GXcode .. 116 + 117 + 4a. Open XCode and build the install target or 118 + 119 + 4b. Simply type: xcodebuild -target install -configuration Debug 120 + 121 + }}} 122 + 123 + 124 + 125 + This will place the library and header file into the samples/hello-app folder. 126 + 127 + 128 + 129 + 130 + 131 + ==Sample_application== 132 + 133 + 134 + 135 + The sample application is located in samples/hello-app. This application uses the library and headers from the hello-lib project which are automatically installed if you built the install target. 136 + 137 + 138 + 139 + Simply open the included Xcode project and build the application for whichever platform you created the build-lib target for (OS or SIMULATOR). Note that you will need to sign the application to deploy it to a device. 140 + 141 + 142 + 143 + *NOTE:* Building an iOS executable application strictly using cmake is not a great idea. There are a large number of options that need to be setup within XCode before a project can simply be deployed onto a device. The whole signing process is a good example. For this reason, we do not attempt to build the hello-app sample using cmake.
+5
scripts/ios-cmake/README.txt
··· 1 + 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. 2 + 3 + The iOS toolchain file was developed during the porting of the toadlet engine to iOS platforms. It is also used in that project. 4 + 5 + See the included HOWTO.txt file for details.
+38
scripts/ios-cmake/samples/hello-app/HelloApp-Info.plist
··· 1 + <?xml version="1.0" encoding="UTF-8"?> 2 + <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 + <plist version="1.0"> 4 + <dict> 5 + <key>CFBundleDevelopmentRegion</key> 6 + <string>en</string> 7 + <key>CFBundleDisplayName</key> 8 + <string>${PRODUCT_NAME}</string> 9 + <key>CFBundleExecutable</key> 10 + <string>${EXECUTABLE_NAME}</string> 11 + <key>CFBundleIconFile</key> 12 + <string></string> 13 + <key>CFBundleIdentifier</key> 14 + <string>com.lightningtoads.${PRODUCT_NAME:rfc1034identifier}</string> 15 + <key>CFBundleInfoDictionaryVersion</key> 16 + <string>6.0</string> 17 + <key>CFBundleName</key> 18 + <string>${PRODUCT_NAME}</string> 19 + <key>CFBundlePackageType</key> 20 + <string>APPL</string> 21 + <key>CFBundleShortVersionString</key> 22 + <string>1.0</string> 23 + <key>CFBundleSignature</key> 24 + <string>????</string> 25 + <key>CFBundleVersion</key> 26 + <string>1.0</string> 27 + <key>LSRequiresIPhoneOS</key> 28 + <true/> 29 + <key>NSMainNibFile</key> 30 + <string>MainWindow</string> 31 + <key>UISupportedInterfaceOrientations</key> 32 + <array> 33 + <string>UIInterfaceOrientationPortrait</string> 34 + <string>UIInterfaceOrientationLandscapeLeft</string> 35 + <string>UIInterfaceOrientationLandscapeRight</string> 36 + </array> 37 + </dict> 38 + </plist>
+14
scripts/ios-cmake/samples/hello-app/HelloApp-Prefix.pch
··· 1 + // 2 + // Prefix header for all source files of the 'HelloApp' target in the 'HelloApp' project 3 + // 4 + 5 + #import <Availability.h> 6 + 7 + #ifndef __IPHONE_3_0 8 + #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 + #endif 10 + 11 + #ifdef __OBJC__ 12 + #import <UIKit/UIKit.h> 13 + #import <Foundation/Foundation.h> 14 + #endif
+245
scripts/ios-cmake/samples/hello-app/HelloApp.xcodeproj/project.pbxproj
··· 1 + // !$*UTF8*$! 2 + { 3 + archiveVersion = 1; 4 + classes = { 5 + }; 6 + objectVersion = 46; 7 + objects = { 8 + 9 + /* Begin PBXBuildFile section */ 10 + 92942439145AFADC00D678AE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92942438145AFADC00D678AE /* UIKit.framework */; }; 11 + 9294243B145AFADC00D678AE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9294243A145AFADC00D678AE /* Foundation.framework */; }; 12 + 9294243D145AFADC00D678AE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9294243C145AFADC00D678AE /* CoreGraphics.framework */; }; 13 + 92E6AD31145B3FED009886F9 /* HelloAppAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 92E6AD29145B3FED009886F9 /* HelloAppAppDelegate.m */; }; 14 + 92E6AD34145B3FED009886F9 /* libhello-lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 92E6AD2E145B3FED009886F9 /* libhello-lib.a */; }; 15 + 92E6AD35145B3FEE009886F9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 92E6AD2F145B3FED009886F9 /* main.m */; }; 16 + 92E6AD36145B3FEE009886F9 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 92E6AD30145B3FED009886F9 /* MainWindow.xib */; }; 17 + /* End PBXBuildFile section */ 18 + 19 + /* Begin PBXFileReference section */ 20 + 92942434145AFADC00D678AE /* HelloApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 + 92942438145AFADC00D678AE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 22 + 9294243A145AFADC00D678AE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 23 + 9294243C145AFADC00D678AE /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 24 + 92E6AD25145B3FDA009886F9 /* HelloApp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "HelloApp-Info.plist"; sourceTree = "<group>"; }; 25 + 92E6AD26145B3FDA009886F9 /* HelloApp-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HelloApp-Prefix.pch"; sourceTree = "<group>"; }; 26 + 92E6AD28145B3FED009886F9 /* HelloAppAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelloAppAppDelegate.h; sourceTree = "<group>"; }; 27 + 92E6AD29145B3FED009886F9 /* HelloAppAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelloAppAppDelegate.m; sourceTree = "<group>"; }; 28 + 92E6AD2A145B3FED009886F9 /* HelloIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelloIOS.h; sourceTree = "<group>"; }; 29 + 92E6AD2C145B3FED009886F9 /* HelloWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelloWorld.h; sourceTree = "<group>"; }; 30 + 92E6AD2E145B3FED009886F9 /* libhello-lib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libhello-lib.a"; sourceTree = "<group>"; }; 31 + 92E6AD2F145B3FED009886F9 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 32 + 92E6AD30145B3FED009886F9 /* MainWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; }; 33 + /* End PBXFileReference section */ 34 + 35 + /* Begin PBXFrameworksBuildPhase section */ 36 + 92942431145AFADC00D678AE /* Frameworks */ = { 37 + isa = PBXFrameworksBuildPhase; 38 + buildActionMask = 2147483647; 39 + files = ( 40 + 92942439145AFADC00D678AE /* UIKit.framework in Frameworks */, 41 + 9294243B145AFADC00D678AE /* Foundation.framework in Frameworks */, 42 + 9294243D145AFADC00D678AE /* CoreGraphics.framework in Frameworks */, 43 + 92E6AD34145B3FED009886F9 /* libhello-lib.a in Frameworks */, 44 + ); 45 + runOnlyForDeploymentPostprocessing = 0; 46 + }; 47 + /* End PBXFrameworksBuildPhase section */ 48 + 49 + /* Begin PBXGroup section */ 50 + 92942429145AFADC00D678AE = { 51 + isa = PBXGroup; 52 + children = ( 53 + 92E6AD28145B3FED009886F9 /* HelloAppAppDelegate.h */, 54 + 92E6AD29145B3FED009886F9 /* HelloAppAppDelegate.m */, 55 + 92E6AD2A145B3FED009886F9 /* HelloIOS.h */, 56 + 92E6AD2C145B3FED009886F9 /* HelloWorld.h */, 57 + 92E6AD2E145B3FED009886F9 /* libhello-lib.a */, 58 + 92E6AD2F145B3FED009886F9 /* main.m */, 59 + 92E6AD30145B3FED009886F9 /* MainWindow.xib */, 60 + 92E6AD25145B3FDA009886F9 /* HelloApp-Info.plist */, 61 + 92E6AD26145B3FDA009886F9 /* HelloApp-Prefix.pch */, 62 + 92942437145AFADC00D678AE /* Frameworks */, 63 + 92942435145AFADC00D678AE /* Products */, 64 + ); 65 + sourceTree = "<group>"; 66 + }; 67 + 92942435145AFADC00D678AE /* Products */ = { 68 + isa = PBXGroup; 69 + children = ( 70 + 92942434145AFADC00D678AE /* HelloApp.app */, 71 + ); 72 + name = Products; 73 + sourceTree = "<group>"; 74 + }; 75 + 92942437145AFADC00D678AE /* Frameworks */ = { 76 + isa = PBXGroup; 77 + children = ( 78 + 92942438145AFADC00D678AE /* UIKit.framework */, 79 + 9294243A145AFADC00D678AE /* Foundation.framework */, 80 + 9294243C145AFADC00D678AE /* CoreGraphics.framework */, 81 + ); 82 + name = Frameworks; 83 + sourceTree = "<group>"; 84 + }; 85 + /* End PBXGroup section */ 86 + 87 + /* Begin PBXNativeTarget section */ 88 + 92942433145AFADC00D678AE /* HelloApp */ = { 89 + isa = PBXNativeTarget; 90 + buildConfigurationList = 92942455145AFADC00D678AE /* Build configuration list for PBXNativeTarget "HelloApp" */; 91 + buildPhases = ( 92 + 92942430145AFADC00D678AE /* Sources */, 93 + 92942431145AFADC00D678AE /* Frameworks */, 94 + 92942432145AFADC00D678AE /* Resources */, 95 + ); 96 + buildRules = ( 97 + ); 98 + dependencies = ( 99 + ); 100 + name = HelloApp; 101 + productName = HelloApp; 102 + productReference = 92942434145AFADC00D678AE /* HelloApp.app */; 103 + productType = "com.apple.product-type.application"; 104 + }; 105 + /* End PBXNativeTarget section */ 106 + 107 + /* Begin PBXProject section */ 108 + 9294242B145AFADC00D678AE /* Project object */ = { 109 + isa = PBXProject; 110 + buildConfigurationList = 9294242E145AFADC00D678AE /* Build configuration list for PBXProject "HelloApp" */; 111 + compatibilityVersion = "Xcode 3.2"; 112 + developmentRegion = English; 113 + hasScannedForEncodings = 0; 114 + knownRegions = ( 115 + en, 116 + ); 117 + mainGroup = 92942429145AFADC00D678AE; 118 + productRefGroup = 92942435145AFADC00D678AE /* Products */; 119 + projectDirPath = ""; 120 + projectRoot = ""; 121 + targets = ( 122 + 92942433145AFADC00D678AE /* HelloApp */, 123 + ); 124 + }; 125 + /* End PBXProject section */ 126 + 127 + /* Begin PBXResourcesBuildPhase section */ 128 + 92942432145AFADC00D678AE /* Resources */ = { 129 + isa = PBXResourcesBuildPhase; 130 + buildActionMask = 2147483647; 131 + files = ( 132 + 92E6AD36145B3FEE009886F9 /* MainWindow.xib in Resources */, 133 + ); 134 + runOnlyForDeploymentPostprocessing = 0; 135 + }; 136 + /* End PBXResourcesBuildPhase section */ 137 + 138 + /* Begin PBXSourcesBuildPhase section */ 139 + 92942430145AFADC00D678AE /* Sources */ = { 140 + isa = PBXSourcesBuildPhase; 141 + buildActionMask = 2147483647; 142 + files = ( 143 + 92E6AD31145B3FED009886F9 /* HelloAppAppDelegate.m in Sources */, 144 + 92E6AD35145B3FEE009886F9 /* main.m in Sources */, 145 + ); 146 + runOnlyForDeploymentPostprocessing = 0; 147 + }; 148 + /* End PBXSourcesBuildPhase section */ 149 + 150 + /* Begin XCBuildConfiguration section */ 151 + 92942453145AFADC00D678AE /* Debug */ = { 152 + isa = XCBuildConfiguration; 153 + buildSettings = { 154 + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 155 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 156 + GCC_C_LANGUAGE_STANDARD = gnu99; 157 + GCC_OPTIMIZATION_LEVEL = 0; 158 + GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 159 + GCC_SYMBOLS_PRIVATE_EXTERN = NO; 160 + GCC_VERSION = com.apple.compilers.llvmgcc42; 161 + GCC_WARN_ABOUT_RETURN_TYPE = YES; 162 + GCC_WARN_UNUSED_VARIABLE = YES; 163 + IPHONEOS_DEPLOYMENT_TARGET = 4.3; 164 + SDKROOT = iphoneos; 165 + }; 166 + name = Debug; 167 + }; 168 + 92942454145AFADC00D678AE /* Release */ = { 169 + isa = XCBuildConfiguration; 170 + buildSettings = { 171 + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 172 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 173 + GCC_C_LANGUAGE_STANDARD = gnu99; 174 + GCC_VERSION = com.apple.compilers.llvmgcc42; 175 + GCC_WARN_ABOUT_RETURN_TYPE = YES; 176 + GCC_WARN_UNUSED_VARIABLE = YES; 177 + IPHONEOS_DEPLOYMENT_TARGET = 4.3; 178 + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 179 + SDKROOT = iphoneos; 180 + }; 181 + name = Release; 182 + }; 183 + 92942456145AFADC00D678AE /* Debug */ = { 184 + isa = XCBuildConfiguration; 185 + buildSettings = { 186 + ALWAYS_SEARCH_USER_PATHS = NO; 187 + COPY_PHASE_STRIP = NO; 188 + GCC_DYNAMIC_NO_PIC = NO; 189 + GCC_PRECOMPILE_PREFIX_HEADER = YES; 190 + GCC_PREFIX_HEADER = "HelloApp-Prefix.pch"; 191 + INFOPLIST_FILE = "HelloApp-Info.plist"; 192 + LIBRARY_SEARCH_PATHS = ( 193 + "$(inherited)", 194 + "\"$(SRCROOT)\"", 195 + ); 196 + OTHER_LDFLAGS = "-lstdc++"; 197 + PRODUCT_NAME = "$(TARGET_NAME)"; 198 + WRAPPER_EXTENSION = app; 199 + }; 200 + name = Debug; 201 + }; 202 + 92942457145AFADC00D678AE /* Release */ = { 203 + isa = XCBuildConfiguration; 204 + buildSettings = { 205 + ALWAYS_SEARCH_USER_PATHS = NO; 206 + COPY_PHASE_STRIP = YES; 207 + GCC_PRECOMPILE_PREFIX_HEADER = YES; 208 + GCC_PREFIX_HEADER = "HelloApp-Prefix.pch"; 209 + INFOPLIST_FILE = "HelloApp-Info.plist"; 210 + LIBRARY_SEARCH_PATHS = ( 211 + "$(inherited)", 212 + "\"$(SRCROOT)\"", 213 + ); 214 + OTHER_LDFLAGS = "-lstdc++"; 215 + PRODUCT_NAME = "$(TARGET_NAME)"; 216 + VALIDATE_PRODUCT = YES; 217 + WRAPPER_EXTENSION = app; 218 + }; 219 + name = Release; 220 + }; 221 + /* End XCBuildConfiguration section */ 222 + 223 + /* Begin XCConfigurationList section */ 224 + 9294242E145AFADC00D678AE /* Build configuration list for PBXProject "HelloApp" */ = { 225 + isa = XCConfigurationList; 226 + buildConfigurations = ( 227 + 92942453145AFADC00D678AE /* Debug */, 228 + 92942454145AFADC00D678AE /* Release */, 229 + ); 230 + defaultConfigurationIsVisible = 0; 231 + defaultConfigurationName = Release; 232 + }; 233 + 92942455145AFADC00D678AE /* Build configuration list for PBXNativeTarget "HelloApp" */ = { 234 + isa = XCConfigurationList; 235 + buildConfigurations = ( 236 + 92942456145AFADC00D678AE /* Debug */, 237 + 92942457145AFADC00D678AE /* Release */, 238 + ); 239 + defaultConfigurationIsVisible = 0; 240 + defaultConfigurationName = Release; 241 + }; 242 + /* End XCConfigurationList section */ 243 + }; 244 + rootObject = 9294242B145AFADC00D678AE /* Project object */; 245 + }
+11
scripts/ios-cmake/samples/hello-app/HelloAppAppDelegate.h
··· 1 + #import <UIKit/UIKit.h> 2 + 3 + @class HelloIOS; 4 + 5 + @interface HelloAppAppDelegate : NSObject <UIApplicationDelegate> { 6 + UIWindow *window; 7 + } 8 + 9 + @property (nonatomic, retain) IBOutlet UIWindow *window; 10 + 11 + @end
+19
scripts/ios-cmake/samples/hello-app/HelloAppAppDelegate.m
··· 1 + #import "HelloAppAppDelegate.h" 2 + 3 + #import "HelloIOS.h" 4 + 5 + @implementation HelloAppAppDelegate 6 + 7 + @synthesize window; 8 + 9 + - (void)applicationDidFinishLaunching:(UIApplication *)application { 10 + [HelloIOS class]; 11 + [window makeKeyAndVisible]; 12 + } 13 + 14 + - (void)dealloc{ 15 + [window release]; 16 + [super dealloc]; 17 + } 18 + 19 + @end
+413
scripts/ios-cmake/samples/hello-app/MainWindow.xib
··· 1 + <?xml version="1.0" encoding="UTF-8"?> 2 + <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> 3 + <data> 4 + <int key="IBDocument.SystemTarget">1056</int> 5 + <string key="IBDocument.SystemVersion">10K549</string> 6 + <string key="IBDocument.InterfaceBuilderVersion">823</string> 7 + <string key="IBDocument.AppKitVersion">1038.36</string> 8 + <string key="IBDocument.HIToolboxVersion">461.00</string> 9 + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> 10 + <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 11 + <string key="NS.object.0">132</string> 12 + </object> 13 + <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> 14 + <bool key="EncodedWithXMLCoder">YES</bool> 15 + </object> 16 + <object class="NSArray" key="IBDocument.PluginDependencies"> 17 + <bool key="EncodedWithXMLCoder">YES</bool> 18 + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 19 + </object> 20 + <object class="NSMutableDictionary" key="IBDocument.Metadata"> 21 + <bool key="EncodedWithXMLCoder">YES</bool> 22 + <object class="NSArray" key="dict.sortedKeys" id="0"> 23 + <bool key="EncodedWithXMLCoder">YES</bool> 24 + </object> 25 + <object class="NSMutableArray" key="dict.values"> 26 + <bool key="EncodedWithXMLCoder">YES</bool> 27 + </object> 28 + </object> 29 + <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> 30 + <bool key="EncodedWithXMLCoder">YES</bool> 31 + <object class="IBProxyObject" id="841351856"> 32 + <string key="IBProxiedObjectIdentifier">IBFilesOwner</string> 33 + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> 34 + </object> 35 + <object class="IBProxyObject" id="427554174"> 36 + <string key="IBProxiedObjectIdentifier">IBFirstResponder</string> 37 + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> 38 + </object> 39 + <object class="IBUICustomObject" id="664661524"> 40 + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> 41 + </object> 42 + <object class="IBUIWindow" id="117978783"> 43 + <nil key="NSNextResponder"/> 44 + <int key="NSvFlags">292</int> 45 + <string key="NSFrameSize">{320, 480}</string> 46 + <object class="NSColor" key="IBUIBackgroundColor"> 47 + <int key="NSColorSpace">1</int> 48 + <bytes key="NSRGB">MSAxIDEAA</bytes> 49 + </object> 50 + <bool key="IBUIOpaque">NO</bool> 51 + <bool key="IBUIClearsContextBeforeDrawing">NO</bool> 52 + <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> 53 + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> 54 + <bool key="IBUIResizesToFullScreen">YES</bool> 55 + </object> 56 + <object class="IBUIViewController" id="293664161"> 57 + <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> 58 + <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> 59 + <int key="interfaceOrientation">1</int> 60 + </object> 61 + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> 62 + <bool key="IBUIHorizontal">NO</bool> 63 + </object> 64 + </object> 65 + <object class="IBObjectContainer" key="IBDocument.Objects"> 66 + <object class="NSMutableArray" key="connectionRecords"> 67 + <bool key="EncodedWithXMLCoder">YES</bool> 68 + <object class="IBConnectionRecord"> 69 + <object class="IBCocoaTouchOutletConnection" key="connection"> 70 + <string key="label">rootViewController</string> 71 + <reference key="source" ref="117978783"/> 72 + <reference key="destination" ref="293664161"/> 73 + </object> 74 + <int key="connectionID">22</int> 75 + </object> 76 + <object class="IBConnectionRecord"> 77 + <object class="IBCocoaTouchOutletConnection" key="connection"> 78 + <string key="label">window</string> 79 + <reference key="source" ref="664661524"/> 80 + <reference key="destination" ref="117978783"/> 81 + </object> 82 + <int key="connectionID">23</int> 83 + </object> 84 + <object class="IBConnectionRecord"> 85 + <object class="IBCocoaTouchOutletConnection" key="connection"> 86 + <string key="label">delegate</string> 87 + <reference key="source" ref="841351856"/> 88 + <reference key="destination" ref="664661524"/> 89 + </object> 90 + <int key="connectionID">24</int> 91 + </object> 92 + </object> 93 + <object class="IBMutableOrderedSet" key="objectRecords"> 94 + <object class="NSArray" key="orderedObjects"> 95 + <bool key="EncodedWithXMLCoder">YES</bool> 96 + <object class="IBObjectRecord"> 97 + <int key="objectID">0</int> 98 + <reference key="object" ref="0"/> 99 + <reference key="children" ref="1000"/> 100 + <nil key="parent"/> 101 + </object> 102 + <object class="IBObjectRecord"> 103 + <int key="objectID">-1</int> 104 + <reference key="object" ref="841351856"/> 105 + <reference key="parent" ref="0"/> 106 + <string key="objectName">File's Owner</string> 107 + </object> 108 + <object class="IBObjectRecord"> 109 + <int key="objectID">3</int> 110 + <reference key="object" ref="664661524"/> 111 + <reference key="parent" ref="0"/> 112 + <string key="objectName">HelloApp App Delegate</string> 113 + </object> 114 + <object class="IBObjectRecord"> 115 + <int key="objectID">-2</int> 116 + <reference key="object" ref="427554174"/> 117 + <reference key="parent" ref="0"/> 118 + </object> 119 + <object class="IBObjectRecord"> 120 + <int key="objectID">12</int> 121 + <reference key="object" ref="117978783"/> 122 + <reference key="parent" ref="0"/> 123 + <string key="objectName">Window</string> 124 + </object> 125 + <object class="IBObjectRecord"> 126 + <int key="objectID">21</int> 127 + <reference key="object" ref="293664161"/> 128 + <reference key="parent" ref="0"/> 129 + </object> 130 + </object> 131 + </object> 132 + <object class="NSMutableDictionary" key="flattenedProperties"> 133 + <bool key="EncodedWithXMLCoder">YES</bool> 134 + <object class="NSArray" key="dict.sortedKeys"> 135 + <bool key="EncodedWithXMLCoder">YES</bool> 136 + <string>-1.CustomClassName</string> 137 + <string>-2.CustomClassName</string> 138 + <string>12.IBEditorWindowLastContentRect</string> 139 + <string>12.IBPluginDependency</string> 140 + <string>21.CustomClassName</string> 141 + <string>21.IBEditorWindowLastContentRect</string> 142 + <string>21.IBPluginDependency</string> 143 + <string>3.CustomClassName</string> 144 + <string>3.IBPluginDependency</string> 145 + </object> 146 + <object class="NSMutableArray" key="dict.values"> 147 + <bool key="EncodedWithXMLCoder">YES</bool> 148 + <string>UIApplication</string> 149 + <string>UIResponder</string> 150 + <string>{{525, 346}, {320, 480}}</string> 151 + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 152 + <string>HelloIOS</string> 153 + <string>{{651, 515}, {320, 480}}</string> 154 + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 155 + <string>HelloAppAppDelegate</string> 156 + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 157 + </object> 158 + </object> 159 + <object class="NSMutableDictionary" key="unlocalizedProperties"> 160 + <bool key="EncodedWithXMLCoder">YES</bool> 161 + <reference key="dict.sortedKeys" ref="0"/> 162 + <object class="NSMutableArray" key="dict.values"> 163 + <bool key="EncodedWithXMLCoder">YES</bool> 164 + </object> 165 + </object> 166 + <nil key="activeLocalization"/> 167 + <object class="NSMutableDictionary" key="localizations"> 168 + <bool key="EncodedWithXMLCoder">YES</bool> 169 + <reference key="dict.sortedKeys" ref="0"/> 170 + <object class="NSMutableArray" key="dict.values"> 171 + <bool key="EncodedWithXMLCoder">YES</bool> 172 + </object> 173 + </object> 174 + <nil key="sourceID"/> 175 + <int key="maxID">24</int> 176 + </object> 177 + <object class="IBClassDescriber" key="IBDocument.Classes"> 178 + <object class="NSMutableArray" key="referencedPartialClassDescriptions"> 179 + <bool key="EncodedWithXMLCoder">YES</bool> 180 + <object class="IBPartialClassDescription"> 181 + <string key="className">HelloAppAppDelegate</string> 182 + <string key="superclassName">NSObject</string> 183 + <object class="NSMutableDictionary" key="outlets"> 184 + <string key="NS.key.0">window</string> 185 + <string key="NS.object.0">UIWindow</string> 186 + </object> 187 + <object class="NSMutableDictionary" key="toOneOutletInfosByName"> 188 + <string key="NS.key.0">window</string> 189 + <object class="IBToOneOutletInfo" key="NS.object.0"> 190 + <string key="name">window</string> 191 + <string key="candidateClassName">UIWindow</string> 192 + </object> 193 + </object> 194 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 195 + <string key="majorKey">IBProjectSource</string> 196 + <string key="minorKey">HelloAppAppDelegate.h</string> 197 + </object> 198 + </object> 199 + <object class="IBPartialClassDescription"> 200 + <string key="className">HelloIOS</string> 201 + <string key="superclassName">UIViewController</string> 202 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 203 + <string key="majorKey">IBProjectSource</string> 204 + <string key="minorKey">HelloIOS.h</string> 205 + </object> 206 + </object> 207 + </object> 208 + <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+"> 209 + <bool key="EncodedWithXMLCoder">YES</bool> 210 + <object class="IBPartialClassDescription"> 211 + <string key="className">NSObject</string> 212 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 213 + <string key="majorKey">IBFrameworkSource</string> 214 + <string key="minorKey">Foundation.framework/Headers/NSError.h</string> 215 + </object> 216 + </object> 217 + <object class="IBPartialClassDescription"> 218 + <string key="className">NSObject</string> 219 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 220 + <string key="majorKey">IBFrameworkSource</string> 221 + <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string> 222 + </object> 223 + </object> 224 + <object class="IBPartialClassDescription"> 225 + <string key="className">NSObject</string> 226 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 227 + <string key="majorKey">IBFrameworkSource</string> 228 + <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string> 229 + </object> 230 + </object> 231 + <object class="IBPartialClassDescription"> 232 + <string key="className">NSObject</string> 233 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 234 + <string key="majorKey">IBFrameworkSource</string> 235 + <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string> 236 + </object> 237 + </object> 238 + <object class="IBPartialClassDescription"> 239 + <string key="className">NSObject</string> 240 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 241 + <string key="majorKey">IBFrameworkSource</string> 242 + <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string> 243 + </object> 244 + </object> 245 + <object class="IBPartialClassDescription"> 246 + <string key="className">NSObject</string> 247 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 248 + <string key="majorKey">IBFrameworkSource</string> 249 + <string key="minorKey">Foundation.framework/Headers/NSObject.h</string> 250 + </object> 251 + </object> 252 + <object class="IBPartialClassDescription"> 253 + <string key="className">NSObject</string> 254 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 255 + <string key="majorKey">IBFrameworkSource</string> 256 + <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string> 257 + </object> 258 + </object> 259 + <object class="IBPartialClassDescription"> 260 + <string key="className">NSObject</string> 261 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 262 + <string key="majorKey">IBFrameworkSource</string> 263 + <string key="minorKey">Foundation.framework/Headers/NSThread.h</string> 264 + </object> 265 + </object> 266 + <object class="IBPartialClassDescription"> 267 + <string key="className">NSObject</string> 268 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 269 + <string key="majorKey">IBFrameworkSource</string> 270 + <string key="minorKey">Foundation.framework/Headers/NSURL.h</string> 271 + </object> 272 + </object> 273 + <object class="IBPartialClassDescription"> 274 + <string key="className">NSObject</string> 275 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 276 + <string key="majorKey">IBFrameworkSource</string> 277 + <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string> 278 + </object> 279 + </object> 280 + <object class="IBPartialClassDescription"> 281 + <string key="className">NSObject</string> 282 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 283 + <string key="majorKey">IBFrameworkSource</string> 284 + <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string> 285 + </object> 286 + </object> 287 + <object class="IBPartialClassDescription"> 288 + <string key="className">NSObject</string> 289 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 290 + <string key="majorKey">IBFrameworkSource</string> 291 + <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string> 292 + </object> 293 + </object> 294 + <object class="IBPartialClassDescription"> 295 + <string key="className">NSObject</string> 296 + <object class="IBClassDescriptionSource" key="sourceIdentifier" id="405389679"> 297 + <string key="majorKey">IBFrameworkSource</string> 298 + <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string> 299 + </object> 300 + </object> 301 + <object class="IBPartialClassDescription"> 302 + <string key="className">UIApplication</string> 303 + <string key="superclassName">UIResponder</string> 304 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 305 + <string key="majorKey">IBFrameworkSource</string> 306 + <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string> 307 + </object> 308 + </object> 309 + <object class="IBPartialClassDescription"> 310 + <string key="className">UIResponder</string> 311 + <string key="superclassName">NSObject</string> 312 + <reference key="sourceIdentifier" ref="405389679"/> 313 + </object> 314 + <object class="IBPartialClassDescription"> 315 + <string key="className">UISearchBar</string> 316 + <string key="superclassName">UIView</string> 317 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 318 + <string key="majorKey">IBFrameworkSource</string> 319 + <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string> 320 + </object> 321 + </object> 322 + <object class="IBPartialClassDescription"> 323 + <string key="className">UISearchDisplayController</string> 324 + <string key="superclassName">NSObject</string> 325 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 326 + <string key="majorKey">IBFrameworkSource</string> 327 + <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string> 328 + </object> 329 + </object> 330 + <object class="IBPartialClassDescription"> 331 + <string key="className">UIView</string> 332 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 333 + <string key="majorKey">IBFrameworkSource</string> 334 + <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string> 335 + </object> 336 + </object> 337 + <object class="IBPartialClassDescription"> 338 + <string key="className">UIView</string> 339 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 340 + <string key="majorKey">IBFrameworkSource</string> 341 + <string key="minorKey">UIKit.framework/Headers/UITextField.h</string> 342 + </object> 343 + </object> 344 + <object class="IBPartialClassDescription"> 345 + <string key="className">UIView</string> 346 + <string key="superclassName">UIResponder</string> 347 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 348 + <string key="majorKey">IBFrameworkSource</string> 349 + <string key="minorKey">UIKit.framework/Headers/UIView.h</string> 350 + </object> 351 + </object> 352 + <object class="IBPartialClassDescription"> 353 + <string key="className">UIViewController</string> 354 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 355 + <string key="majorKey">IBFrameworkSource</string> 356 + <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string> 357 + </object> 358 + </object> 359 + <object class="IBPartialClassDescription"> 360 + <string key="className">UIViewController</string> 361 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 362 + <string key="majorKey">IBFrameworkSource</string> 363 + <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string> 364 + </object> 365 + </object> 366 + <object class="IBPartialClassDescription"> 367 + <string key="className">UIViewController</string> 368 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 369 + <string key="majorKey">IBFrameworkSource</string> 370 + <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string> 371 + </object> 372 + </object> 373 + <object class="IBPartialClassDescription"> 374 + <string key="className">UIViewController</string> 375 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 376 + <string key="majorKey">IBFrameworkSource</string> 377 + <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string> 378 + </object> 379 + </object> 380 + <object class="IBPartialClassDescription"> 381 + <string key="className">UIViewController</string> 382 + <string key="superclassName">UIResponder</string> 383 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 384 + <string key="majorKey">IBFrameworkSource</string> 385 + <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string> 386 + </object> 387 + </object> 388 + <object class="IBPartialClassDescription"> 389 + <string key="className">UIWindow</string> 390 + <string key="superclassName">UIView</string> 391 + <object class="IBClassDescriptionSource" key="sourceIdentifier"> 392 + <string key="majorKey">IBFrameworkSource</string> 393 + <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string> 394 + </object> 395 + </object> 396 + </object> 397 + </object> 398 + <int key="IBDocument.localizationMode">0</int> 399 + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> 400 + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> 401 + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string> 402 + <integer value="1056" key="NS.object.0"/> 403 + </object> 404 + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> 405 + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string> 406 + <integer value="3100" key="NS.object.0"/> 407 + </object> 408 + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> 409 + <string key="IBDocument.LastKnownRelativeProjectPath">..</string> 410 + <int key="IBDocument.defaultPropertyAccessControl">3</int> 411 + <string key="IBCocoaTouchPluginVersion">132</string> 412 + </data> 413 + </archive>
+9
scripts/ios-cmake/samples/hello-app/main.m
··· 1 + #import <UIKit/UIKit.h> 2 + 3 + int main(int argc, char *argv[]) 4 + { 5 + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 6 + int retVal = UIApplicationMain(argc, argv, nil, nil); 7 + [pool release]; 8 + return retVal; 9 + }
+26
scripts/ios-cmake/samples/hello-lib/CMakeLists.txt
··· 1 + # Standard setup 2 + cmake_minimum_required (VERSION 2.8) 3 + project (hello-lib CXX C) 4 + 5 + # Includes 6 + include_directories (${hello-lib_SOURCE_DIR}) 7 + 8 + # Source files 9 + set (SRC 10 + HelloWorld.cpp 11 + HelloIOS.mm 12 + ) 13 + 14 + # Headers 15 + set (HDR 16 + HelloWorld.h 17 + HelloIOS.h 18 + ) 19 + 20 + # Library 21 + add_library (hello-lib STATIC ${SRC} ${HDR}) 22 + 23 + # Installation 24 + set (CMAKE_INSTALL_PREFIX "${hello-lib_SOURCE_DIR}/../hello-app") 25 + install (TARGETS hello-lib DESTINATION .) 26 + install (FILES ${HDR} DESTINATION .)
+7
scripts/ios-cmake/samples/hello-lib/HelloIOS.h
··· 1 + #import <UIKit/UIKit.h> 2 + 3 + @interface HelloIOS:UIViewController 4 + 5 + - (NSString*)getHello; 6 + 7 + @end
+27
scripts/ios-cmake/samples/hello-lib/HelloIOS.mm
··· 1 + #import "HelloIOS.h" 2 + #include "HelloWorld.h" 3 + 4 + @implementation HelloIOS 5 + 6 + - (void)viewDidLoad{ 7 + UIView *view=[[UIView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame]; 8 + self.view=view; 9 + 10 + UILabel *label=[[UILabel alloc] initWithFrame:[UIScreen mainScreen].applicationFrame]; 11 + [self.view addSubview:label]; 12 + label.textAlignment=UITextAlignmentCenter; 13 + label.text=[self getHello]; 14 + [label release]; 15 + } 16 + 17 + - (NSString*)getHello{ 18 + HelloWorld h; 19 + NSString *text=[NSString stringWithUTF8String: h.helloWorld().c_str()]; 20 + return text; 21 + } 22 + 23 + - (void)dealloc{ 24 + [super dealloc]; 25 + } 26 + 27 + @end
+6
scripts/ios-cmake/samples/hello-lib/HelloWorld.cpp
··· 1 + #include "HelloWorld.h" 2 + 3 + string HelloWorld::helloWorld(){ 4 + string s("Hello World"); 5 + return s; 6 + }
+12
scripts/ios-cmake/samples/hello-lib/HelloWorld.h
··· 1 + #ifndef HELLOWORLD_H 2 + #define HELLOWORLD_H 3 + 4 + #include <string> 5 + using namespace std; 6 + 7 + class HelloWorld{ 8 + public: 9 + string helloWorld(); 10 + }; 11 + 12 + #endif
+131
scripts/ios-cmake/toolchain/iOS.cmake
··· 1 + # This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake 2 + # files which are included with CMake 2.8.4 3 + # It has been altered for iOS development 4 + 5 + # Options: 6 + # 7 + # IOS_PLATFORM = OS (default) or SIMULATOR 8 + # This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders 9 + # OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch. 10 + # SIMULATOR - used to build for the Simulator platforms, which have an x86 arch. 11 + # 12 + # CMAKE_IOS_DEVELOPER_ROOT = automatic(default) or /path/to/platform/Developer folder 13 + # By default this location is automatcially chosen based on the IOS_PLATFORM value above. 14 + # If set manually, it will override the default location and force the user of a particular Developer Platform 15 + # 16 + # CMAKE_IOS_SDK_ROOT = automatic(default) or /path/to/platform/Developer/SDKs/SDK folder 17 + # By default this location is automatcially chosen based on the CMAKE_IOS_DEVELOPER_ROOT value. 18 + # In this case it will always be the most up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path. 19 + # If set manually, this will force the use of a specific SDK version 20 + 21 + # Standard settings 22 + set (CMAKE_SYSTEM_NAME Darwin) 23 + set (CMAKE_SYSTEM_VERSION 1 ) 24 + set (UNIX True) 25 + set (APPLE True) 26 + set (IOS True) 27 + 28 + # Force the compilers to gcc for iOS 29 + include (CMakeForceCompiler) 30 + CMAKE_FORCE_C_COMPILER (gcc gcc) 31 + CMAKE_FORCE_CXX_COMPILER (g++ g++) 32 + 33 + # Skip the platform compiler checks for cross compiling 34 + set (CMAKE_CXX_COMPILER_WORKS TRUE) 35 + set (CMAKE_C_COMPILER_WORKS TRUE) 36 + 37 + # All iOS/Darwin specific settings - some may be redundant 38 + set (CMAKE_SHARED_LIBRARY_PREFIX "lib") 39 + set (CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") 40 + set (CMAKE_SHARED_MODULE_PREFIX "lib") 41 + set (CMAKE_SHARED_MODULE_SUFFIX ".so") 42 + set (CMAKE_MODULE_EXISTS 1) 43 + set (CMAKE_DL_LIBS "") 44 + 45 + set (CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") 46 + set (CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") 47 + set (CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") 48 + set (CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") 49 + 50 + # Hidden visibilty is required for cxx on iOS 51 + set (CMAKE_C_FLAGS "") 52 + set (CMAKE_CXX_FLAGS "-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden") 53 + 54 + set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") 55 + set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") 56 + 57 + set (CMAKE_PLATFORM_HAS_INSTALLNAME 1) 58 + set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names") 59 + set (CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names") 60 + set (CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") 61 + set (CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") 62 + set (CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") 63 + 64 + # hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree 65 + # (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache 66 + # and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun) 67 + # hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex 68 + if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) 69 + find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool) 70 + endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) 71 + 72 + # Setup iOS platform 73 + if (NOT DEFINED IOS_PLATFORM) 74 + set (IOS_PLATFORM "OS") 75 + endif (NOT DEFINED IOS_PLATFORM) 76 + set (IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform") 77 + 78 + # Check the platform selection and setup for developer root 79 + if (${IOS_PLATFORM} STREQUAL "OS") 80 + set (IOS_PLATFORM_LOCATION "iPhoneOS.platform") 81 + elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR") 82 + set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform") 83 + else (${IOS_PLATFORM} STREQUAL "OS") 84 + message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR") 85 + endif (${IOS_PLATFORM} STREQUAL "OS") 86 + 87 + # Setup iOS developer location 88 + if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT) 89 + set (CMAKE_IOS_DEVELOPER_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer") 90 + endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT) 91 + set (CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform") 92 + 93 + # Find and use the most recent iOS sdk 94 + if (NOT DEFINED CMAKE_IOS_SDK_ROOT) 95 + file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*") 96 + if (_CMAKE_IOS_SDKS) 97 + list (SORT _CMAKE_IOS_SDKS) 98 + list (REVERSE _CMAKE_IOS_SDKS) 99 + list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT) 100 + else (_CMAKE_IOS_SDKS) 101 + message (FATAL_ERROR "No iOS SDK's found in default seach path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.") 102 + endif (_CMAKE_IOS_SDKS) 103 + message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}") 104 + endif (NOT DEFINED CMAKE_IOS_SDK_ROOT) 105 + set (CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK") 106 + 107 + # Set the sysroot default to the most recent SDK 108 + set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support") 109 + 110 + # set the architecture for iOS - using ARCHS_STANDARD_32_BIT sets armv6,armv7 and appears to be XCode's standard. 111 + # The other value that works is ARCHS_UNIVERSAL_IPHONE_OS but that sets armv7 only 112 + set (CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_BIT)" CACHE string "Build architecture for iOS") 113 + 114 + # Set the find root to the iOS developer roots and to user defined paths 115 + set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root") 116 + 117 + # default to searching for frameworks first 118 + set (CMAKE_FIND_FRAMEWORK FIRST) 119 + 120 + # set up the default search directories for frameworks 121 + set (CMAKE_SYSTEM_FRAMEWORK_PATH 122 + ${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks 123 + ${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks 124 + ${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks 125 + ) 126 + 127 + # only search the iOS sdks, not the remainder of the host filesystem 128 + set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) 129 + set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 130 + set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 131 +
+3 -1
src/renderer_GLES_1.c
··· 12 12 13 13 // Most of the code pulled in from here... 14 14 #define SDL_GPU_USE_GLES 15 - #define SDL_GPU_USE_ARRAY_PIPELINE 16 15 #define SDL_GPU_GL_TIER 2 17 16 #define SDL_GPU_GLES_MAJOR_VERSION 1 17 + 18 + #define SDL_GPU_USE_ARRAY_PIPELINE 19 + #define SDL_GPU_DISABLE_TEXTURE_GETS 18 20 #define SDL_GPU_DISABLE_SHADERS 19 21 #define SDL_GPU_APPLY_TRANSFORMS_TO_GL_STACK 20 22 #define SDL_GPU_NO_VAO
+5 -3
src/renderer_GLES_2.c
··· 13 13 14 14 // Most of the code pulled in from here... 15 15 #define SDL_GPU_USE_GLES 16 + #define SDL_GPU_GL_TIER 3 17 + #define SDL_GPU_GLES_MAJOR_VERSION 2 18 + #define SDL_GPU_GLSL_VERSION 100 19 + 16 20 #define SDL_GPU_USE_BUFFER_PIPELINE 17 21 #ifdef __IPHONEOS__ 18 22 #define SDL_GPU_USE_BUFFER_RESET 19 23 #endif 20 24 #define SDL_GPU_SKIP_ENABLE_TEXTURE_2D 21 25 #define SDL_GPU_ASSUME_SHADERS 22 - #define SDL_GPU_GL_TIER 3 23 - #define SDL_GPU_GLSL_VERSION 100 24 - #define SDL_GPU_GLES_MAJOR_VERSION 2 26 + #define SDL_GPU_DISABLE_TEXTURE_GETS 25 27 #define SDL_GPU_NO_VAO 26 28 27 29 #include "renderer_GL_common.inl"
+6
src/renderer_GL_common.inl
··· 1889 1889 1890 1890 static GPU_Image* CreateImageUsingTexture(GPU_Renderer* renderer, Uint32 handle, Uint8 take_ownership) 1891 1891 { 1892 + #ifdef SDL_GPU_DISABLE_TEXTURE_GETS 1893 + GPU_PushErrorCode("GPU_CreateImageUsingTexture", GPU_ERROR_UNSUPPORTED_FUNCTION, "Renderer %s does not support this function", renderer->id.name); 1894 + return NULL; 1895 + #else 1896 + 1892 1897 GLint w, h; 1893 1898 GLuint num_layers, bytes_per_pixel; 1894 1899 GLint gl_format; ··· 2050 2055 result->texture_h = h; 2051 2056 2052 2057 return result; 2058 + #endif 2053 2059 } 2054 2060 2055 2061 static GPU_Image* LoadImage(GPU_Renderer* renderer, const char* filename)