You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#set iphone arch and flags taken from http://sites.google.com/site/michaelsafyan/coding/resources/how-to-guides/cross-compile-for-the-iphone/how-to-cross-compile-for-the-iphone-using-cmake
84
+
IF(OSG_BUILD_PLATFORM_IPHONE)
85
+
SET(CMAKE_OSX_ARCHITECTURES"armv7"CACHESTRING"Build architectures for iOS"FORCE)
86
+
SET(CMAKE_CXX_FLAGS"${CMAKE_CXX_FLAGS} -miphoneos-version-min=5.1 -mno-thumb -arch armv7 -pipe -no-cpp-precomp"CACHESTRING"Flags used by the compiler during all build types."FORCE)
87
+
ELSE()
88
+
#simulator uses i386 architectures
89
+
SET(CMAKE_OSX_ARCHITECTURES"i386"CACHESTRING"Build architectures for iOS Simulator"FORCE)
90
+
SET(CMAKE_CXX_FLAGS"${CMAKE_CXX_FLAGS} -mno-thumb -arch i386 -pipe -no-cpp-precomp"CACHESTRING"Flags used by the compiler during all build types."FORCE)
91
+
ENDIF()
92
+
93
+
#here we set the specific iphone sdk version. We can only set either device or simulator sdk. So if you want both you currently have to have two seperate projects
94
+
SET(CMAKE_OSX_SYSROOT"${IPHONE_SDKROOT}"CACHESTRING"System root for iOS"FORCE)
95
+
96
+
#hack, force link to opengles
97
+
set(CMAKE_EXE_LINKER_FLAGS"-framework Foundation -framework OpenGLES")
98
+
99
+
#use the IPhone windowing system
100
+
SET(OSG_WINDOWING_SYSTEM"IOS"CACHESTRING"Forced IPhone windowing system on iOS"FORCE)
101
+
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX"imageio"CACHESTRING"Forced imageio default image plugin for iOS"FORCE)
102
+
103
+
#I think this or similar will be required for IPhone apps
104
+
OPTION(OSG_BUILD_APPLICATION_BUNDLES"Enable the building of applications and examples as OSX Bundles"ON)
#set iphone arch and flags taken from http://sites.google.com/site/michaelsafyan/coding/resources/how-to-guides/cross-compile-for-the-iphone/how-to-cross-compile-for-the-iphone-using-cmake
160
-
IF(OSG_BUILD_PLATFORM_IPHONE)
161
-
SET(CMAKE_OSX_ARCHITECTURES"armv7"CACHESTRING"Build architectures for iOS"FORCE)
162
-
SET(CMAKE_CXX_FLAGS"${CMAKE_CXX_FLAGS} -miphoneos-version-min=5.1 -mno-thumb -arch armv7 -pipe -no-cpp-precomp"CACHESTRING"Flags used by the compiler during all build types."FORCE)
163
-
ELSE()
164
-
#simulator uses i386 architectures
165
-
SET(CMAKE_OSX_ARCHITECTURES"i386"CACHESTRING"Build architectures for iOS Simulator"FORCE)
166
-
SET(CMAKE_CXX_FLAGS"${CMAKE_CXX_FLAGS} -mno-thumb -arch i386 -pipe -no-cpp-precomp"CACHESTRING"Flags used by the compiler during all build types."FORCE)
167
-
ENDIF()
168
-
169
-
#here we set the specific iphone sdk version. We can only set either device or simulator sdk. So if you want both you currently have to have two seperate projects
170
-
SET(CMAKE_OSX_SYSROOT"${IPHONE_SDKROOT}"CACHESTRING"System root for iOS"FORCE)
171
-
172
-
#hack, force link to opengles
173
-
set(CMAKE_EXE_LINKER_FLAGS"-framework Foundation -framework OpenGLES")
174
-
175
-
#use the IPhone windowing system
176
-
SET(OSG_WINDOWING_SYSTEM"IOS"CACHESTRING"Forced IPhone windowing system on iOS"FORCE)
177
-
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX"imageio"CACHESTRING"Forced imageio default image plugin for iOS"FORCE)
178
-
179
-
#I think this or similar will be required for IPhone apps
180
-
OPTION(OSG_BUILD_APPLICATION_BUNDLES"Enable the building of applications and examples as OSX Bundles"ON)
0 commit comments