Credits/CMakeLists.txt

42 lines
991 B
CMake
Raw Normal View History

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()
set (QT_VERSION_MAJOR OFF)
2021-03-22 11:58:13 +03:00
if(NOT DEFINED CREDITS_TESTS)
set (CREDITS_TESTS ON)
endif()
if(NOT DEFINED CREDITS_EXAMPLES)
set (CREDITS_EXAMPLES ON)
endif()
2021-03-18 17:39:15 +03:00
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Test QUIET)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test QUIET)
include(CMake/ccache.cmake)
include(CMake/QuasarAppCITargets.cmake)
2021-04-13 16:34:15 +03:00
include(CMake/QtUtils.cmake)
2021-03-18 17:39:15 +03:00
# Add sub directories
add_subdirectory(src)
2021-03-22 11:58:13 +03:00
if (${QT_VERSION_MAJOR} AND ${CREDITS_TESTS})
2021-03-18 17:39:15 +03:00
add_subdirectory(tests)
endif()
initAll()
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)