@ -72,17 +72,13 @@ macro(ocv_add_dependencies full_modname)
list ( APPEND ${ __depsvar } "${d}" )
endif ( )
endforeach ( )
unset ( __depsvar )
ocv_list_unique ( OPENCV_MODULE_ ${ full_modname } _REQ_DEPS )
ocv_list_unique ( OPENCV_MODULE_ ${ full_modname } _OPT_DEPS )
if ( OPENCV_MODULE_ ${ full_modname } _REQ_DEPS )
list ( REMOVE_DUPLICATES OPENCV_MODULE_ ${ full_modname } _REQ_DEPS )
endif ( )
if ( OPENCV_MODULE_ ${ full_modname } _OPT_DEPS )
list ( REMOVE_DUPLICATES OPENCV_MODULE_ ${ full_modname } _OPT_DEPS )
endif ( )
set ( OPENCV_MODULE_ ${ full_modname } _REQ_DEPS ${ OPENCV_MODULE_${full_modname } _REQ_DEPS} CACHE INTERNAL "Required dependencies of ${full_modname} module" )
set ( OPENCV_MODULE_ ${ full_modname } _OPT_DEPS ${ OPENCV_MODULE_${full_modname } _OPT_DEPS} CACHE INTERNAL "Optional dependencies of ${full_modname} module" )
unset ( __depsvar )
endmacro ( )
# d e c l a r e n e w O p e n C V m o d u l e i n c u r r e n t f o l d e r
@ -105,19 +101,22 @@ macro(ocv_add_module _name)
" )
endif ( )
# r e m e m b e r m o d u l e d e t a i l s
if ( NOT DEFINED the_description )
set ( the_description "The ${name} OpenCV module" )
endif ( )
set ( OPENCV_MODULE_ ${ the_module } _DESCRIPTION "${the_description}" CACHE INTERNAL "Brief description of ${the_module} module" )
set ( OPENCV_MODULE_ ${ the_module } _LOCATION "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "Location of ${the_module} module sources" )
# c r e a t e o p t i o n t o e n a b l e / d i s a b l e t h i s m o d u l e
if ( NOT DEFINED BUILD_ ${ the_module } _INIT )
set ( BUILD_ ${ the_module } _INIT ON )
endif ( )
# c r e a t e o p t i o n t o e n a b l e / d i s a b l e t h i s m o d u l e
option ( BUILD_ ${ the_module } "Include ${the_module} module into the OpenCV build" ${ BUILD_${the_module } _INIT} )
# r e m e m b e r t h e m o d u l e d e t a i l s
set ( OPENCV_MODULE_ ${ the_module } _DESCRIPTION "${the_description}" CACHE INTERNAL "Brief description of ${the_module} module" )
set ( OPENCV_MODULE_ ${ the_module } _LOCATION "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "Location of ${the_module} module sources" )
# p a r s e l i s t o f d e p e n d e n c i e s
if ( "${ARGV1}" STREQUAL "INTERNAL" OR "${ARGV1}" STREQUAL "BINDINGS" )
set ( OPENCV_MODULE_ ${ the_module } _CLASS "${ARGV1}" CACHE INTERNAL "The cathegory of the module" )
set ( __ocv_argn__ ${ ARGN } )
@ -143,28 +142,19 @@ macro(ocv_add_module _name)
set ( OPENCV_MODULES_DISABLED_USER ${ OPENCV_MODULES_DISABLED_USER } "${the_module}" CACHE INTERNAL "List of OpenCV modules explicitly disabled by user" )
endif ( )
# T O D O : a d d s u b m o d u l e s i f a n y
# T O D O : a d d s u b m o d u l e s i f a n y
# s t o p p r o c e s s i n g o f c u r r e n t f i l e
# s t o p p r o c e s s i n g o f c u r r e n t f i l e
return ( )
else ( OPENCV_INITIAL_PASS )
if ( NOT BUILD_ ${ the_module } )
# e x t r a p r o t e c t i o n f r o m r e d e f i n i t i o n
return ( )
return ( ) # e x t r a p r o t e c t i o n f r o m r e d e f i n i t i o n
endif ( )
project ( ${ the_module } )
endif ( OPENCV_INITIAL_PASS )
endmacro ( )
# I n t e r n a l m a c r o ; d i s a b l e s O p e n C V m o d u l e
# ocv_module_turn_off ( <module name> )
macro ( __ocv_module_turn_off the_module )
list ( APPEND OPENCV_MODULES_DISABLED_AUTO "${the_module}" )
list ( REMOVE_ITEM OPENCV_MODULES_BUILD "${the_module}" )
list ( REMOVE_ITEM OPENCV_MODULES_PUBLIC "${the_module}" )
set ( HAVE_ ${ the_module } OFF CACHE INTERNAL "Module ${the_module} can not be built in current configuration" )
endmacro ( )
# e x c l u d e s m o d u l e f r o m c u r r e n t c o n f i g u r a t i o n
macro ( ocv_module_disable module )
set ( __modname ${ module } )
if ( NOT __modname MATCHES "^opencv_" )
@ -175,41 +165,46 @@ macro(ocv_module_disable module)
set ( OPENCV_MODULE_ ${ __modname } _LOCATION "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "Location of ${__modname} module sources" )
set ( OPENCV_MODULES_DISABLED_FORCE "${OPENCV_MODULES_DISABLED_FORCE}" CACHE INTERNAL "List of OpenCV modules which can not be build in current configuration" )
unset ( __modname )
return ( ) # l e a v e t h e c u r r e n t f o l d e r
return ( ) # l e a v e t h e c u r r e n t f o l d e r
endmacro ( )
# I n t e r n a l m a c r o ; p a r t l y d i s a b l e s O p e n C V m o d u l e
macro ( __ocv_module_turn_off the_module )
list ( APPEND OPENCV_MODULES_DISABLED_AUTO "${the_module}" )
list ( REMOVE_ITEM OPENCV_MODULES_BUILD "${the_module}" )
list ( REMOVE_ITEM OPENCV_MODULES_PUBLIC "${the_module}" )
set ( HAVE_ ${ the_module } OFF CACHE INTERNAL "Module ${the_module} can not be built in current configuration" )
endmacro ( )
# I n t e r n a l m a c r o f o r d e p e n d e n c i e s t r a c k i n g
macro ( __ocv_flatten_module_required_dependencies the_module )
set ( __flattened_deps "" )
set ( __resolved_deps "" )
set ( __req_depends ${ OPENCV_MODULE_${the_module } _REQ_DEPS} )
while ( __req_depends )
list ( GET __req_depends 0 __dep )
list ( REMOVE_AT __req_depends 0 )
ocv_list_pop_front ( __req_depends __dep )
if ( __dep STREQUAL the_module )
# T O D O : t h i n k h o w t o d e a l w i t h c y c l i c d e p e n d e n c y
__ocv_module_turn_off ( ${ the_module } )
__ocv_module_turn_off ( ${ the_module } ) # T O D O : t h i n k h o w t o d e a l w i t h c y c l i c d e p e n d e n c y
break ( )
elseif ( "${OPENCV_MODULES_DISABLED_USER};${OPENCV_MODULES_DISABLED_AUTO}" MATCHES "(^|;)${__dep}(;|$)" )
# d e p e n d s o n d i s a b l e d m o d u l e
__ocv_module_turn_off ( ${ the_module } )
elseif ( ";${OPENCV_MODULES_DISABLED_USER};${OPENCV_MODULES_DISABLED_AUTO};" MATCHES ";${__dep};" )
__ocv_module_turn_off ( ${ the_module } ) # d e p e n d s o n d i s a b l e d m o d u l e
break ( )
elseif ( "${OPENCV_MODULES_BUILD}" MATCHES "(^|;)${__dep}(;|$)" )
if ( __resolved_deps MATCHES "(^|;)${__dep}(;|$)" )
# a l l d e p e n d e n c i e s o f t h i s m o d u l e a r e a l r e a d y r e s o l v e d
list ( APPEND __flattened_deps "${__dep}" )
elseif ( ";${OPENCV_MODULES_BUILD};" MATCHES ";${__dep};" )
if ( ";${__resolved_deps};" MATCHES ";${__dep};" )
list ( APPEND __flattened_deps "${__dep}" ) # a l l d e p e n d e n c i e s o f t h i s m o d u l e a r e a l r e a d y r e s o l v e d
else ( )
# p u t a l l r e q u i r e d s u b d e p e n d e n c i e s b e f o r e t h i s d e p e n d e n c y a n d m a r k i t a s r e s o l v e d
# p u t a l l r e q u i r e d s u b d e p e n d e n c i e s b e f o r e t h i s d e p e n d e n c y a n d m a r k i t a s r e s o l v e d
list ( APPEND __resolved_deps "${__dep}" )
list ( INSERT __req_depends 0 ${ OPENCV_MODULE_${__dep } _REQ_DEPS} ${ __dep } )
endif ( )
elseif ( __dep MATCHES "^opencv_" )
# d e p e n d s o n m i s s i n g m o d u l e
__ocv_module_turn_off ( ${ the_module } )
__ocv_module_turn_off ( ${ the_module } ) # d e p e n d s o n m i s s i n g m o d u l e
message ( WARNING "Unknown \" ${ __dep } \" module is listened in the dependencies of \"${the_module}\" module " )
break ( )
else ( )
# s k i p n o n - m o d u l e s
# s k i p n o n - m o d u l e s
endif ( )
endwhile ( )
@ -220,37 +215,33 @@ macro(__ocv_flatten_module_required_dependencies the_module)
set ( OPENCV_MODULE_ ${ the_module } _DEPS "" )
endif ( )
unset ( __resolved_deps )
unset ( __flattened_deps )
unset ( __req_depends )
unset ( __dep )
ocv_clear_vars ( __resolved_deps __flattened_deps __req_depends __dep )
endmacro ( )
# I n t e r n a l m a c r o f o r d e p e n d e n c i e s t r a c k i n g
macro ( __ocv_flatten_module_optional_dependencies the_module )
set ( __flattened_deps ${ OPENCV_MODULE_${the_module } _DEPS} )
set ( __resolved_deps ${ OPENCV_MODULE_${the_module } _DEPS} )
set ( __opt_depends ${ OPENCV_MODULE_${the_module } _OPT_DEPS} )
while ( __opt_depends )
list ( GET __opt_depends 0 __dep )
list ( REMOVE_AT __opt_depends 0 )
ocv_list_pop_front ( __opt_depends __dep )
if ( __dep STREQUAL the_module )
# T O D O : t h i n k h o w t o d e a l w i t h c y c l i c d e p e n d e n c y
__ocv_module_turn_off ( ${ the_module } )
__ocv_module_turn_off ( ${ the_module } ) # T O D O : t h i n k h o w t o d e a l w i t h c y c l i c d e p e n d e n c y
break ( )
elseif ( "${OPENCV_MODULES_BUILD}" MATCHES "(^|;)${__dep}(;|$)" )
if ( __resolved_deps MATCHES "(^|;)${__dep}(;|$)" )
# a l l d e p e n d e n c i e s o f t h i s m o d u l e a r e a l r e a d y r e s o l v e d
list ( APPEND __flattened_deps "${__dep}" )
elseif ( ";${OPENCV_MODULES_BUILD};" MATCHES ";${__dep};" )
if ( ";${__resolved_deps};" MATCHES ";${__dep};" )
list ( APPEND __flattened_deps "${__dep}" ) # a l l d e p e n d e n c i e s o f t h i s m o d u l e a r e a l r e a d y r e s o l v e d
else ( )
# p u t a l l s u b d e p e n d e n c i e s b e f o r e t h i s d e p e n d e n c y a n d m a r k i t a s r e s o l v e d
# p u t a l l s u b d e p e n d e n c i e s b e f o r e t h i s d e p e n d e n c y a n d m a r k i t a s r e s o l v e d
list ( APPEND __resolved_deps "${__dep}" )
list ( INSERT __opt_depends 0 ${ OPENCV_MODULE_${__dep } _REQ_DEPS} ${ OPENCV_MODULE_${__dep } _OPT_DEPS} ${ __dep } )
endif ( )
else ( )
# s k i p n o n - m o d u l e s o r m i s s i n g m o d u l e s
# s k i p n o n - m o d u l e s o r m i s s i n g m o d u l e s
endif ( )
endwhile ( )
if ( __flattened_deps )
list ( REMOVE_DUPLICATES __flattened_deps )
set ( OPENCV_MODULE_ ${ the_module } _DEPS ${ __flattened_deps } )
@ -258,10 +249,7 @@ macro(__ocv_flatten_module_optional_dependencies the_module)
set ( OPENCV_MODULE_ ${ the_module } _DEPS "" )
endif ( )
unset ( __resolved_deps )
unset ( __flattened_deps )
unset ( __opt_depends )
unset ( __dep )
ocv_clear_vars ( __resolved_deps __flattened_deps __opt_depends __dep )
endmacro ( )
macro ( __ocv_flatten_module_dependencies )
@ -269,16 +257,16 @@ macro(__ocv_flatten_module_dependencies)
set ( HAVE_ ${ m } OFF CACHE INTERNAL "Module ${m} will not be built in current configuration" )
endforeach ( )
foreach ( m ${ OPENCV_MODULES_BUILD } )
set ( HAVE_ ${ m } ON CACHE INTERNAL "Module ${m} will not be built in current configuration" )
set ( HAVE_ ${ m } ON CACHE INTERNAL "Module ${m} will be built in current configuration" )
__ocv_flatten_module_required_dependencies ( ${ m } )
endforeach ( )
foreach ( m ${ OPENCV_MODULES_BUILD } )
__ocv_flatten_module_optional_dependencies ( ${ m } )
# d e p e n d e n c i e s f r o m o t h e r m o d u l e s
# s a v e d e p e n d e n c i e s f r o m o t h e r m o d u l e s
set ( OPENCV_MODULE_ ${ m } _DEPS ${ OPENCV_MODULE_${m } _DEPS} CACHE INTERNAL "Flattened dependencies of ${m} module" )
# e x t r a d e p e n d e n c i e s
# s a v e e x t r a d e p e n d e n c i e s
set ( OPENCV_MODULE_ ${ m } _DEPS_EXT ${ OPENCV_MODULE_${m } _REQ_DEPS} ${ OPENCV_MODULE_${m } _OPT_DEPS} )
if ( OPENCV_MODULE_ ${ m } _DEPS_EXT AND OPENCV_MODULE_ ${ m } _DEPS )
list ( REMOVE_ITEM OPENCV_MODULE_ ${ m } _DEPS_EXT ${ OPENCV_MODULE_${m } _DEPS} )
@ -300,10 +288,11 @@ macro(ocv_glob_modules)
endif ( )
set ( __directories_observed "" )
# c o l l e c t m o d u l e s
# c o l l e c t m o d u l e s
set ( OPENCV_INITIAL_PASS ON )
foreach ( __path ${ ARGN } )
ocv_get_real_path ( __path "${__path}" )
list ( FIND __directories_observed "${__path}" __pathIdx )
if ( __pathIdx GREATER -1 )
message ( FATAL_ERROR "The directory ${__path} is observed for OpenCV modules second time." )
@ -316,6 +305,7 @@ macro(ocv_glob_modules)
foreach ( mod ${ __ocvmodules } )
ocv_get_real_path ( __modpath "${__path}/${mod}" )
if ( EXISTS "${__modpath}/CMakeLists.txt" )
list ( FIND __directories_observed "${__modpath}" __pathIdx )
if ( __pathIdx GREATER -1 )
message ( FATAL_ERROR "The module from ${__modpath} is already loaded." )
@ -327,23 +317,19 @@ macro(ocv_glob_modules)
endforeach ( )
endif ( )
endforeach ( )
unset ( __ocvmodules )
unset ( __directories_observed )
unset ( __path )
unset ( __modpath )
unset ( __pathIdx )
ocv_clear_vars ( __ocvmodules __directories_observed __path __modpath __pathIdx )
# r e s o l v e d e p e n d e n c i e s
# r e s o l v e d e p e n d e n c i e s
__ocv_flatten_module_dependencies ( )
# o r d e r m o d u l e s b y d e p e n d e n c i e s
# o r d e r m o d u l e s b y d e p e n d e n c i e s
set ( OPENCV_MODULES_BUILD_ "" )
foreach ( m ${ OPENCV_MODULES_BUILD } )
list ( APPEND OPENCV_MODULES_BUILD_ ${ OPENCV_MODULE_${m } _DEPS} ${ m } )
endforeach ( )
ocv_list_unique ( OPENCV_MODULES_BUILD_ )
# c r e a t e m o d u l e s
# c r e a t e m o d u l e s
set ( OPENCV_INITIAL_PASS OFF PARENT_SCOPE )
set ( OPENCV_INITIAL_PASS OFF )
foreach ( m ${ OPENCV_MODULES_BUILD_ } )
@ -389,7 +375,7 @@ endmacro()
macro ( ocv_module_include_directories )
ocv_include_directories ( "${OPENCV_MODULE_${the_module}_LOCATION}/include"
" $ { O P E N C V _ M O D U L E _ $ { t h e _ m o d u l e } _ L O C A T I O N } / s r c "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } " # f o r p r e c o m p i l e d h e a d e r s
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } " # f o r p r e c o m p i l e d h e a d e r s
)
ocv_include_modules ( ${ OPENCV_MODULE_${the_module } _DEPS} ${ ARGN } )
endmacro ( )
@ -417,7 +403,7 @@ macro(ocv_set_module_sources)
endif ( )
# u s e f u l l p a t h s f o r m o d u l e t o b e i n d e p e n d e n t f r o m t h e m o d u l e l o c a t i o n
ocv_to_full_paths ( OPENCV_MODULE_ ${ the_module } _HEADERS )
ocv_convert_ to_full_paths ( OPENCV_MODULE_ ${ the_module } _HEADERS )
set ( OPENCV_MODULE_ ${ the_module } _HEADERS ${ OPENCV_MODULE_${the_module } _HEADERS} CACHE INTERNAL "List of header files for ${the_module}" )
set ( OPENCV_MODULE_ ${ the_module } _SOURCES ${ OPENCV_MODULE_${the_module } _SOURCES} CACHE INTERNAL "List of source files for ${the_module}" )
@ -446,9 +432,11 @@ endmacro()
# ocv_create_module ( SKIP_LINK )
macro ( ocv_create_module )
add_library ( ${ the_module } ${ OPENCV_MODULE_TYPE } ${ OPENCV_MODULE_${the_module } _HEADERS} ${ OPENCV_MODULE_${the_module } _SOURCES} )
if ( NOT "${ARGN}" STREQUAL "SKIP_LINK" )
target_link_libraries ( ${ the_module } ${ OPENCV_MODULE_${the_module } _DEPS} ${ OPENCV_MODULE_${the_module } _DEPS_EXT} ${ OPENCV_LINKER_LIBS } ${ IPP_LIBS } ${ ARGN } )
endif ( )
add_dependencies ( opencv_modules ${ the_module } )
if ( ENABLE_SOLUTION_FOLDERS )
@ -485,7 +473,7 @@ macro(ocv_create_module)
if ( CMAKE_CROSSCOMPILING )
set_target_properties ( ${ the_module } PROPERTIES LINK_FLAGS "/NODEFAULTLIB:secchk" )
endif ( )
set_target_properties ( ${ the_module } PROPERTIES LINK_FLAGS "/NODEFAULTLIB:libc /DEBUG" )
set_target_properties ( ${ the_module } PROPERTIES LINK_FLAGS "/NODEFAULTLIB:libc /DEBUG" )
endif ( )
install ( TARGETS ${ the_module }
@ -495,7 +483,7 @@ macro(ocv_create_module)
)
# o n l y " p u b l i c " h e a d e r s n e e d t o b e i n s t a l l e d
if ( OPENCV_MODULE_ ${ the_module } _HEADERS AND OPENCV_MODULES_PUBLIC MATCHES "(^| ;) ${the_module}( ;|$) " )
if ( OPENCV_MODULE_ ${ the_module } _HEADERS AND ";${ OPENCV_MODULES_PUBLIC};" MATCHES ";${the_module};" )
foreach ( hdr ${ OPENCV_MODULE_${the_module } _HEADERS} )
string ( REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}" )
if ( hdr2 MATCHES "^(opencv2/.*)/[^/]+.h(..)?$" )
@ -510,30 +498,17 @@ endmacro()
# U s a g e :
# ocv_add_precompiled_headers ( ${ the_module } )
macro ( ocv_add_precompiled_headers the_target )
if ( "${the_target}" MATCHES "^opencv_test_.*$" )
SET ( pch_path "test/test_" )
if ( "${the_target}" MATCHES "^opencv_test_.*$" )
SET ( pch_path "test/test_" )
elseif ( "${the_target}" MATCHES "opencv_perf_gpu_cpu" )
SET ( pch_path "perf_cpu/perf_cpu_" )
elseif ( "${the_target}" MATCHES "^opencv_perf_.*$" )
SET ( pch_path "perf/perf_" )
else ( )
SET ( pch_path "src/" )
endif ( )
set ( pch_header "${CMAKE_CURRENT_SOURCE_DIR}/${pch_path}precomp.hpp" )
if ( PCHSupport_FOUND AND ENABLE_PRECOMPILED_HEADERS AND EXISTS "${pch_header}" )
if ( CMAKE_GENERATOR MATCHES Visual )
set ( ${ the_target } _pch "${CMAKE_CURRENT_SOURCE_DIR}/${pch_path}precomp.cpp" )
add_native_precompiled_header ( ${ the_target } ${ pch_header } )
elseif ( CMAKE_GENERATOR MATCHES Xcode )
add_native_precompiled_header ( ${ the_target } ${ pch_header } )
elseif ( CMAKE_COMPILER_IS_GNUCXX AND CMAKE_GENERATOR MATCHES "Makefiles|Ninja" )
add_precompiled_header ( ${ the_target } ${ pch_header } )
endif ( )
endif ( )
unset ( pch_header )
unset ( pch_path )
unset ( ${ the_target } _pch )
SET ( pch_path "perf_cpu/perf_cpu_" )
elseif ( "${the_target}" MATCHES "^opencv_perf_.*$" )
SET ( pch_path "perf/perf_" )
else ( )
SET ( pch_path "src/" )
endif ( )
ocv_add_precompiled_header_to_target ( ${ the_target } "${CMAKE_CURRENT_SOURCE_DIR}/${pch_path}precomp.hpp" )
unset ( pch_path )
endmacro ( )
# s h o r t c o m m a n d f o r a d d i n g s i m p l e O p e n C V m o d u l e
@ -563,7 +538,7 @@ macro(ocv_check_dependencies)
endforeach ( )
endmacro ( )
# a u x i l i a r y m a c r o t o p a r s e a r g u m e n t s o f o c v _ a d d _ a c c u r a c y _ t e s t s a n d o c v _ a d d _ p e r f _ t e s t s c o m m a n d s
# a u x i l i a r y m a c r o t o p a r s e a r g u m e n t s o f o c v _ a d d _ a c c u r a c y _ t e s t s a n d o c v _ a d d _ p e r f _ t e s t s c o m m a n d s
macro ( __ocv_parse_test_sources tests_type )
set ( OPENCV_ ${ tests_type } _ ${ the_module } _SOURCES "" )
set ( OPENCV_ ${ tests_type } _ ${ the_module } _DEPS "" )
@ -593,7 +568,7 @@ endmacro()
# t h i s i s a c o m m a n d f o r a d d i n g O p e n C V p e r f o r m a n c e t e s t s t o t h e m o d u l e
# ocv_add_perf_tests ( <extra_dependencies> )
macro ( ocv_add_perf_tests )
function ( ocv_add_perf_tests )
set ( perf_path "${CMAKE_CURRENT_SOURCE_DIR}/perf" )
if ( BUILD_PERF_TESTS AND EXISTS "${perf_path}" )
__ocv_parse_test_sources ( PERF ${ ARGN } )
@ -604,7 +579,7 @@ macro(ocv_add_perf_tests)
if ( OCV_DEPENDENCIES_FOUND )
set ( the_target "opencv_perf_${name}" )
# project ( ${ the_target } )
# project ( ${ the_target } )
ocv_module_include_directories ( ${ perf_deps } "${perf_path}" )
@ -636,14 +611,14 @@ macro(ocv_add_perf_tests)
add_dependencies ( perf ${ the_target } )
endif ( )
else ( OCV_DEPENDENCIES_FOUND )
# T O D O : w a r n a b o u t u n s a t i s f i e d d e p e n d e n c i e s
# T O D O : w a r n a b o u t u n s a t i s f i e d d e p e n d e n c i e s
endif ( OCV_DEPENDENCIES_FOUND )
endif ( )
endmacro ( )
endfunction ( )
# t h i s i s a c o m m a n d f o r a d d i n g O p e n C V a c c u r a c y / r e g r e s s i o n t e s t s t o t h e m o d u l e
# ocv_add_accuracy_tests ( [FILES <source group name> <list of sources>] [DEPENDS_ON] <list of extra dependencies> )
macro ( ocv_add_accuracy_tests )
function ( ocv_add_accuracy_tests )
set ( test_path "${CMAKE_CURRENT_SOURCE_DIR}/test" )
ocv_check_dependencies ( ${ test_deps } )
if ( BUILD_TESTS AND EXISTS "${test_path}" )
@ -655,7 +630,7 @@ macro(ocv_add_accuracy_tests)
if ( OCV_DEPENDENCIES_FOUND )
set ( the_target "opencv_test_${name}" )
# project ( ${ the_target } )
# project ( ${ the_target } )
ocv_module_include_directories ( ${ test_deps } "${test_path}" )
@ -687,12 +662,12 @@ macro(ocv_add_accuracy_tests)
ocv_add_precompiled_headers ( ${ the_target } )
else ( OCV_DEPENDENCIES_FOUND )
# T O D O : w a r n a b o u t u n s a t i s f i e d d e p e n d e n c i e s
# T O D O : w a r n a b o u t u n s a t i s f i e d d e p e n d e n c i e s
endif ( OCV_DEPENDENCIES_FOUND )
endif ( )
endmacro ( )
endfunction ( )
# i n t e r n a l m a c r o ; f i n d s a l l l i n k d e p e n d e n c i e s o f m o d u l e
# i n t e r n a l m a c r o ; f i n d s a l l l i n k d e p e n d e n c i e s o f t h e m o d u l e
# s h o u l d b e u s e d a t t h e e n d o f C M a k e p r o c e s s i n g
macro ( __ocv_track_module_link_dependencies the_module optkind )
set ( ${ the_module } _MODULE_DEPS_ ${ optkind } "" )
@ -742,7 +717,7 @@ macro(__ocv_track_module_link_dependencies the_module optkind)
# ocv_list_reverse ( ${ the_module } _EXTRA_DEPS_ ${ optkind } )
if ( __has_cycle )
# n o t s u r e i f i t c a n w o r k
# n o t s u r e i f i t c a n w o r k
list ( APPEND ${ the_module } _MODULE_DEPS_ ${ optkind } "${the_module}" )
endif ( )
@ -754,13 +729,13 @@ macro(__ocv_track_module_link_dependencies the_module optkind)
endif ( ) # S T A T I C _ L I B R A R Y
unset ( __module_type )
# message ( "${the_module}_MODULE_DEPS_${optkind}" )
# message ( " ${${the_module}_MODULE_DEPS_${optkind}}" )
# message ( " ${OPENCV_MODULE_${the_module}_DEPS}" )
# message ( "" )
# message ( "${the_module}_EXTRA_DEPS_${optkind}" )
# message ( " ${${the_module}_EXTRA_DEPS_${optkind}}" )
# message ( "" )
# message ( "${the_module}_MODULE_DEPS_${optkind}" )
# message ( " ${${the_module}_MODULE_DEPS_${optkind}}" )
# message ( " ${OPENCV_MODULE_${the_module}_DEPS}" )
# message ( "" )
# message ( "${the_module}_EXTRA_DEPS_${optkind}" )
# message ( " ${${the_module}_EXTRA_DEPS_${optkind}}" )
# message ( "" )
endmacro ( )
# c r e a t e s l i s t s o f b u i l d d e p e n d e n c i e s n e e d e d f o r e x t e r n a l p r o j e c t s