Heart/CMakeLists.txt

64 lines
1.9 KiB
CMake
Raw Normal View History

2020-03-01 17:10:37 +03:00
#
2022-12-31 11:25:59 +03:00
# Copyright (C) 2018-2023 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()
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()
set(HEART_VERSION 1.2.${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)
2022-11-03 22:56:49 +03:00
option(CMAKE_SHARE "This option enable or disabled ssl functions of nodes" OFF)
2022-12-22 16:54:26 +03:00
option(PRINT_SQL_QUERIES "This option enable or disabled log of all sql queries" OFF)
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)
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