Ask Your Question
1

How to specify modules with CMake?

asked 2015-01-20 02:48:39 -0500

DevYourWorld gravatar image

Hello,

I'm not a very huge CMake user, and the OpenCV CMakeList seems too huge to retro-engeneer it. What I want to do is to build a minimal version of OpenCV in order to use the cv::solvePnP method ( https://github.com/Itseez/opencv/blob... ). So, I want to build an OpenCV version just with "core" and "calib3d" modules. This version has to work on iOS and Android, so I though I had to modify the python script ( https://github.com/Itseez/opencv/blob... ). My problem is that the CMakeLists are so huge I can't even see what to add/modify in the script.

Does someone has an answer?

edit retag flag offensive close merge delete

Comments

Okay, that solved my problem, thank you very much! :) How can I mark it as solved when a comment solved my problem?

DevYourWorld gravatar imageDevYourWorld ( 2015-01-20 06:00:01 -0500 )edit

I switched it to an answer ;)

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-20 06:42:36 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
3

answered 2015-01-20 02:52:16 -0500

hmm keep in mind that the calib3d will use other functionality of OpenCV so just using those two modules won't work I think. As for building only stuff you need, that is simply. with your CMAKE command add -BUILD_opencv_imgproc=OFF for each module that you do NOT want to build. Normally it should report if dependencies occur!

edit flag offensive delete link more
1

answered 2015-01-20 03:48:49 -0500

You can also use ccmake (if you are a linux user) which will help you to select the feature you want (or not)... There is also a beautiful graphic interface (cmake-gui), depending the version you have installed...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-01-20 02:48:39 -0500

Seen: 2,309 times

Last updated: Jan 20 '15