#
# ----------------------------------------------------------------------------
-set(OPENCV_SOURCE_DIR ${CMAKE_SOURCE_DIR})
-
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
# Add these standard paths to the search paths for FIND_LIBRARY
mark_as_advanced(force SVNVERSION_PATH)
if(SVNVERSION_PATH)
message(STATUS "Extracting svn version, please wait...")
- execute_process(COMMAND ${SVNVERSION_PATH} -n ${OPENCV_SOURCE_DIR} OUTPUT_VARIABLE SVNVERSION_RESULT)
+ execute_process(COMMAND ${SVNVERSION_PATH} -n ${OpenCV_SOURCE_DIR} OUTPUT_VARIABLE SVNVERSION_RESULT)
if(SVNVERSION_RESULT MATCHES "exported")
# This is NOT a svn repository:
if (ANDROID)
#android camera support
- set(NativeCamera_DIR "${OPENCV_SOURCE_DIR}/android/native-camera/build")
+ set(NativeCamera_DIR "${OpenCV_SOURCE_DIR}/android/native-camera/build")
FIND_PACKAGE(NativeCamera QUIET)
if(NativeCamera_FOUND)
set(HAVE_ANDROID_NATIVE_CAMERA TRUE)
#Threading Framework -- temporary decision for ARM-s instead of TBB
if (NOT HAVE_TBB)
- file(GLOB THREADING_FRAMEWORK_HEADER "${OPENCV_SOURCE_DIR}/modules/core/include/opencv2/core/threading_framework.hpp")
- file(GLOB THREADING_FRAMEWORK_SOURCE "${OPENCV_SOURCE_DIR}/modules/core/src/threading_framework.cpp")
+ file(GLOB THREADING_FRAMEWORK_HEADER "${OpenCV_SOURCE_DIR}/modules/core/include/opencv2/core/threading_framework.hpp")
+ file(GLOB THREADING_FRAMEWORK_SOURCE "${OpenCV_SOURCE_DIR}/modules/core/src/threading_framework.cpp")
if(THREADING_FRAMEWORK_HEADER AND THREADING_FRAMEWORK_SOURCE)
set(HAVE_THREADING_FRAMEWORK 1)
endif()
if (NOT BUILD_SHARED_LIBS)
if (MSVC64)
if(HAVE_VIDEOINPUT)
- set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OPENCV_SOURCE_DIR}/3rdparty/lib/videoInput64.lib strmiids)
+ set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OpenCV_SOURCE_DIR}/3rdparty/lib/videoInput64.lib strmiids)
endif()
elseif (MSVC)
if(HAVE_VIDEOINPUT)
- set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OPENCV_SOURCE_DIR}/3rdparty/lib/videoInput.lib strmiids)
+ set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OpenCV_SOURCE_DIR}/3rdparty/lib/videoInput.lib strmiids)
endif()
endif()
endif()
ENDFOREACH(item)
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
- GET_DIRECTORY_PROPERTY(_global_definitions DIRECTORY ${OPENCV_SOURCE_DIR} DEFINITIONS)
+ GET_DIRECTORY_PROPERTY(_global_definitions DIRECTORY ${OpenCV_SOURCE_DIR} DEFINITIONS)
#MESSAGE("_directory_flags ${_directory_flags} ${_global_definitions}" )
LIST(APPEND ${_out_compile_flags} ${_directory_flags})
LIST(APPEND ${_out_compile_flags} ${_global_definitions})
set(doxy_html_dep_list)
foreach(m ${module_names})
- set(module_hdr_path "${OPENCV_SOURCE_DIR}/modules/${m}/include/opencv2/${m}")
+ set(module_hdr_path "${OpenCV_SOURCE_DIR}/modules/${m}/include/opencv2/${m}")
set(DOXYGEN_SOURCE_DIR ${DOXYGEN_SOURCE_DIR} ${module_hdr_path})
file(GLOB module_hdrs "${module_hdr_path}/*.h*")
set(doxy_html_dep_list ${doxy_html_dep_list} ${module_hdrs})
source_group("Src" FILES ${test_hdrs} ${test_srcs})
if(HAVE_CUDA)
- include_directories(${CUDA_INCLUDE_DIRS} ${OPENCV_SOURCE_DIR}/modules/gpu/src/nvidia ${OPENCV_SOURCE_DIR}/modules/gpu/src/nvidia/core ${OPENCV_SOURCE_DIR}/modules/gpu/src/nvidia/NPP_staging)
+ include_directories(${CUDA_INCLUDE_DIRS} ${OpenCV_SOURCE_DIR}/modules/gpu/src/nvidia ${OpenCV_SOURCE_DIR}/modules/gpu/src/nvidia/core ${OpenCV_SOURCE_DIR}/modules/gpu/src/nvidia/NPP_staging)
file(GLOB nvidia "test/nvidia/*.cpp" "test/nvidia/*.h*")
source_group("Src\\NVidia" FILES ${nvidia})
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}"
- "${OPENCV_SOURCE_DIR}/modules/core/include"
- "${OPENCV_SOURCE_DIR}/modules/imgproc/include"
- "${OPENCV_SOURCE_DIR}/modules/objdetect/include"
- "${OPENCV_SOURCE_DIR}/modules/ml/include"
- "${OPENCV_SOURCE_DIR}/modules/highgui/include"
- "${OPENCV_SOURCE_DIR}/modules/video/include"
- "${OPENCV_SOURCE_DIR}/modules/features2d/include"
- "${OPENCV_SOURCE_DIR}/modules/flann/include"
- "${OPENCV_SOURCE_DIR}/modules/calib3d/include"
- "${OPENCV_SOURCE_DIR}/modules/legacy/include"
+ "${OpenCV_SOURCE_DIR}/modules/core/include"
+ "${OpenCV_SOURCE_DIR}/modules/imgproc/include"
+ "${OpenCV_SOURCE_DIR}/modules/objdetect/include"
+ "${OpenCV_SOURCE_DIR}/modules/ml/include"
+ "${OpenCV_SOURCE_DIR}/modules/highgui/include"
+ "${OpenCV_SOURCE_DIR}/modules/video/include"
+ "${OpenCV_SOURCE_DIR}/modules/features2d/include"
+ "${OpenCV_SOURCE_DIR}/modules/flann/include"
+ "${OpenCV_SOURCE_DIR}/modules/calib3d/include"
+ "${OpenCV_SOURCE_DIR}/modules/legacy/include"
)
if(WIN32)
- link_directories(${OPENCV_SOURCE_DIR}/lib ${OPENCV_SOURCE_DIR}/bin ${CMAKE_CURRENT_BINARY_DIR})
+ link_directories(${OpenCV_SOURCE_DIR}/lib ${OpenCV_SOURCE_DIR}/bin ${CMAKE_CURRENT_BINARY_DIR})
endif()
set(haartraining_libs opencv_core opencv_imgproc opencv_highgui opencv_objdetect opencv_calib3d opencv_haartraining_engine)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/src1"
"${CMAKE_CURRENT_SOURCE_DIR}/src2"
- "${OPENCV_SOURCE_DIR}/modules/core/include"
- "${OPENCV_SOURCE_DIR}/modules/imgproc/include"
- "${OPENCV_SOURCE_DIR}/modules/video/include"
- "${OPENCV_SOURCE_DIR}/modules/highgui/include"
- "${OPENCV_SOURCE_DIR}/modules/ml/include"
- "${OPENCV_SOURCE_DIR}/modules/features2d/include"
- "${OPENCV_SOURCE_DIR}/modules/flann/include"
- "${OPENCV_SOURCE_DIR}/modules/calib3d/include"
- "${OPENCV_SOURCE_DIR}/modules/objdetect/include"
- "${OPENCV_SOURCE_DIR}/modules/legacy/include"
- "${OPENCV_SOURCE_DIR}/modules/contrib/include"
+ "${OpenCV_SOURCE_DIR}/modules/core/include"
+ "${OpenCV_SOURCE_DIR}/modules/imgproc/include"
+ "${OpenCV_SOURCE_DIR}/modules/video/include"
+ "${OpenCV_SOURCE_DIR}/modules/highgui/include"
+ "${OpenCV_SOURCE_DIR}/modules/ml/include"
+ "${OpenCV_SOURCE_DIR}/modules/features2d/include"
+ "${OpenCV_SOURCE_DIR}/modules/flann/include"
+ "${OpenCV_SOURCE_DIR}/modules/calib3d/include"
+ "${OpenCV_SOURCE_DIR}/modules/objdetect/include"
+ "${OpenCV_SOURCE_DIR}/modules/legacy/include"
+ "${OpenCV_SOURCE_DIR}/modules/contrib/include"
)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-set(opencv_hdrs "${OPENCV_SOURCE_DIR}/modules/core/include/opencv2/core/core.hpp"
- "${OPENCV_SOURCE_DIR}/modules/imgproc/include/opencv2/imgproc/imgproc.hpp"
- "${OPENCV_SOURCE_DIR}/modules/video/include/opencv2/video/background_segm.hpp"
- "${OPENCV_SOURCE_DIR}/modules/video/include/opencv2/video/tracking.hpp"
- "${OPENCV_SOURCE_DIR}/modules/highgui/include/opencv2/highgui/highgui.hpp"
- "${OPENCV_SOURCE_DIR}/modules/ml/include/opencv2/ml/ml.hpp"
- "${OPENCV_SOURCE_DIR}/modules/features2d/include/opencv2/features2d/features2d.hpp"
- "${OPENCV_SOURCE_DIR}/modules/calib3d/include/opencv2/calib3d/calib3d.hpp"
- "${OPENCV_SOURCE_DIR}/modules/objdetect/include/opencv2/objdetect/objdetect.hpp"
- "${OPENCV_SOURCE_DIR}/modules/python/src2/opencv_extra_api.hpp")
+set(opencv_hdrs "${OpenCV_SOURCE_DIR}/modules/core/include/opencv2/core/core.hpp"
+ "${OpenCV_SOURCE_DIR}/modules/imgproc/include/opencv2/imgproc/imgproc.hpp"
+ "${OpenCV_SOURCE_DIR}/modules/video/include/opencv2/video/background_segm.hpp"
+ "${OpenCV_SOURCE_DIR}/modules/video/include/opencv2/video/tracking.hpp"
+ "${OpenCV_SOURCE_DIR}/modules/highgui/include/opencv2/highgui/highgui.hpp"
+ "${OpenCV_SOURCE_DIR}/modules/ml/include/opencv2/ml/ml.hpp"
+ "${OpenCV_SOURCE_DIR}/modules/features2d/include/opencv2/features2d/features2d.hpp"
+ "${OpenCV_SOURCE_DIR}/modules/calib3d/include/opencv2/calib3d/calib3d.hpp"
+ "${OpenCV_SOURCE_DIR}/modules/objdetect/include/opencv2/objdetect/objdetect.hpp"
+ "${OpenCV_SOURCE_DIR}/modules/python/src2/opencv_extra_api.hpp")
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}"
- "${OPENCV_SOURCE_DIR}/modules/core/include"
- "${OPENCV_SOURCE_DIR}/modules/imgproc/include"
- "${OPENCV_SOURCE_DIR}/modules/objdetect/include"
- "${OPENCV_SOURCE_DIR}/modules/ml/include"
- "${OPENCV_SOURCE_DIR}/modules/highgui/include"
- "${OPENCV_SOURCE_DIR}/modules/video/include"
- "${OPENCV_SOURCE_DIR}/modules/features2d/include"
- "${OPENCV_SOURCE_DIR}/modules/flann/include"
- "${OPENCV_SOURCE_DIR}/modules/calib3d/include"
- "${OPENCV_SOURCE_DIR}/modules/legacy/include"
- "${OPENCV_SOURCE_DIR}/modules/imgproc/src" # for gcgraph.hpp
- "${OPENCV_SOURCE_DIR}/modules/gpu/include"
+ "${OpenCV_SOURCE_DIR}/modules/core/include"
+ "${OpenCV_SOURCE_DIR}/modules/imgproc/include"
+ "${OpenCV_SOURCE_DIR}/modules/objdetect/include"
+ "${OpenCV_SOURCE_DIR}/modules/ml/include"
+ "${OpenCV_SOURCE_DIR}/modules/highgui/include"
+ "${OpenCV_SOURCE_DIR}/modules/video/include"
+ "${OpenCV_SOURCE_DIR}/modules/features2d/include"
+ "${OpenCV_SOURCE_DIR}/modules/flann/include"
+ "${OpenCV_SOURCE_DIR}/modules/calib3d/include"
+ "${OpenCV_SOURCE_DIR}/modules/legacy/include"
+ "${OpenCV_SOURCE_DIR}/modules/imgproc/src" # for gcgraph.hpp
+ "${OpenCV_SOURCE_DIR}/modules/gpu/include"
)
set(stitching_libs opencv_core opencv_imgproc opencv_highgui opencv_features2d opencv_calib3d opencv_gpu)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}"
- "${OPENCV_SOURCE_DIR}/modules/core/include"
- "${OPENCV_SOURCE_DIR}/modules/imgproc/include"
- "${OPENCV_SOURCE_DIR}/modules/objdetect/include"
- "${OPENCV_SOURCE_DIR}/modules/ml/include"
- "${OPENCV_SOURCE_DIR}/modules/highgui/include"
- "${OPENCV_SOURCE_DIR}/modules/video/include"
- "${OPENCV_SOURCE_DIR}/modules/features2d/include"
- "${OPENCV_SOURCE_DIR}/modules/flann/include"
- "${OPENCV_SOURCE_DIR}/modules/calib3d/include"
- "${OPENCV_SOURCE_DIR}/modules/legacy/include"
+ "${OpenCV_SOURCE_DIR}/modules/core/include"
+ "${OpenCV_SOURCE_DIR}/modules/imgproc/include"
+ "${OpenCV_SOURCE_DIR}/modules/objdetect/include"
+ "${OpenCV_SOURCE_DIR}/modules/ml/include"
+ "${OpenCV_SOURCE_DIR}/modules/highgui/include"
+ "${OpenCV_SOURCE_DIR}/modules/video/include"
+ "${OpenCV_SOURCE_DIR}/modules/features2d/include"
+ "${OpenCV_SOURCE_DIR}/modules/flann/include"
+ "${OpenCV_SOURCE_DIR}/modules/calib3d/include"
+ "${OpenCV_SOURCE_DIR}/modules/legacy/include"
)
set(traincascade_libs opencv_core opencv_ml opencv_imgproc