3 Commits
Author SHA1 Message Date
jfmcarreira 500e0e85ba Add macro to protect against the Qt version 2021-11-28 01:46:37 +00:00
jfmcarreira d4886a7fee Fix fetch content to build main product 2021-11-27 23:28:27 +00:00
jfmcarreira f3919ac8e8 Change cmake fetch content 2021-11-27 22:51:58 +00:00
5 changed files with 44 additions and 29 deletions

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
# Created by https://www.gitignore.io/api/c++,clion,linux
# Edit at https://www.gitignore.io/?templates=c++,clion,linux
deps/**
### C++ ###
# Prerequisites
*.d
@@ -146,4 +146,4 @@ doc/
compile_commands.json
# Build dirs
build*
build*
+30 -27
View File
@@ -104,7 +104,8 @@ SET(UPDATE_CHANNEL
# ####################################################################################################################################################
INCLUDE(FetchContent)
# ####################################################################################################################################################
SET(FETCHCONTENT_BASE_DIR "${CMAKE_SOURCE_DIR}/deps")
# Doxygen
IF(BUILD_DOC)
FIND_PACKAGE(Doxygen)
@@ -117,7 +118,23 @@ SET_PACKAGE_PROPERTIES(
TYPE OPTIONAL
)
# ####################################################################################################################################################
# Type safe
FETCHCONTENT_DECLARE(
type_safe
GIT_REPOSITORY https://github.com/foonathan/type_safe
GIT_TAG v0.2.2
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/type_safe"
)
SET_PACKAGE_PROPERTIES(
type_safe PROPERTIES
URL "https://github.com/foonathan/type_safe"
DESCRIPTION "Zero overhead abstractions that use the C++ type system to prevent bugs."
TYPE REQUIRED
)
FETCHCONTENT_MAKEAVAILABLE(type_safe)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/deps/type_safe/include/ ${CMAKE_SOURCE_DIR}/deps/type_safe/external/debug_assert/)
# Catch2 and Google Tests
IF(BUILD_TESTS)
FETCHCONTENT_DECLARE(googletest URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip)
@@ -126,7 +143,12 @@ IF(BUILD_TESTS)
ON
CACHE BOOL "" FORCE
)
FETCHCONTENT_MAKEAVAILABLE(googletest)
FETCHCONTENT_DECLARE(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.1
)
SET_PACKAGE_PROPERTIES(
googletest PROPERTIES
URL "https://github.com/google/googletest"
@@ -134,19 +156,15 @@ IF(BUILD_TESTS)
TYPE OPTIONAL
)
FETCHCONTENT_DECLARE(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.1
)
FETCHCONTENT_MAKEAVAILABLE(Catch2)
SET_PACKAGE_PROPERTIES(
Catch2 PROPERTIES
URL "https://github.com/catchorg/Catch2"
DESCRIPTION "Catch2 unit tests"
TYPE OPTIONAL
)
INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/_deps/catch2-src/contrib/Catch.cmake)
FETCHCONTENT_MAKEAVAILABLE(googletest Catch2)
INCLUDE(${CMAKE_SOURCE_DIR}/deps/catch2-src/contrib/Catch.cmake)
INCLUDE(CTest)
ENABLE_TESTING()
@@ -156,23 +174,9 @@ IF(BUILD_TESTS)
)
ENDIF()
# ####################################################################################################################################################
# Type safe
FETCHCONTENT_DECLARE(
type_safe
GIT_REPOSITORY https://github.com/foonathan/type_safe
GIT_TAG v0.2.2
)
FETCHCONTENT_MAKEAVAILABLE(type_safe)
SET_PACKAGE_PROPERTIES(
type_safe PROPERTIES
URL "https://github.com/foonathan/type_safe"
DESCRIPTION "Zero overhead abstractions that use the C++ type system to prevent bugs."
TYPE REQUIRED
)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/_deps/type_safe-src/include/ ${CMAKE_CURRENT_BINARY_DIR}/_deps/type_safe-src/external/debug_assert/)
# ####################################################################################################################################################
# OpenCV
OPTION(USE_OPENCV "Add OpenCV support" ON)
IF(USE_OPENCV)
@@ -199,7 +203,6 @@ SET_PACKAGE_PROPERTIES(
TYPE OPTIONAL
)
# ####################################################################################################################################################
# FFmpeg
OPTION(USE_FFMPEG "Add FFMPEG support" ON)
IF(USE_FFMPEG)
+6
View File
@@ -43,9 +43,15 @@
#include "GridManager.h"
#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
constexpr auto kSelectionColor = QColorConstants::Cyan;
constexpr auto kImageMaskColor = QColorConstants::Green;
constexpr auto kEraserColor = QColorConstants::Red;
#else
static const QColor kSelectionColor = Qt::cyan;
static const QColor kImageMaskColor = Qt::green;
static const QColor kEraserColor = Qt::red;
#endif
constexpr double kMaxZoom = 100.0;
constexpr double kMinZoom = 0.01;
+3
View File
@@ -2,6 +2,9 @@
# CMakeLists for Calyp lis tests using catch2
#
FETCHCONTENT_MAKEAVAILABLE(Catch2)
SET(Calyp_Lib_Catch2_Tests_SRCS
CalypLibTests.cpp
CalypStreamTests.cpp
+3
View File
@@ -3,6 +3,9 @@
#
OPTION(BUILD_MODULES_TESTS "Build unit tests of modules" ON)
IF(BUILD_MODULES_TESTS)
FETCHCONTENT_MAKEAVAILABLE(googletest Catch2)
INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIRS})
ADD_DEFINITIONS(-DCALYP_TEST_DATA_DIR=\"${CALYP_TEST_DATA_DIR}\")