diff --git a/.gitmodules b/.gitmodules index f305b28..7592d00 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "CMake"] path = submodules/CMake url = https://github.com/QuasarApp/CMake.git +[submodule "submodules/openssl-builder"] + path = submodules/openssl-builder + url = https://github.com/QuasarApp/openssl-builder.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 906c1ec..da1ccdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,8 @@ cmake_minimum_required(VERSION 3.19) project(easyssl LANGUAGES CXX) if(TARGET ${PROJECT_NAME}) - message("The ${PROJECT_NAME} arledy included in main Project") - return() + message("The ${PROJECT_NAME} arledy included in main Project") + return() endif() set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -37,6 +37,13 @@ set(EASYSSL_PACKAGE_ID "quasarapp.core.easyssl") option(EASYSSL_TESTS "This option disables or enables tests of the ${PROJECT_NAME} project" ON) option(EASYSSL_STATIC_SSL "This option enable or disabled static link ssl libraryes" OFF) +option(BUILD_WITH_OPENSSL "This option enable or disabled build thirdparty libraryes with easyssl library (for example openssl)" OFF) + +if (BUILD_WITH_OPENSSL) + if (QA_WASM32 OR WIN32) + critical("The BUILD_WITH_OPENSSL not supports the Windows and WASM platforms") + endif() +endif() if (ANDROID OR IOS OR NOT QT_VERSION_MAJOR OR QA_WASM32) set(EASYSSL_TESTS OFF CACHE BOOL "This option force disbled for ANDROID IOS QA_WASM32 and Not Qt projects" FORCE) diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index a4911da..fead596 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -12,6 +12,10 @@ get_filename_component(CURRENT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME) set(CURRENT_PROJECT "${PROJECT_NAME}") add_definitions(-DEASYSSL_LIBRARY) +if (BUILD_WITH_OPENSSL) + +endif() + list(APPEND CMAKE_FIND_ROOT_PATH "$ENV{OPENSSL_ROOT_DIR}") find_package(OpenSSL 3.0 REQUIRED) diff --git a/submodules/openssl-builder b/submodules/openssl-builder new file mode 160000 index 0000000..5c49769 --- /dev/null +++ b/submodules/openssl-builder @@ -0,0 +1 @@ +Subproject commit 5c4976980ec5f77d760537eb7fbdb0db646a9a64