easyssl/CMakeLists.txt

60 lines
1.7 KiB
CMake
Raw Permalink Normal View History

2023-03-26 19:36:35 +03:00
#
2024-12-30 22:42:41 +01:00
# Copyright (C) 2020-2025 QuasarApp.
2023-03-26 21:25:15 +02:00
# Distributed under the GPLv3 software license, see the accompanying
2023-03-26 19:36:35 +03:00
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
2023-03-26 19:03:46 +02:00
cmake_minimum_required(VERSION 3.19)
2023-03-26 18:38:04 +02:00
project(easyssl LANGUAGES CXX)
2023-03-26 19:36:35 +03:00
if(TARGET ${PROJECT_NAME})
message("The ${PROJECT_NAME} arledy included in main Project")
return()
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (ANDROID)
2023-03-26 19:36:35 +03:00
set(BUILD_SHARED_LIBS ON)
endif()
if (NOT QT_VERSION_MAJOR)
2023-07-08 11:58:18 +02:00
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Network Test REQUIRED)
2023-03-26 19:36:35 +03:00
endif()
2023-07-08 11:58:18 +02:00
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Network Test REQUIRED)
2023-03-26 19:36:35 +03:00
include(submodules/CMake/QuasarApp.cmake)
updateGitVars()
2023-03-26 19:03:46 +02:00
set(EASYSSL_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
set(EASYSSL_PACKAGE_ID "quasarapp.core.easyssl")
2023-03-26 19:36:35 +03:00
2023-03-26 19:03:46 +02:00
option(EASYSSL_TESTS "This option disables or enables tests of the ${PROJECT_NAME} project" ON)
2023-03-26 21:13:39 +02:00
option(EASYSSL_STATIC_SSL "This option enable or disabled static link ssl libraryes" OFF)
2023-03-26 19:36:35 +03:00
if (ANDROID OR IOS OR NOT QT_VERSION_MAJOR OR QA_WASM32)
2023-03-26 19:03:46 +02:00
set(EASYSSL_TESTS OFF CACHE BOOL "This option force disbled for ANDROID IOS QA_WASM32 and Not Qt projects" FORCE)
2023-03-26 19:36:35 +03:00
endif()
make_directory(Distro)
initAll()
2023-03-26 19:03:46 +02:00
add_subdirectory(src/lib)
2023-03-26 19:36:35 +03:00
2023-03-26 19:03:46 +02:00
if (EASYSSL_TESTS)
2023-03-26 19:36:35 +03:00
add_subdirectory(tests)
else()
message("The ${PROJECT_NAME} tests is disabled.")
endif()
2023-03-26 21:13:39 +02:00
configure_file_in(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
2023-03-26 19:36:35 +03:00
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
2023-03-26 18:38:04 +02:00
addDeployFromCustomFile("easyssl" "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/easyssl.json")