cmake_minimum_required(VERSION 3.10) # set the project name and version project(LRAUV-Camera-Control VERSION 1.0) # set the C++ standard # specify the C++ standard set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) # include opencv find_package( OpenCV REQUIRED ) include_directories( ${OpenCV_INCLUDE_DIRS} ) # include threads find_package(Threads REQUIRED) # add libraries add_subdirectory(libs/inih) add_subdirectory(libs/date) add_subdirectory(libs/loguru) # append libraries list(APPEND EXTRA_LIBS ${OpenCV_LIBS}) list(APPEND EXTRA_LIBS -lstdc++fs) list(APPEND EXTRA_LIBS Threads::Threads) list(APPEND EXTRA_LIBS inih) list(APPEND EXTRA_LIBS date) list(APPEND EXTRA_LIBS loguru) # collect sources list(APPEND _SOURCES src/VideoRecorder.h src/FrameGrabber.h src/kbhit.h src/SimpleTimer.h src/ofThread.cpp ) # add the executable add_executable(LRAUV-Camera-Control src/lrauv-camera-control.cpp ${_SOURCES}) target_link_libraries(LRAUV-Camera-Control PUBLIC ${EXTRA_LIBS} ${CMAKE_DL_LIBS})