Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set opencv release mode with cmake

Tags:

opencv

cmake

It seems very easy when compiling opencv library for the release mode:

cmake -D CMAKE_BUILD_TYPE=RELEASE ../ 

or cmake DCMAKE_BUILD_TYPE:string=Release ../ However, the created project is still in Debug mode, and I was wondering how I could do in order to make the project in a release mode. Thanks.

like image 806
feelfree Avatar asked Nov 22 '25 02:11

feelfree


1 Answers

The configuration name is case-sensitive, and the CMake command line arg needs a - at the front. The arg type (i.e. string in your example) is optional, so the command should be:

cmake -DCMAKE_BUILD_TYPE=Release ..
like image 170
Fraser Avatar answered Nov 24 '25 22:11

Fraser