Skip to content

Commit

Permalink
* Add build for linux-mips64el to presets for OpenCV (pull #621)
Browse files Browse the repository at this point in the history
  • Loading branch information
theaoqi authored and saudet committed Oct 12, 2018
1 parent 7cc7082 commit 9f1657d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ With the above in working order, the scripts get launched automatically as part
```bash
$ ANDROID_NDK=/path/to/android-ndk/ bash cppbuild.sh [-platform <name>] <install | clean> [projects]
```
where possible platform names are: `android-arm`, `android-x86`, `linux-x86`, `linux-x86_64`, `linux-armhf`, `linux-ppc64le` `macosx-x86_64`, `windows-x86`, `windows-x86_64`, etc. (The `ANDROID_NDK` variable is required only for Android builds.) Please note that the scripts download source archives from appropriate sites as necessary.
where possible platform names are: `android-arm`, `android-x86`, `linux-x86`, `linux-x86_64`, `linux-armhf`, `linux-ppc64le`, `linux-mips64el`, `macosx-x86_64`, `windows-x86`, `windows-x86_64`, etc. (The `ANDROID_NDK` variable is required only for Android builds.) Please note that the scripts download source archives from appropriate sites as necessary.

To compile binaries for an Android device with no FPU, first make sure this is what you want. Without FPU, the performance of either OpenCV or FFmpeg is bound to be unacceptable. If you still wish to continue down that road, then replace "armeabi-v7a" by "armeabi" and "-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16" with "-march=armv5te -mtune=xscale -msoft-float", inside various files.

Expand Down
7 changes: 7 additions & 0 deletions opencv/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ case $PLATFORM in
cp ../share/OpenCV/java/libopencv_java.so ../lib
sedinplace "s/.so.$OPENCV_VERSION/.so/g" ../share/OpenCV/OpenCVModules-release.cmake
;;
linux-mips64el)
CC="gcc -mabi=64" CXX="g++ -mabi=64" $CMAKE -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DCMAKE_INSTALL_LIBDIR="lib" $BUILD_X -DENABLE_PRECOMPILED_HEADERS=OFF $WITH_X -DWITH_OPENMP=ON $GPU_FLAGS -DCUDA_HOST_COMPILER=/usr/bin/g++ -DWITH_IPP=OFF $BUILD_CONTRIB_X
make -j $MAKEJ
make install/strip
cp ../share/OpenCV/java/libopencv_java.so ../lib
sedinplace "s/.so.$OPENCV_VERSION/.so/g" ../share/OpenCV/OpenCVModules-release.cmake
;;
macosx-*)
$CMAKE -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DCMAKE_INSTALL_LIBDIR="lib" $BUILD_X -DENABLE_PRECOMPILED_HEADERS=OFF $WITH_X -DWITH_OPENMP=OFF $GPU_FLAGS -DCUDA_HOST_COMPILER=/usr/bin/clang++ -DWITH_IPP=OFF $BUILD_CONTRIB_X -DCMAKE_CXX_FLAGS="-w"
make -j $MAKEJ
Expand Down

0 comments on commit 9f1657d

Please sign in to comment.