Skip to content

Instantly share code, notes, and snippets.

@atinfinity
Last active May 7, 2020 15:23
Show Gist options
  • Save atinfinity/0b828222291992dd5873 to your computer and use it in GitHub Desktop.
Save atinfinity/0b828222291992dd5873 to your computer and use it in GitHub Desktop.
OpenCV 2.4.9 Makefile生成用スクリプトファイル(CentOS6.5)
#!/bin/bash
SOURCE_DIR="echo $(cd $(dirname $0);pwd)"
BUILD_DIR=${SOURCE_DIR}/build
GENERATOR_NAME="Unix Makefiles"
mkdir build
cd build
cmake \
-G "${GENERATOR_NAME}" \
--build ${BUILD_DIR} \
-D BUILD_DOCS=OFF \
-D BUILD_EXAMPLES=OFF \
-D BUILD_JASPER=OFF \
-D BUILD_JPEG=OFF \
-D BUILD_OPENEXR=OFF \
-D BUILD_PACKAGE=ON \
-D BUILD_PERF_TESTS=OFF \
-D BUILD_PNG=OFF \
-D BUILD_SHARED_LIBS=ON \
-D BUILD_TBB=OFF \
-D BUILD_TESTS=OFF \
-D BUILD_TIFF=OFF \
-D BUILD_WITH_DEBUG_INFO=ON \
-D BUILD_ZLIB=OFF \
-D BUILD_opencv_apps=ON \
-D BUILD_opencv_calib3d=ON \
-D BUILD_opencv_contrib=ON \
-D BUILD_opencv_core=ON \
-D BUILD_opencv_features2d=ON \
-D BUILD_opencv_flann=ON \
-D BUILD_opencv_gpu=OFF \
-D BUILD_opencv_highgui=ON \
-D BUILD_opencv_imgproc=ON \
-D BUILD_opencv_legacy=ON \
-D BUILD_opencv_ml=ON \
-D BUILD_opencv_nonfree=ON \
-D BUILD_opencv_objdetect=ON \
-D BUILD_opencv_photo=ON \
-D BUILD_opencv_stitching=ON \
-D BUILD_opencv_superres=ON \
-D BUILD_opencv_ts=ON \
-D BUILD_opencv_video=ON \
-D BUILD_opencv_videostab=ON \
-D BUILD_opencv_world=OFF \
-D CMAKE_BUILD_TYPE=Release \
-D WITH_1394=ON \
-D WITH_CUBLAS=OFF \
-D WITH_CUDA=OFF \
-D WITH_CUFFT=OFF \
-D WITH_EIGEN=ON \
-D WITH_FFMPEG=ON \
-D WITH_GIGEAPI=ON \
-D WITH_GSTREAMER=ON \
-D WITH_GTK=ON \
-D WITH_IPP=OFF \
-D WITH_JASPER=ON \
-D WITH_JPEG=ON \
-D WITH_LIBV4L=ON \
-D WITH_OPENCL=OFF \
-D WITH_OPENCLAMDBLAS=OFF \
-D WITH_OPENCLAMDFFT=OFF \
-D WITH_OPENEXR=ON \
-D WITH_OPENGL=OFF \
-D WITH_OPENMP=OFF \
-D WITH_OPENNI=OFF \
-D WITH_PNG=ON \
-D WITH_PVAPI=ON \
-D WITH_QT=OFF \
-D WITH_TBB=ON \
-D WITH_TIFF=ON \
-D WITH_UNICAP=OFF \
-D WITH_V4L=OFF \
-D WITH_VTK=OFF \
-D WITH_XIMEA=OFF \
-D WITH_XINE=OFF \
${SOURCE_DIR}
@atinfinity
Copy link
Author

OpenCV 2.4.9 Makefile生成用スクリプトファイル(CentOS6.5)

  1. OpenCV 2.4.9のルートディレクトリにopencv2.4.9_build-centos6.5.shをコピー
  2. コンソールを起動
  3. コンソールでOpenCV 2.4.9のルートディレクトリに移動
  4. opencv2.4.9_build-centos6.5.shを実行

という手順でMakefile生成を行うことができます(CMake GUIポチポチしたくない人向け).
設定やファイルパス等は適宜書き換えが必要です.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment