QtBigInt/CMakeLists.txt

54 lines
1.1 KiB
CMake
Raw Permalink Normal View History

2020-03-29 14:22:44 +03:00
#
2021-01-31 19:53:49 +03:00
# Copyright (C) 2018-2021 QuasarApp.
2020-03-29 14:22:44 +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-06-02 19:10:05 +03:00
cmake_minimum_required(VERSION 3.10)
project(QtBigint LANGUAGES CXX)
if(TARGET ${PROJECT_NAME})
message("The ${PROJECT_NAME} arledy included in main Project")
return()
endif()
2020-03-29 14:22:44 +03:00
2021-04-29 23:08:09 +03:00
include(CMake/QuasarApp.cmake)
include(CMake/Version.cmake)
2020-03-29 14:22:44 +03:00
2021-04-07 10:20:32 +03:00
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core QUIET)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core QUIET)
2020-06-02 19:10:05 +03:00
2021-04-07 10:20:32 +03:00
if (NOT DEFINED BIGINT_TESTS)
set(BIGINT_TESTS ON)
2020-12-27 15:09:06 +03:00
2021-04-07 10:20:32 +03:00
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
set(BIGINT_TESTS OFF)
endif()
endif()
if (ANDROID)
set(BIGINT_TESTS OFF)
endif()
if (NOT QT_VERSION_MAJOR)
set(BIGINT_TESTS OFF)
endif()
endif()
2021-04-29 23:08:09 +03:00
add_subdirectory(src)
2021-04-07 10:20:32 +03:00
if (BIGINT_TESTS)
add_subdirectory(tests)
2021-04-07 10:20:32 +03:00
else()
message("The ${PROJECT_NAME} tests is disabled.")
endif()
2020-06-02 19:10:05 +03:00
initAll()
2021-04-07 10:08:38 +03:00
addDoc(${PROJECT_NAME}Docs ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)