@@ -182,7 +182,7 @@ macro(ocv_add_module _name)
182
182
# add self to the world dependencies
183
183
if ((NOT DEFINED OPENCV_MODULE_IS_PART_OF_WORLD
184
184
AND NOT OPENCV_MODULE_${the_module}_CLASS STREQUAL "BINDINGS"
185
- AND NOT OPENCV_PROCESSING_EXTRA_MODULES
185
+ AND ( NOT OPENCV_PROCESSING_EXTRA_MODULES OR NOT OPENCV_WORLD_EXCLUDE_EXTRA_MODULES )
186
186
AND (NOT BUILD_SHARED_LIBS OR NOT "x${OPENCV_MODULE_TYPE} " STREQUAL "xSTATIC" ))
187
187
OR OPENCV_MODULE_IS_PART_OF_WORLD
188
188
)
@@ -233,7 +233,7 @@ macro(ocv_add_module _name)
233
233
endmacro ()
234
234
235
235
# excludes module from current configuration
236
- macro (ocv_module_disable module )
236
+ macro (ocv_module_disable_ module )
237
237
set (__modname ${module} )
238
238
if (NOT __modname MATCHES "^opencv_" )
239
239
set (__modname opencv_${module} )
@@ -246,9 +246,12 @@ macro(ocv_module_disable module)
246
246
# touch variable controlling build of the module to suppress "unused variable" CMake warning
247
247
endif ()
248
248
unset (__modname )
249
- return () # leave the current folder
250
249
endmacro ()
251
250
251
+ macro (ocv_module_disable module )
252
+ ocv_module_disable_ (${module} )
253
+ return () # leave the current folder
254
+ endmacro ()
252
255
253
256
# collect modules from specified directories
254
257
# NB: must be called only once!
@@ -724,8 +727,10 @@ endmacro()
724
727
# ocv_create_module(<extra link dependencies>)
725
728
# ocv_create_module()
726
729
macro (ocv_create_module )
727
- ocv_debug_message ("ocv_create_module(" ${ARGN} ")" )
728
- set (OPENCV_MODULE_${the_module}_LINK_DEPS "${OPENCV_MODULE_${the_module} _LINK_DEPS};${ARGN} " CACHE INTERNAL "" )
730
+ ocv_debug_message ("${the_module} : ocv_create_module(" ${ARGN} ")" )
731
+ if (NOT " ${ARGN} " STREQUAL " " )
732
+ set (OPENCV_MODULE_${the_module}_LINK_DEPS "${OPENCV_MODULE_${the_module} _LINK_DEPS};${ARGN} " CACHE INTERNAL "" )
733
+ endif ()
729
734
if (${BUILD_opencv_world} AND OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD )
730
735
# nothing
731
736
set (the_module_target opencv_world )
0 commit comments