fixed #768 ticket

This commit is contained in:
Alexander Shishkov 2011-06-14 10:11:16 +00:00
parent 3c8cff3d7e
commit ca758a9dac
8 changed files with 1677 additions and 1676 deletions

View File

@ -9,8 +9,9 @@
#
# ----------------------------------------------------------------------------
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
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
# to find libraries from these locations first
@ -166,7 +167,7 @@ find_program(SVNVERSION_PATH svnversion)
mark_as_advanced(force SVNVERSION_PATH)
if(SVNVERSION_PATH)
message(STATUS "Extracting svn version, please wait...")
execute_process(COMMAND ${SVNVERSION_PATH} -n ${CMAKE_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:
@ -556,7 +557,7 @@ endif()
if (ANDROID)
#android camera support
set(NativeCamera_DIR "${CMAKE_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)
@ -732,8 +733,8 @@ endif(WITH_TBB)
#Threading Framework -- temporary decision for ARM-s instead of TBB
if (NOT HAVE_TBB)
file(GLOB THREADING_FRAMEWORK_HEADER "${CMAKE_SOURCE_DIR}/modules/core/include/opencv2/core/threading_framework.hpp")
file(GLOB THREADING_FRAMEWORK_SOURCE "${CMAKE_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()
@ -863,11 +864,11 @@ if(WIN32)
if (NOT BUILD_SHARED_LIBS)
if (MSVC64)
if(HAVE_VIDEOINPUT)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${CMAKE_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} ${CMAKE_SOURCE_DIR}/3rdparty/lib/videoInput.lib strmiids)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OPENCV_SOURCE_DIR}/3rdparty/lib/videoInput.lib strmiids)
endif()
endif()
endif()

View File

@ -57,7 +57,7 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
ENDFOREACH(item)
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
GET_DIRECTORY_PROPERTY(_global_definitions DIRECTORY ${CMAKE_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})

View File

@ -76,7 +76,7 @@ set(DOXYGEN_SOURCE_DIR)
set(doxy_html_dep_list)
foreach(m ${module_names})
set(module_hdr_path "${CMAKE_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})

View File

@ -194,7 +194,7 @@ if(BUILD_TESTS AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test)
source_group("Src" FILES ${test_hdrs} ${test_srcs})
if(HAVE_CUDA)
include_directories(${CUDA_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/modules/gpu/src/nvidia ${CMAKE_SOURCE_DIR}/modules/gpu/src/nvidia/core ${CMAKE_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})

View File

@ -2,20 +2,20 @@ project(haartraining)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/modules/core/include"
"${CMAKE_SOURCE_DIR}/modules/imgproc/include"
"${CMAKE_SOURCE_DIR}/modules/objdetect/include"
"${CMAKE_SOURCE_DIR}/modules/ml/include"
"${CMAKE_SOURCE_DIR}/modules/highgui/include"
"${CMAKE_SOURCE_DIR}/modules/video/include"
"${CMAKE_SOURCE_DIR}/modules/features2d/include"
"${CMAKE_SOURCE_DIR}/modules/flann/include"
"${CMAKE_SOURCE_DIR}/modules/calib3d/include"
"${CMAKE_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(${CMAKE_SOURCE_DIR}/lib ${CMAKE_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)

View File

@ -7,31 +7,31 @@ include_directories(${PYTHON_INCLUDE_PATH})
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/src1"
"${CMAKE_CURRENT_SOURCE_DIR}/src2"
"${CMAKE_SOURCE_DIR}/modules/core/include"
"${CMAKE_SOURCE_DIR}/modules/imgproc/include"
"${CMAKE_SOURCE_DIR}/modules/video/include"
"${CMAKE_SOURCE_DIR}/modules/highgui/include"
"${CMAKE_SOURCE_DIR}/modules/ml/include"
"${CMAKE_SOURCE_DIR}/modules/features2d/include"
"${CMAKE_SOURCE_DIR}/modules/flann/include"
"${CMAKE_SOURCE_DIR}/modules/calib3d/include"
"${CMAKE_SOURCE_DIR}/modules/objdetect/include"
"${CMAKE_SOURCE_DIR}/modules/legacy/include"
"${CMAKE_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 "${CMAKE_SOURCE_DIR}/modules/core/include/opencv2/core/core.hpp"
"${CMAKE_SOURCE_DIR}/modules/imgproc/include/opencv2/imgproc/imgproc.hpp"
"${CMAKE_SOURCE_DIR}/modules/video/include/opencv2/video/background_segm.hpp"
"${CMAKE_SOURCE_DIR}/modules/video/include/opencv2/video/tracking.hpp"
"${CMAKE_SOURCE_DIR}/modules/highgui/include/opencv2/highgui/highgui.hpp"
"${CMAKE_SOURCE_DIR}/modules/ml/include/opencv2/ml/ml.hpp"
"${CMAKE_SOURCE_DIR}/modules/features2d/include/opencv2/features2d/features2d.hpp"
"${CMAKE_SOURCE_DIR}/modules/calib3d/include/opencv2/calib3d/calib3d.hpp"
"${CMAKE_SOURCE_DIR}/modules/objdetect/include/opencv2/objdetect/objdetect.hpp"
"${CMAKE_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")

View File

@ -2,18 +2,18 @@ project(stitching)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/modules/core/include"
"${CMAKE_SOURCE_DIR}/modules/imgproc/include"
"${CMAKE_SOURCE_DIR}/modules/objdetect/include"
"${CMAKE_SOURCE_DIR}/modules/ml/include"
"${CMAKE_SOURCE_DIR}/modules/highgui/include"
"${CMAKE_SOURCE_DIR}/modules/video/include"
"${CMAKE_SOURCE_DIR}/modules/features2d/include"
"${CMAKE_SOURCE_DIR}/modules/flann/include"
"${CMAKE_SOURCE_DIR}/modules/calib3d/include"
"${CMAKE_SOURCE_DIR}/modules/legacy/include"
"${CMAKE_SOURCE_DIR}/modules/imgproc/src" # for gcgraph.hpp
"${CMAKE_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)

View File

@ -2,16 +2,16 @@ project(traincascade)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/modules/core/include"
"${CMAKE_SOURCE_DIR}/modules/imgproc/include"
"${CMAKE_SOURCE_DIR}/modules/objdetect/include"
"${CMAKE_SOURCE_DIR}/modules/ml/include"
"${CMAKE_SOURCE_DIR}/modules/highgui/include"
"${CMAKE_SOURCE_DIR}/modules/video/include"
"${CMAKE_SOURCE_DIR}/modules/features2d/include"
"${CMAKE_SOURCE_DIR}/modules/flann/include"
"${CMAKE_SOURCE_DIR}/modules/calib3d/include"
"${CMAKE_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