2020-03-01 17:10:37 +03:00
|
|
|
#
|
2022-03-03 19:01:19 +03:00
|
|
|
# Copyright (C) 2018-2022 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.
|
|
|
|
#
|
|
|
|
|
2020-09-15 21:16:35 +03:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
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()
|
|
|
|
|
2021-04-20 11:58:35 +03:00
|
|
|
include(QuasarAppLib/CMake/QuasarApp.cmake)
|
|
|
|
include(QuasarAppLib/CMake/Version.cmake)
|
|
|
|
|
2021-04-02 09:13:28 +03:00
|
|
|
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
|
|
|
|
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
|
|
|
|
initAll()
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2020-09-15 22:33:48 +03:00
|
|
|
if(NOT DEFINED HEART_BUILD_LVL)
|
2021-02-01 15:10:57 +03:00
|
|
|
set(HEART_BUILD_LVL 1)
|
2020-09-15 21:16:35 +03:00
|
|
|
endif()
|
2020-03-01 17:10:37 +03:00
|
|
|
|
2021-04-02 09:10:01 +03:00
|
|
|
if (NOT DEFINED HEART_TESTS)
|
|
|
|
set(HEART_TESTS ON)
|
|
|
|
|
2022-01-06 13:42:32 +03:00
|
|
|
if (ANDROID OR IOS)
|
2021-04-02 09:10:01 +03:00
|
|
|
set(HEART_TESTS OFF)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2021-04-15 12:16:57 +03:00
|
|
|
if (NOT DEFINED HEART_DB_CACHE)
|
|
|
|
set(HEART_DB_CACHE OFF)
|
|
|
|
|
|
|
|
if (ANDROID OR WIN32)
|
|
|
|
set(HEART_DB_CACHE OFF)
|
|
|
|
endif()
|
|
|
|
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)
|
2022-11-03 22:56:49 +03:00
|
|
|
option(CMAKE_SHARE "This option enable or disabled ssl functions of nodes" OFF)
|
|
|
|
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()
|
|
|
|
|
2021-05-10 18:13:01 +03:00
|
|
|
|
2021-04-15 12:16:57 +03:00
|
|
|
if (HEART_DB_CACHE)
|
|
|
|
add_definitions(-DHEART_DB_CACHE)
|
|
|
|
endif()
|
2021-04-02 09:10:01 +03:00
|
|
|
|
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)
|
|
|
|
|
2020-03-01 17:10:37 +03:00
|
|
|
add_subdirectory(QuasarAppLib)
|
2022-11-21 23:17:13 +03:00
|
|
|
add_subdirectory(submodules/crc)
|
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
|
|
|
|
2020-09-15 21:16:35 +03:00
|
|
|
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
|