11cmake_minimum_required (VERSION 3.21 )
22project (video-code VERSION 1.0.0 LANGUAGES CXX )
33
4+ option (CI_BUILD "CI Build" OFF )
5+
46set (CMAKE_CXX_STANDARD 20)
57set (CMAKE_CXX_STANDARD_REQUIRED ON )
68set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -Wall -Wextra -Wno-deprecated -pipe -O2 -D_REENTRANT -DVC_DEBUG_ON -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NO_KEYWORDS" )
79
810set_property (GLOBAL PROPERTY CXX_STANDARD 20 )
911
10- if (UNIX AND NOT APPLE )
12+ if (UNIX AND NOT APPLE AND NOT DEFINED CMAKE_CXX_COMPILER )
1113 set (CMAKE_CXX_COMPILER "g++-13" )
1214endif ()
1315
@@ -34,12 +36,30 @@ if (NOT DEFINED ENV{Qt6_DIR})
3436 set (Qt6_DIR "/usr/include/qt6/6.8.2/gcc_64/lib/cmake/Qt6" )
3537endif ()
3638
39+ if (CI_BUILD)
40+ message (STATUS "CI_BUILD is defined" )
41+ include (FetchContent )
42+ FetchContent_Declare (
43+ argparse
44+ GIT_REPOSITORY https://github.com/p-ranav/argparse.git
45+ )
46+ FetchContent_MakeAvailable (argparse)
47+
48+ FetchContent_Declare (
49+ nlohmann_json
50+ GIT_REPOSITORY https://github.com/nlohmann/json.git
51+ )
52+ FetchContent_MakeAvailable (nlohmann_json)
53+ endif ()
54+
3755find_package (OpenCV REQUIRED )
3856find_package (Python3 3.12 REQUIRED COMPONENTS Development Development.Module Development.Embed )
3957find_package (Qt6 REQUIRED COMPONENTS Widgets Core Gui )
40- find_package (nlohmann_json CONFIG REQUIRED )
41- set (argparse_DIR "${VCPKG_ROOT} /installed/${VCPKG_TARGET_TRIPLET} /share/argparse" )
42- find_package (argparse CONFIG REQUIRED )
58+ if (NOT CI_BUILD)
59+ find_package (nlohmann_json CONFIG REQUIRED )
60+ set (argparse_DIR "${VCPKG_ROOT} /installed/${VCPKG_TARGET_TRIPLET} /share/argparse" )
61+ find_package (argparse CONFIG REQUIRED )
62+ endif ()
4363
4464include_directories (
4565 ${OpenCV_INCLUDE_DIRS}
@@ -65,6 +85,7 @@ set(SOURCES
6585 src/transformation/color/grayscale.cpp
6686 src/transformation/other/overlay.cpp
6787 src/transformation/other/repeat.cpp
88+ src/transformation/other/zoom.cpp
6889)
6990
7091add_executable (${PROJECT_NAME} ${SOURCES} )
0 commit comments