|
|
|
@ -164,44 +164,3 @@ You should manually point CMake variable OpenCV_DIR to your build of OpenCV libr |
|
|
|
|
set(OpenCV_FOUND FALSE CACHE BOOL "" FORCE) |
|
|
|
|
set(OPENCV_FOUND FALSE CACHE BOOL "" FORCE) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# |
|
|
|
|
# Some macroses for samples |
|
|
|
|
# |
|
|
|
|
macro(ocv_check_dependencies) |
|
|
|
|
set(OCV_DEPENDENCIES_FOUND TRUE) |
|
|
|
|
foreach(d ${ARGN}) |
|
|
|
|
if(NOT TARGET ${d}) |
|
|
|
|
set(OCV_DEPENDENCIES_FOUND FALSE) |
|
|
|
|
break() |
|
|
|
|
endif() |
|
|
|
|
endforeach() |
|
|
|
|
endmacro() |
|
|
|
|
|
|
|
|
|
# adds include directories in such way that directories from the OpenCV source tree go first |
|
|
|
|
function(ocv_include_directories) |
|
|
|
|
set(__add_before "") |
|
|
|
|
foreach(dir ${ARGN}) |
|
|
|
|
get_filename_component(__abs_dir "${dir}" ABSOLUTE) |
|
|
|
|
if("${__abs_dir}" MATCHES "^${OpenCV_DIR}") |
|
|
|
|
list(APPEND __add_before "${dir}") |
|
|
|
|
else() |
|
|
|
|
include_directories(AFTER SYSTEM "${dir}") |
|
|
|
|
endif() |
|
|
|
|
endforeach() |
|
|
|
|
include_directories(BEFORE ${__add_before}) |
|
|
|
|
endfunction() |
|
|
|
|
|
|
|
|
|
macro(ocv_include_modules) |
|
|
|
|
include_directories(BEFORE "${OpenCV_INCLUDE_DIRS}") |
|
|
|
|
endmacro() |
|
|
|
|
|
|
|
|
|
# remove all matching elements from the list |
|
|
|
|
macro(ocv_list_filterout lst regex) |
|
|
|
|
foreach(item ${${lst}}) |
|
|
|
|
if(item MATCHES "${regex}") |
|
|
|
|
list(REMOVE_ITEM ${lst} "${item}") |
|
|
|
|
endif() |
|
|
|
|
endforeach() |
|
|
|
|
endmacro() |
|
|
|
|