OSDN Git Service

minor ios fixups
authorbadlogic <badlogicgames@gmail.com>
Fri, 31 May 2013 02:26:33 +0000 (04:26 +0200)
committerbadlogic <badlogicgames@gmail.com>
Fri, 31 May 2013 02:26:33 +0000 (04:26 +0200)
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/BuildTarget.java
gdx/jni/build-ios32.xml
gdx/jni/iosgl/iosgl20.cpp

index 2e844f4..c88d7e8 100644 (file)
@@ -138,8 +138,8 @@ public class BuildTarget {
                        // iOS, 386 simulator and armv7a, compiled to fat static lib\r
                        BuildTarget ios = new BuildTarget(TargetOs.IOS, false, new String[] {"**/*.c"}, new String[0],\r
                                new String[] {"**/*.cpp"}, new String[0], new String[0], "",\r
-                               "-c -Wall -O2",\r
-                               "-c -Wall -O2",\r
+                               "-c -Wall -O2 -miphoneos-version-min=5.1",\r
+                               "-c -Wall -O2 -miphoneos-version-min=5.1",\r
                                "rcs");\r
                        return ios;\r
                }\r
index 35fa678..c4fd0e8 100755 (executable)
@@ -18,7 +18,7 @@
        \r
        <!-- define gcc compiler, options and files to compile -->\r
        <property name="gcc" value="${compilerPrefix}gcc"/>     \r
-       <property name="gcc-opts" value="-c -Wall -O2"/>\r
+       <property name="gcc-opts" value="-c -Wall -O2 -miphoneos-version-min=5.1"/>\r
        <fileset id="gcc-files" dir="./">\r
                <exclude name="target/"/>               \r
                                <include name="memcpy_wrap.c"/>
@@ -29,7 +29,7 @@
        \r
        <!-- define g++ compiler, options and files to compile -->\r
        <property name="g++" value="${compilerPrefix}g++"/>\r
-       <property name="g++-opts" value="-c -Wall -O2"/>\r
+       <property name="g++-opts" value="-c -Wall -O2 -miphoneos-version-min=5.1"/>\r
        <fileset id="g++-files" dir="./">\r
                <exclude name="target/"/>\r
                                <include name="**/*.cpp"/>
index 9582a38..8f62b22 100644 (file)
@@ -1,5 +1,7 @@
+#ifdef __APPLE__
+#include <TargetConditionals.h>
 #ifdef TARGET_OS_IPHONE
-#include <iosgles20.h>
+#include <iosgl/iosgl20.h>
 #include <OpenGLES/ES2/gl.h>
 #include <OpenGLES/ES2/glext.h>
 #include <stdio.h>
@@ -1765,3 +1767,4 @@ JNIEXPORT void JNICALL Java_com_badlogic_gdx_backends_iosrobovm_IOSGLES20_glView
        glViewport( x, y, width, height );
 }
 #endif
+#endif