0026869: Documentation - simplify "Building with CMake and ADT on Android" article
authoribs <ibs@opencascade.com>
Fri, 13 Nov 2015 13:51:47 +0000 (16:51 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 19 Nov 2015 11:46:54 +0000 (14:46 +0300)
ADT using removed. GNU make using added

Small corrections of title and image in documentation.

dox/dev_guides/building/android/images/android_image007.png [deleted file]
dox/dev_guides/building/android/images/android_image008.png [deleted file]
dox/dev_guides/building/android/images/android_image009.png [deleted file]
dox/dev_guides/building/android/images/android_image010.png [deleted file]

index 5408eff..f6b8155 100644 (file)
@@ -1,19 +1,21 @@
-Building with CMake and ADT for Android {#occt_dev_guides__building_android}
+Building with CMake for Android {#occt_dev_guides__building_android}
-This file describes the steps to build OCCT libraries from a complete source package
-with following tools:
-  - Generation of eclipse project files
-    - CMake v3.0+ http://www.cmake.org/cmake/resources/software.html
-    - Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake
-    - Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
-    - Make: MinGW v4.82+ for Windows, GNU Make vXX for Linux. http://sourceforge.net/projects/mingw/files/
-  - Building eclipse project files of OCCT
-    - Android Developer Tools (ADT) v22+ https://developer.android.com/sdk/index.html
-## Generation of eclipse project files
+This article describes the steps to build OCCT libraries for Android from a complete source package
+with GNU make (makefiles) on Windows 7 and Ubuntu 15.10.
+The steps on Windows and Ubuntu are similar. There is the only one difference: makefiles are built with mingw32-make
+on Windows and native GNU make on Ubuntu.
+Required tools (download and install if it is required):
+  - CMake v3.0+ http://www.cmake.org/cmake/resources/software.html
+  - Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake
+  - Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html
+  - GNU Make: MinGW v4.82+ for Windows (http://sourceforge.net/projects/mingw/files/), GNU Make 4.0 for Ubuntu. 
+## Generation of makefiles
 Run GUI tool provided by CMake: cmake-gui
 ### Tools configuration
@@ -22,21 +24,23 @@ Run GUI tool provided by CMake: cmake-gui
-Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project. - 
+Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project.
-Select "Eclipse CDT4 - MinGW MakeFiles" item from the list
+Select "MinGW MakeFiles" item from the list
   - Choose "Specify toolchain file for cross-compiling"
   - Click "Next"
-  - Specify the Toolchain file at next dialog by android.toolchain.cmake is contained by cross-compilation toolchain for CMake
+  - Specify a toolchain file at the next dialog by android.toolchain.cmake . It is contained by cross-compilation toolchain for CMake
   - Click "Finish"
-Add cache entry ANDROID_NDK - path (entry type is PATH) to the NDK folder ("Add Entry" button)
+If ANDROID_NDK environment variable is not defined in current OS, add cache entry ANDROID_NDK (entry type is PATH) - path to the NDK folder ("Add Entry" button)
-if there is message "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool."  
-Define CMAKE_MAKE_PROGRAM variable with the file path to mingw32-make executable. 
+If on Windows the message is appeared: "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles"
+CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.",
+specify **CMAKE_MAKE_PROGRAM** to mingw32-make executable.
 ### OCCT Configuration
@@ -45,27 +49,36 @@ How to configure OCCT, see "OCCT Configuration" section of @ref occt_dev_guides_
 taking into account the specific configuration variables for android:
   - ANDROID_ABI = armeabi-v7a
-  - CMAKE_ECLIPSE_VERSION is equal to installed eclipse version (e.g., 4.2)
-Configure parallel building:
-  - CMAKE_ECLIPSE_MAKE_ARGUMENTS = -jN where N = your numbers of CPU cores (threads)
+  - ANDROID_NDK_LAYOUT is equal to CMAKE_BUILD_TYPE variable
+  - **BUILD_MODULE_Draw = OFF**
-### Generation of eclipse projects files
+### Generation of makefiles
 Click **Generate** button and wait until the generation process is finished. 
-Then the eclipse project files will appear in the build folder (e.g. <i> D:/android-build-eclipse-api-15 </i>).
+Then makefiles will appear in the build folder (e.g. <i> D:/tmp/occt-android </i>).
-## Building eclipse project files of OCCT
+## Building makefiles of OCCT
-  - Open eclipse (downloaded ADT bundle contains it)
-  @figure{/dev_guides/building/android/images/android_image007.png}
-  - Import "Existing project into Workspace"
-  @figure{/dev_guides/building/android/images/android_image008.png}
-  @figure{/dev_guides/building/android/images/android_image009.png}
-  - Build ALL
-  @figure{/dev_guides/building/android/images/android_image010.png}
-When the building process has finished, libraries are located in \<build folder\>/out (e.g. <i> D:/android-build-eclipse-api-15/out </i>).
\ No newline at end of file
+Open console and go to the build folder. Type "mingw32-make" (Windows) or "make" (Ubuntu) to start build process.
+> mingw32-make
+> make
+Parallel building can be started with using **"-jN"** argument of "mingw32-make/make", where N is the number of building threads.
+> mingw32-make -j4
+> make -j4
+## Install built OCCT libraries
+Type "mingw32-make/make" with argument "install" to place the libraries 
+to the install folder (see "OCCT Configuration" section of @ref occt_dev_guides__building_cmake "Building with CMake")
+> mingw32-make install
+> make install
index 55d5183..b5c047e 100644 (file)
Binary files a/dox/dev_guides/building/android/images/android_image001.png and b/dox/dev_guides/building/android/images/android_image001.png differ
index c731f9f..64d002d 100644 (file)
Binary files a/dox/dev_guides/building/android/images/android_image002.png and b/dox/dev_guides/building/android/images/android_image002.png differ
index d18843c..1add49f 100644 (file)
Binary files a/dox/dev_guides/building/android/images/android_image005.png and b/dox/dev_guides/building/android/images/android_image005.png differ
index efedc15..d9d9ff4 100644 (file)
Binary files a/dox/dev_guides/building/android/images/android_image006.png and b/dox/dev_guides/building/android/images/android_image006.png differ
diff --git a/dox/dev_guides/building/android/images/android_image007.png b/dox/dev_guides/building/android/images/android_image007.png
deleted file mode 100644 (file)
index 410e8dc..0000000
Binary files a/dox/dev_guides/building/android/images/android_image007.png and /dev/null differ
diff --git a/dox/dev_guides/building/android/images/android_image008.png b/dox/dev_guides/building/android/images/android_image008.png
deleted file mode 100644 (file)
index 40446e4..0000000
Binary files a/dox/dev_guides/building/android/images/android_image008.png and /dev/null differ
diff --git a/dox/dev_guides/building/android/images/android_image009.png b/dox/dev_guides/building/android/images/android_image009.png
deleted file mode 100644 (file)
index 5c3fa6c..0000000
Binary files a/dox/dev_guides/building/android/images/android_image009.png and /dev/null differ
diff --git a/dox/dev_guides/building/android/images/android_image010.png b/dox/dev_guides/building/android/images/android_image010.png
deleted file mode 100644 (file)
index c56621a..0000000
Binary files a/dox/dev_guides/building/android/images/android_image010.png and /dev/null differ
index 2dfd3fc..bc54a24 100644 (file)
@@ -17,7 +17,7 @@ you need to:
 2. Build using your preferred build tool.
    - \subpage occt_dev_guides__building_automake "Building on Linux with Autotools"
    - \subpage occt_dev_guides__building_cmake "Building with CMake (cross-platform)"
-   - \subpage occt_dev_guides__building_android "Building with CMake and ADT for Android (cross-platform)"
+   - \subpage occt_dev_guides__building_android "Building with CMake for Android (cross-platform)"
    - \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks"
    - \subpage occt_dev_guides__building_msvc "Building on Windows with MS Visual Studio"
    - \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode"