4
0
mirror of https://github.com/QuasarApp/Credits.git synced 2025-05-14 02:19:42 +00:00
Credits/CMakeLists.txt
2021-03-22 11:58:13 +03:00

42 lines
986 B
CMake

#
# 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)
project(Credits)
if(TARGET ${PROJECT_NAME})
message("The ${PROJECT_NAME} arledy included in main Project")
return()
endif()
set (QT_VERSION_MAJOR OFF)
if(NOT DEFINED CREDITS_TESTS)
set (CREDITS_TESTS ON)
endif()
if(NOT DEFINED CREDITS_EXAMPLES)
set (CREDITS_EXAMPLES ON)
endif()
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)
include(CMake/tr.cmake)
# Add sub directories
add_subdirectory(src)
if (${QT_VERSION_MAJOR} AND ${CREDITS_TESTS})
add_subdirectory(tests)
endif()
initAll()
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)