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

File diff suppressed because it is too large Load Diff

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

@ -1,40 +1,40 @@
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"
)
set(stitching_libs opencv_core opencv_imgproc opencv_highgui opencv_features2d opencv_calib3d opencv_gpu)
FILE(GLOB stitching_files "*.hpp" "*.cpp")
set(the_target opencv_stitching)
add_executable(${the_target} ${stitching_files})
add_dependencies(${the_target} ${stitching_libs})
set_target_properties(${the_target} PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
INSTALL_NAME_DIR lib
OUTPUT_NAME "opencv_stitching")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
endif()
target_link_libraries(${the_target} ${stitching_libs})
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)
project(stitching)
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"
)
set(stitching_libs opencv_core opencv_imgproc opencv_highgui opencv_features2d opencv_calib3d opencv_gpu)
FILE(GLOB stitching_files "*.hpp" "*.cpp")
set(the_target opencv_stitching)
add_executable(${the_target} ${stitching_files})
add_dependencies(${the_target} ${stitching_libs})
set_target_properties(${the_target} PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
INSTALL_NAME_DIR lib
OUTPUT_NAME "opencv_stitching")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
endif()
target_link_libraries(${the_target} ${stitching_libs})
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)

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