-
Notifications
You must be signed in to change notification settings - Fork 48
CMakeBuild
Continuous integration is partially supported for this build using Github Actions. Please check Status for the build. If the build is ok, most probably problem is on your side. You can use workflow scripts as a reference
Build status for master_cmake branch without OpenCV built with ccpp.yaml
master_cmake -
master_cmake -
apimenov_http -
Build status for opencv_build_instructions branch
A word on prerequisites. Core of the project has no dependances and should work with C++14. Only prerequisite would be cmake. However if you only need core, you would have to comment out all the other sub-projects.
- Get git
sudo apt-get install git
- Get cmake
sudo apt-get install cmake
- Clone the repository
mkdir student cd student git clone https://github.com/PimenovAlexander/corecvs.git .
- Check if you have prerequisites installed (Qt should be Qt5)
sudo apt-get install qt5-default qt5-qmake gcc g++ sudo apt-get install libqt5serialport5-dev
I recommend installing them, it they are available they would be used automatically.
sudo apt-get install libjpeg-dev libpng-dev libgif-dev
sudo apt-get install libopenblas-dev liblapacke-dev
sudo apt-get install libfftw3-dev libsoapysdr-dev libevent-dev
I recommend installing them, otherwise you will have to switch them off using CMake GUI.
Ubuntu Xenial
sudo apt-get install libtbb-dev libcv-dev libhighgui-dev graphviz valgrind libxtst-dev sudo apt-get install libavcodec-dev libavutil-dev libavformat-dev libswscale-dev
Ubuntu Cosmic 18.10
sudo apt-get install libtbb-dev libopencv-*3.* graphviz valgrind libxtst-dev sudo apt-get install libavcodec-dev libavutil-dev libavformat-dev libswscale-dev
If you get error with qscript module you can add following packages
sudo apt-get install qtscript-tools qtscript5-dev
You will also need to build Google Test (http://askubuntu.com/questions/145887/why-no-library-files-installed-for-google-test), or switch off all tests. This step is done automatically with cmake.
In the root directory of the code please execute
mkdir build cd build cmake .. make
Or on all cores
mkdir build cd build cmake .. make -j
- Note that building with all cores may cause UI frees and performance degradations on some platforms, so you might want to use
make -j{number of your cores - 1}
as the last step
Currently we support OpenCV 3.X You could either build it yourself or install from repository - OpenCV guide
CMake allows you to configure your build. Type
ccmake .in root directory to see the options; hit
tto see advanced options.
- WITH_CUSTOM_CONFIGURATION - manually specify the instruction set to be used in generated code. When OFF, configuration will be auto-detected
- with_sse - allow the compiler and our code to use SSE instructions. Only works when WITH_CUSTOM_CONFIGURATION is ON
- with_sse3 - allow the compiler and our code to use SSE 3 instructions. Only works when WITH_CUSTOM_CONFIGURATION is ON
- with_sse4_1 - allow the compiler and our code to use SSE 4.1 instructions. Only works when WITH_CUSTOM_CONFIGURATION is ON
- with_sse4_2 - allow the compiler and our code to use SSE 4.2 instructions. Only works when WITH_CUSTOM_CONFIGURATION is ON
- with_avx - allow the compiler and our code to use AVX instructions. Only works when WITH_CUSTOM_CONFIGURATION is ON
- with_avx2 - allow the compiler and our code to use AVX 2 instructions. Only works when WITH_CUSTOM_CONFIGURATION is ON
- USE_TBB - whether should use TBB (Intel thread building blocks)
- USE_OPENBLAS - whether should use BLAS (OpenBlas or MKL)
- USE_OPENCV - whether should use OpenCV
- USE_AVCODEC - whether should use Avcodec
- USE_LIBGPEG - whether should use LibJpeg
- USE_LIBPNG - whether should use LibPng
- WITH_OPENGL - whether should use OpenGL
Cleaning might sometimes help to fix creepy errors. Options include:
-
Caution. Burn all non committed and not belonging to work copy to the ground.
git clean -dfx
- rm -rf build
Similar steps might work. The configuration will be auto-detected
Similar steps might work. The configuration will not be auto-detected, you may want to configure the processor architecture manually