2023-12-02 11:54:00 +03:00
|
|
|
#
|
2024-01-13 11:09:55 +01:00
|
|
|
# Copyright (C) 2024-2024 QuasarApp.
|
2023-12-02 11:54:00 +03:00
|
|
|
# Distributed under the GPLv3 software license, see the accompanying
|
|
|
|
# Everyone is permitted to copy and distribute verbatim copies
|
|
|
|
# of this license document, but changing it is not allowed.
|
|
|
|
#
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.19)
|
2023-12-02 11:01:57 +01:00
|
|
|
project(SecretService LANGUAGES CXX)
|
2023-12-02 11:54:00 +03:00
|
|
|
if(TARGET ${PROJECT_NAME})
|
|
|
|
message("The ${PROJECT_NAME} arledy included in main Project")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
2024-01-14 15:41:14 +01:00
|
|
|
set(BUILD_SHARED_LIBS ON)
|
2023-12-02 11:54:00 +03:00
|
|
|
|
|
|
|
if (ANDROID OR IOS)
|
|
|
|
set(BUILD_SHARED_LIBS ON)
|
|
|
|
endif()
|
|
|
|
|
2023-12-02 11:01:57 +01:00
|
|
|
find_package(Qt6 COMPONENTS Core Network Sql Concurrent REQUIRED)
|
2023-12-02 11:54:00 +03:00
|
|
|
find_package(Qt6 COMPONENTS Test QUIET)
|
|
|
|
|
2023-12-02 11:01:57 +01:00
|
|
|
include(submodules/Heart/submodules/QuasarAppLib/CMake/QuasarApp.cmake)
|
2023-12-02 11:54:00 +03:00
|
|
|
|
|
|
|
updateGitVars()
|
2023-12-02 11:01:57 +01:00
|
|
|
set(SECRETSERVICE_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
|
|
|
|
set(SECRETSERVICE_PACKAGE_ID "quasarapp.core.secretservice")
|
2023-12-02 11:54:00 +03:00
|
|
|
|
2023-12-02 11:01:57 +01:00
|
|
|
option(SECRETSERVICE_TESTS "This option disables or enables tests of the ${PROJECT_NAME} project" ON)
|
|
|
|
option(SECRETSERVICE_EXAMPLE "This option disables or enables example app of the ${PROJECT_NAME} project" ON)
|
2023-12-02 11:54:00 +03:00
|
|
|
|
|
|
|
if (ANDROID OR IOS OR QA_WASM32)
|
2023-12-02 11:01:57 +01:00
|
|
|
set(SECRETSERVICE_TESTS OFF CACHE BOOL "This option force disbled for ANDROID IOS QA_WASM32 and Not Qt projects" FORCE)
|
2023-12-02 11:54:00 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
make_directory(Distro)
|
|
|
|
|
|
|
|
initAll()
|
|
|
|
|
2023-12-02 11:01:57 +01:00
|
|
|
if (SECRETSERVICE_TESTS)
|
2023-12-02 11:54:00 +03:00
|
|
|
add_subdirectory(src/testcore)
|
|
|
|
endif()
|
|
|
|
|
2023-12-02 11:01:57 +01:00
|
|
|
set(HEART_TESTS OFF)
|
|
|
|
add_subdirectory(submodules/Heart)
|
2023-12-02 11:54:00 +03:00
|
|
|
|
2024-01-09 22:54:50 +01:00
|
|
|
add_subdirectory(src/db)
|
2023-12-02 11:01:57 +01:00
|
|
|
add_subdirectory(src/core)
|
|
|
|
|
|
|
|
set(PATRONUM_TESTS OFF)
|
|
|
|
add_subdirectory(submodules/Patronum)
|
|
|
|
add_subdirectory(src/service)
|
|
|
|
|
|
|
|
if (DEFINED SECRETSERVICE_EXAMPLE)
|
2023-12-02 11:54:00 +03:00
|
|
|
add_subdirectory(src/example)
|
|
|
|
endif()
|
|
|
|
|
2023-12-02 11:01:57 +01:00
|
|
|
if (SECRETSERVICE_TESTS)
|
2023-12-02 11:54:00 +03:00
|
|
|
add_subdirectory(tests)
|
|
|
|
else()
|
|
|
|
message("The ${PROJECT_NAME} tests is disabled.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
configure_file_in(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
|
|
|
|
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
|