CMakeLists.txt 1.54 KB
Newer Older
Alexander Shishkov's avatar
Alexander Shishkov committed
1 2 3 4
project(stitching)

include_directories(
    "${CMAKE_CURRENT_SOURCE_DIR}"
Alexander Shishkov's avatar
Alexander Shishkov committed
5 6 7 8 9 10 11 12 13 14 15 16
    "${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"
Alexander Shishkov's avatar
Alexander Shishkov committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    )

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)