link_directories(/usr/local/cuda /usr/lib /usr/local/lib)
find_package(OpenCV REQUIRED opencv_core opencv_imgproc opencv_highgui opencv_calib3d opencv_cudastereo)

add_library(depth ../include/calib.hpp Traitement/traitement.cpp ../include/safeQueue.hpp ../include/timer.hpp Calib/calib.cpp Lecteur/lecteur_video.cpp)
target_link_libraries(depth ${OpenCV_LIBS} opencv_cudastereo)

install(TARGETS depth DESTINATION ${3D_SOURCE_DIR}/lib)

add_executable(DepthMap DepthMap/depth.cpp)
target_link_libraries(DepthMap ${OpenCV_LIBS} opencv_cudastereo depth)

add_executable(Calibration Calib/calibMain.cpp)
target_link_libraries(Calibration ${OpenCV_LIBS} depth)

add_executable(Lecteur Lecteur/capture.cpp)
target_link_libraries(Lecteur ${OpenCV_LIBS} depth)

add_subdirectory(Traitement)
add_subdirectory(SingleCalib)
