Heart/CMakeLists.txt

65 lines
1.4 KiB
CMake
Raw Normal View History

2020-03-01 17:10:37 +03:00
#
# Copyright (C) 2018-2021 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-02 09:13:28 +03:00
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
include(QuasarAppLib/CMake/QuasarAppCITargets.cmake)
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)
if (ANDROID)
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()
if (HEART_DB_CACHE)
add_definitions(-DHEART_DB_CACHE)
endif()
2021-04-02 09:10:01 +03:00
2021-04-20 11:57:03 +03:00
include(../QuasarAppLib/CMake/QuasarApp.cmake)
include(../QuasarAppLib/CMake/Version.cmake)
2020-04-04 19:51:17 +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)
2020-09-15 21:16:35 +03:00
add_subdirectory(Heart)
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)