cmake scripts are updated to prefer includes from the OpenCV source tree
This commit is contained in:
@@ -9,11 +9,8 @@ ocv_check_dependencies(${OPENCV_ANDROID_SAMPLES_REQUIRED_DEPS} opencv_java)
|
||||
if(BUILD_ANDROID_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
|
||||
project(android_samples)
|
||||
|
||||
foreach(m ${OPENCV_ANDROID_SAMPLES_REQUIRED_DEPS})
|
||||
string(REPLACE "opencv_" "" m "${m}")
|
||||
include_directories("${OpenCV_SOURCE_DIR}/modules/${m}/include")
|
||||
endforeach()
|
||||
|
||||
ocv_include_modules(${OPENCV_ANDROID_SAMPLES_REQUIRED_DEPS})
|
||||
|
||||
file(GLOB android_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)
|
||||
list(REMOVE_ITEM android_samples hello-android)
|
||||
list(SORT android_samples)
|
||||
|
@@ -12,11 +12,11 @@ ocv_check_dependencies(${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
|
||||
if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
|
||||
project(cpp_samples)
|
||||
|
||||
include_directories("${OpenCV_SOURCE_DIR}/include")#for opencv.hpp
|
||||
ocv_include_directories("${OpenCV_SOURCE_DIR}/include")#for opencv.hpp
|
||||
ocv_include_modules(${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
|
||||
|
||||
if (HAVE_opencv_gpu)
|
||||
include_directories("${OpenCV_SOURCE_DIR}/modules/gpu/include")
|
||||
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpu/include")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@@ -11,13 +11,13 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
|
||||
project("${project}_samples")
|
||||
|
||||
ocv_include_modules(${OPENCV_GPU_SAMPLES_REQUIRED_DEPS})
|
||||
include_directories(
|
||||
ocv_include_directories(
|
||||
"${OpenCV_SOURCE_DIR}/modules/gpu/src/nvidia"
|
||||
"${OpenCV_SOURCE_DIR}/modules/gpu/src/nvidia/core"
|
||||
)
|
||||
|
||||
if(HAVE_CUDA)
|
||||
include_directories(${CUDA_INCLUDE_DIRS})
|
||||
ocv_include_directories(${CUDA_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
Reference in New Issue
Block a user