Qt-Secret/CMakeLists.txt

68 lines
1.6 KiB
CMake
Raw Permalink Normal View History

2020-06-02 19:18:53 +03:00
#
2021-01-31 19:55:13 +03:00
# Copyright (C) 2018-2021 QuasarApp.
2020-06-02 19:18:53 +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.
#
cmake_minimum_required(VERSION 3.10)
project(Qt-Secret LANGUAGES CXX)
if(TARGET ${PROJECT_NAME})
message("The ${PROJECT_NAME} arledy included in main Project")
return()
endif()
2021-04-29 23:46:11 +03:00
include(src/mini-gmp/CMake/QuasarApp.cmake)
include(src/mini-gmp/CMake/Version.cmake)
if (NOT DEFINED QTSECRET_TESTS)
set(QTSECRET_TESTS ON)
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
set(QTSECRET_TESTS OFF)
endif()
endif()
2022-05-17 09:28:09 +03:00
if (ANDROID OR IOS)
2021-04-29 23:46:11 +03:00
set(QTSECRET_TESTS OFF)
2021-04-29 23:50:40 +03:00
endif()
endif()
if (NOT DEFINED QTSECRET_GUI)
set(QTSECRET_GUI ON)
2021-04-29 23:46:11 +03:00
2021-04-29 23:50:40 +03:00
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
set(QTSECRET_GUI OFF)
endif()
endif()
2022-05-17 09:28:09 +03:00
if (ANDROID OR IOS)
2021-04-29 23:50:40 +03:00
set(QTSECRET_GUI OFF)
2021-04-29 23:46:11 +03:00
endif()
endif()
# Add sub directories
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
2020-06-02 19:18:53 +03:00
# Add sub directories
2021-04-29 23:46:11 +03:00
add_subdirectory(src/mini-gmp)
2020-06-02 19:18:53 +03:00
add_subdirectory(src)
2021-04-29 23:46:11 +03:00
if (QTSECRET_TESTS)
add_subdirectory(tests)
endif()
2020-06-02 19:18:53 +03:00
2021-04-29 23:50:40 +03:00
IF(QTSECRET_GUI)
message("The GUI Example is enabled")
add_subdirectory(Qt-Secret-GUI)
else()
message("The GUI Example is disabled")
endif()
2021-04-29 23:46:11 +03:00
initAll()
2020-06-02 19:18:53 +03:00
addDoc("Qt-Secret" ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)