2020-03-01 17:10:37 +03:00
|
|
|
#
|
2024-12-30 22:44:47 +01:00
|
|
|
# Copyright (C) 2018-2025 QuasarApp.
|
2020-03-01 17:10:37 +03:00
|
|
|
# Distributed under the lgplv3 software license, see the accompanying
|
|
|
|
# Everyone is permitted to copy and distribute verbatim copies
|
|
|
|
# of this license document, but changing it is not allowed.
|
|
|
|
#
|
|
|
|
|
2023-07-21 21:12:59 +03:00
|
|
|
cmake_minimum_required(VERSION 3.18)
|
2021-04-02 09:13:28 +03:00
|
|
|
|
2020-09-15 21:16:35 +03:00
|
|
|
project(Heart)
|
|
|
|
if(TARGET ${PROJECT_NAME})
|
|
|
|
message("The ${PROJECT_NAME} arledy included in main Project")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2022-11-29 11:23:47 +03:00
|
|
|
include(submodules/QuasarAppLib/CMake/QuasarApp.cmake)
|
|
|
|
include(submodules/QuasarAppLib/CMake/Version.cmake)
|
2021-04-20 11:58:35 +03:00
|
|
|
|
2021-04-02 09:13:28 +03:00
|
|
|
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
|
|
|
|
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
|
|
|
|
initAll()
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2022-11-29 11:23:47 +03:00
|
|
|
updateGitVars()
|
2023-05-23 19:02:37 +02:00
|
|
|
set(HEART_VERSION 1.3.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH})
|
2021-04-02 09:10:01 +03:00
|
|
|
|
2022-11-29 11:23:47 +03:00
|
|
|
if (ANDROID OR IOS)
|
|
|
|
option(HEART_TESTS "Enable or disable tests of the heart library" OFF)
|
|
|
|
else()
|
|
|
|
option(HEART_TESTS "Enable or disable tests of the heart library" ON)
|
2021-04-15 12:16:57 +03:00
|
|
|
endif()
|
2021-11-29 18:06:57 +03:00
|
|
|
# Use only for android debug builds with debugging from usb.
|
|
|
|
option(HEART_STATIC_SSL "This option enable or disabled static link ssl libraryes" OFF)
|
2023-03-01 14:27:29 +01:00
|
|
|
option(HEART_PRINT_PACKAGES "This option enable or disabled log of add incoming network packages" OFF)
|
|
|
|
option(HEART_PRINT_SQL_QUERIES "This option enable or disabled log of all sql queries" OFF)
|
2023-04-24 21:58:58 +02:00
|
|
|
option(HEART_VALIDATE_PACKS "This option enable or disabled validation of child classes of the DataPack class" ON)
|
2022-12-22 16:54:26 +03:00
|
|
|
|
2022-11-03 22:56:49 +03:00
|
|
|
option(BUILD_SHARED_LIBS "Enable or disable shared libraryes" OFF)
|
2022-11-03 22:50:25 +03:00
|
|
|
|
|
|
|
if (WIN32)
|
|
|
|
option(HEART_SSL "This option enable or disabled ssl functions of nodes" OFF)
|
|
|
|
else()
|
|
|
|
option(HEART_SSL "This option enable or disabled ssl functions of nodes" ON)
|
|
|
|
endif()
|
|
|
|
|
2020-03-01 17:10:37 +03:00
|
|
|
# Add sub directories
|
2021-04-11 17:16:49 +03:00
|
|
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Network Sql Concurrent REQUIRED)
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Network Sql Concurrent REQUIRED)
|
|
|
|
|
2022-11-29 11:23:47 +03:00
|
|
|
add_subdirectory(submodules/QuasarAppLib)
|
2022-11-21 23:17:13 +03:00
|
|
|
add_subdirectory(submodules/crc)
|
2023-07-21 21:12:59 +03:00
|
|
|
|
|
|
|
if (HEART_SSL)
|
|
|
|
option(EASYSSL_TESTS "disable tests of the easyssl submodule " OFF)
|
|
|
|
option(EASYSSL_STATIC_SSL "disable tests of the easyssl submodule " ${HEART_STATIC_SSL})
|
|
|
|
|
|
|
|
add_subdirectory(submodules/easyssl)
|
|
|
|
endif()
|
|
|
|
|
2022-11-28 23:15:10 +03:00
|
|
|
add_subdirectory(src)
|
2021-04-02 09:10:01 +03:00
|
|
|
|
|
|
|
if (HEART_TESTS)
|
|
|
|
add_subdirectory(HeartTests)
|
|
|
|
endif()
|
2020-04-04 19:51:17 +03:00
|
|
|
|
2020-09-15 21:16:35 +03:00
|
|
|
initAll()
|
2020-03-01 17:10:37 +03:00
|
|
|
|
2022-11-29 11:23:47 +03:00
|
|
|
configure_file_in(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
|
2020-09-15 21:16:35 +03:00
|
|
|
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
|
2022-11-29 11:23:47 +03:00
|
|
|
|