How to set CMake options to compile some modules only?
We can set the options like the following to compile some but not others:
-DBUILD_opencv_xfeatures2d=ON
-DBUILD_opencv_apps=OFF
As the above, my understanding is xfeatures2d
will be compiled (The Makefiles will set it as a target for compilation) and apps
definitely not, but other modules haven't specified in the options will be compiled by default. However, if apps
is required
for xfeatures2d
then xfeatures
won't be compiled and cmake
output will warning this.
What the problems with the above understanding ?
Is there a way to say compile xfeatures2d
and the modules it required only ?
Furthermore, is there a way to say compile xfeatures2d
and the modules it required and optionally required ones?
How about the WITH
options, like -DWITH_1394=OFF
, what is the default values for them ? Or, by default, it depends on the environment its running on? For instance, if CMake can find all (local) libraries needed for CUDA, -DWITH_CUDA
will be ON
by default.