@ -41,6 +41,21 @@
#
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
# S e a r c h p a c k a g e s f o r h o s t s y s t e m i n s t e a d o f p a c k a g e s f o r t a r g e t s y s t e m .
# i n c a s e o f c r o s s c o m p i l a t i o n t h e s s m a c r o s h o u l d b e d e f i n e d b y t o o l c h a i n f i l e
if ( NOT COMMAND find_host_package )
macro ( find_host_package )
find_package ( ${ ARGN } )
endmacro ( )
endif ( )
if ( NOT COMMAND find_host_program )
macro ( find_host_program )
find_program ( ${ ARGN } )
endmacro ( )
endif ( )
if ( NOT DEFINED OpenCV_MODULES_SUFFIX )
if ( ANDROID )
string ( REPLACE - _ OpenCV_MODULES_SUFFIX "_${ANDROID_NDK_ABI_NAME}" )
@ -255,7 +270,7 @@ foreach(__opttype OPT DBG)
# C U D A
if ( OpenCV_CUDA_VERSION )
if ( NOT CUDA_FOUND )
find_package ( CUDA ${ OpenCV_CUDA_VERSION } EXACT REQUIRED )
find_host_ package ( CUDA ${ OpenCV_CUDA_VERSION } EXACT REQUIRED )
else ( )
if ( NOT CUDA_VERSION_STRING VERSION_EQUAL OpenCV_CUDA_VERSION )
message ( FATAL_ERROR "OpenCV static library was compiled with CUDA ${OpenCV_CUDA_VERSION} support. Please, use the same version or rebuild OpenCV with CUDA ${CUDA_VERSION_STRING}" )