moved iOS part to platforms folder
authorAlexander Shishkov <alexander.shishkov@itseez.com>
Tue, 18 Jun 2013 20:20:21 +0000 (00:20 +0400)
committerAlexander Shishkov <alexander.shishkov@itseez.com>
Tue, 18 Jun 2013 20:20:21 +0000 (00:20 +0400)
doc/tutorials/introduction/ios_install/ios_install.rst
ios/configure-device_xcode.sh [deleted file]
ios/configure-simulator_xcode.sh [deleted file]
ios/readme.txt [deleted file]
platforms/ios/Info.plist.in [moved from ios/Info.plist.in with 93% similarity]
platforms/ios/build_framework.py [moved from ios/build_framework.py with 95% similarity]
platforms/ios/cmake/Modules/Platform/iOS.cmake [moved from ios/cmake/Modules/Platform/iOS.cmake with 100% similarity]
platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake [moved from ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake with 80% similarity]
platforms/ios/cmake/Toolchains/Toolchain-iPhoneSimulator_Xcode.cmake [moved from ios/cmake/Toolchains/Toolchain-iPhoneSimulator_Xcode.cmake with 80% similarity]
platforms/ios/readme.txt [new file with mode: 0644]

index ace657b..8d117a0 100644 (file)
@@ -37,7 +37,7 @@ Building OpenCV from Source, using CMake and Command Line
     .. code-block:: bash
 
        cd ~/<my_working_directory>
-       python opencv/ios/build_framework.py ios
+       python opencv/platforms/ios/build_framework.py ios
 
 If everything's fine, a few minutes later you will get ~/<my_working_directory>/ios/opencv2.framework. You can add this framework to your Xcode projects.
 
diff --git a/ios/configure-device_xcode.sh b/ios/configure-device_xcode.sh
deleted file mode 100755 (executable)
index 8c28a3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmake -GXcode -DCMAKE_TOOLCHAIN_FILE=../opencv/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake -DCMAKE_INSTALL_PREFIX=../OpenCV_iPhoneOS ../opencv 
diff --git a/ios/configure-simulator_xcode.sh b/ios/configure-simulator_xcode.sh
deleted file mode 100755 (executable)
index 50e0026..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmake -GXcode -DCMAKE_TOOLCHAIN_FILE=../opencv/ios/cmake/Toolchains/Toolchain-iPhoneSimulator_Xcode.cmake -DCMAKE_INSTALL_PREFIX=../OpenCV_iPhoneSimulator ../opencv 
diff --git a/ios/readme.txt b/ios/readme.txt
deleted file mode 100644 (file)
index 1441b24..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-Assuming that your build directory is on the same level that opencv source,
-From the build directory run
-  ../opencv/ios/configure-device_xcode.sh
-or
-  ../opencv/ios/configure-simulator_xcode.sh
-
-Then from the same folder invoke
-
-xcodebuild -sdk iphoneos -configuration Release -target ALL_BUILD
-xcodebuild -sdk iphoneos -configuration Release -target install install
-
-or
-
-xcodebuild -sdk iphonesimulator -configuration Release -target ALL_BUILD
-xcodebuild -sdk iphonesimulator -configuration Release -target install install
\ No newline at end of file
similarity index 93%
rename from ios/Info.plist.in
rename to platforms/ios/Info.plist.in
index 89ef386..012de88 100644 (file)
@@ -5,7 +5,7 @@
     <key>CFBundleName</key>
     <string>OpenCV</string>
     <key>CFBundleIdentifier</key>
-    <string>com.itseez.opencv</string>
+    <string>opencv.org</string>
     <key>CFBundleVersion</key>
     <string>${VERSION}</string>
     <key>CFBundleShortVersionString</key>
similarity index 95%
rename from ios/build_framework.py
rename to platforms/ios/build_framework.py
index ceef4b7..bc385bb 100755 (executable)
@@ -38,7 +38,7 @@ def build_opencv(srcroot, buildroot, target, arch):
     # for some reason, if you do not specify CMAKE_BUILD_TYPE, it puts libs to "RELEASE" rather than "Release"
     cmakeargs = ("-GXcode " +
                 "-DCMAKE_BUILD_TYPE=Release " +
-                "-DCMAKE_TOOLCHAIN_FILE=%s/ios/cmake/Toolchains/Toolchain-%s_Xcode.cmake " +
+                "-DCMAKE_TOOLCHAIN_FILE=%s/platforms/ios/cmake/Toolchains/Toolchain-%s_Xcode.cmake " +
                 "-DBUILD_opencv_world=ON " +
                 "-DCMAKE_INSTALL_PREFIX=install") % (srcroot, target)
     # if cmake cache exists, just rerun cmake to update OpenCV.xproj if necessary
@@ -92,16 +92,13 @@ def put_framework_together(srcroot, dstroot):
     os.system("lipo -create " + wlist + " -o " + dstdir + "/opencv2")
 
     # form Info.plist
-    srcfile = open(srcroot + "/ios/Info.plist.in", "rt")
+    srcfile = open(srcroot + "/platforms/ios/Info.plist.in", "rt")
     dstfile = open(dstdir + "/Resources/Info.plist", "wt")
     for l in srcfile.readlines():
         dstfile.write(l.replace("${VERSION}", opencv_version))
     srcfile.close()
     dstfile.close()
 
-    # copy cascades
-    # TODO ...
-
     # make symbolic links
     os.symlink("A", "Versions/Current")
     os.symlink("Versions/Current/Headers", "Headers")
@@ -125,4 +122,4 @@ if __name__ == "__main__":
         print "Usage:\n\t./build_framework.py <outputdir>\n\n"
         sys.exit(0)
 
-    build_framework(os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")), os.path.abspath(sys.argv[1]))
\ No newline at end of file
+    build_framework(os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../..")), os.path.abspath(sys.argv[1]))
\ No newline at end of file
@@ -4,12 +4,12 @@ set (IPHONEOS TRUE)
 # Standard settings
 set (CMAKE_SYSTEM_NAME iOS)
 # Include extra modules for the iOS platform files
-set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/ios/cmake/Modules")
+set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/platforms/ios/cmake/Modules")
 
-# Force the compilers to gcc for iOS
+# Force the compilers to clang for iOS
 include (CMakeForceCompiler)
-#CMAKE_FORCE_C_COMPILER (gcc gcc)
-#CMAKE_FORCE_CXX_COMPILER (g++ g++)
+#CMAKE_FORCE_C_COMPILER (clang GNU)
+#CMAKE_FORCE_CXX_COMPILER (clang++ GNU)
 
 set (CMAKE_C_SIZEOF_DATA_PTR 4)
 set (CMAKE_C_HAS_ISYSROOT 1)
@@ -4,12 +4,12 @@ set (IPHONESIMULATOR TRUE)
 # Standard settings
 set (CMAKE_SYSTEM_NAME iOS)
 # Include extra modules for the iOS platform files
-set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/ios/cmake/Modules")
+set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/platforms/ios/cmake/Modules")
 
-# Force the compilers to gcc for iOS
+# Force the compilers to clang for iOS
 include (CMakeForceCompiler)
-#CMAKE_FORCE_C_COMPILER (gcc gcc)
-#CMAKE_FORCE_CXX_COMPILER (g++ g++)
+#CMAKE_FORCE_C_COMPILER (clang GNU)
+#CMAKE_FORCE_CXX_COMPILER (clang++ GNU)
 
 set (CMAKE_C_SIZEOF_DATA_PTR 4)
 set (CMAKE_C_HAS_ISYSROOT 1)
diff --git a/platforms/ios/readme.txt b/platforms/ios/readme.txt
new file mode 100644 (file)
index 0000000..8f1f206
--- /dev/null
@@ -0,0 +1,7 @@
+Building OpenCV from Source, using CMake and Command Line
+=========================================================
+
+cd ~/<my_working_directory>
+python opencv/platforms/ios/build_framework.py ios
+
+If everything's fine, a few minutes later you will get ~/<my_working_directory>/ios/opencv2.framework. You can add this framework to your Xcode projects.
\ No newline at end of file