CMAKE_MINIMUM_REQUIRED(VERSION 3.2) PROJECT(video_analyser) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") SET(CMAKE_CXX_STANDARD 20) # include(FetchContent) # FetchContent_Declare( # googletest # URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip # ) # # For Windows: Prevent overriding the parent project's compiler/linker settings # SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE) # FetchContent_MakeAvailable(googletest) LINK_DIRECTORIES(/usr/local/lib) add_library(analyser_lib src/lib/colors.hpp src/lib/core.hpp src/lib/core.cpp src/lib/detection.hpp src/lib/detection.cpp src/lib/io.hpp src/lib/io.cpp src/lib/time.cpp src/lib/time.hpp src/lib/enums.hpp src/lib/enums.cpp src/lib/Irregularity.hpp src/lib/Irregularity.cpp src/lib/IrregularityFile.hpp src/lib/IrregularityFile.cpp src/lib/TimeLabel.hpp src/lib/TimeLabel.cpp src/lib/files.hpp src/lib/files.cpp src/utility.hpp src/utility.cpp ) FIND_PACKAGE(OpenCV REQUIRED) FIND_PACKAGE(nlohmann_json 3.2.0 REQUIRED) FIND_PACKAGE(Boost COMPONENTS program_options REQUIRED) INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) ADD_EXECUTABLE(video_analyser ./src/main.cpp) TARGET_LINK_LIBRARIES(analyser_lib ${OpenCV_LIBRARIES} nlohmann_json::nlohmann_json ${Boost_PROGRAM_OPTIONS_LIBRARY} ) TARGET_LINK_LIBRARIES(video_analyser ${OpenCV_LIBRARIES} nlohmann_json::nlohmann_json ${Boost_PROGRAM_OPTIONS_LIBRARY} analyser_lib ) # enable_testing() # ADD_EXECUTABLE( # test_suite # tests/irregularity_test.cpp # tests/enums_test.cpp # ) # TARGET_LINK_LIBRARIES( # test_suite # GTest::gtest_main # analyser_lib # ${OpenCV_LIBRARIES} # ${Boost_PROGRAM_OPTIONS_LIBRARY} # nlohmann_json::nlohmann_json # ) # include(GoogleTest) # gtest_discover_tests(test_suite)