2021-03-18 17:39:15 +03:00
|
|
|
#
|
|
|
|
# Copyright (C) 2020-2021 QuasarApp.
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.14)
|
2021-03-18 17:47:57 +03:00
|
|
|
project(Credits)
|
2021-03-18 17:39:15 +03:00
|
|
|
if(TARGET ${PROJECT_NAME})
|
|
|
|
message("The ${PROJECT_NAME} arledy included in main Project")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2021-04-17 13:02:59 +03:00
|
|
|
if ( NOT DEFINED CREDITS_EXAMPLES )
|
|
|
|
set(CREDITS_EXAMPLES ON)
|
2021-03-22 11:58:13 +03:00
|
|
|
|
2021-04-17 13:02:59 +03:00
|
|
|
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
|
|
|
|
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
|
|
|
|
set(CREDITS_EXAMPLES OFF)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2022-01-06 13:41:50 +03:00
|
|
|
if (ANDROID OR IOS)
|
2021-04-17 13:02:59 +03:00
|
|
|
set(CREDITS_EXAMPLES OFF)
|
|
|
|
endif()
|
2021-03-22 11:58:13 +03:00
|
|
|
endif()
|
|
|
|
|
2021-04-17 13:02:59 +03:00
|
|
|
if ( NOT DEFINED CREDITS_TESTS )
|
|
|
|
set(CREDITS_TESTS ON)
|
|
|
|
|
|
|
|
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
|
|
|
|
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
|
|
|
|
set(CREDITS_TESTS OFF)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2022-01-06 13:41:50 +03:00
|
|
|
if (ANDROID OR IOS)
|
2021-04-17 13:02:59 +03:00
|
|
|
set(CREDITS_TESTS OFF)
|
|
|
|
endif()
|
2021-03-22 11:58:13 +03:00
|
|
|
endif()
|
2021-03-18 17:39:15 +03:00
|
|
|
|
2021-04-17 13:02:59 +03:00
|
|
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick QuickControls2 REQUIRED)
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick QuickControls2 REQUIRED)
|
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2021-04-20 17:48:16 +03:00
|
|
|
include(CMake/QuasarApp.cmake)
|
2021-04-17 13:02:59 +03:00
|
|
|
include(CMake/Version.cmake)
|
2021-03-18 17:39:15 +03:00
|
|
|
|
|
|
|
# Add sub directories
|
2021-04-17 13:02:59 +03:00
|
|
|
|
|
|
|
add_subdirectory(src/Library)
|
|
|
|
if (${CREDITS_EXAMPLES})
|
|
|
|
add_subdirectory(src/Example)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${CREDITS_TESTS})
|
2021-03-18 17:39:15 +03:00
|
|
|
add_subdirectory(tests)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
initAll()
|
|
|
|
|
|
|
|
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
|