diff --git a/CMakeLists.txt b/CMakeLists.txt index 61a2633..4335638 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,20 @@ if (USE_MAILIO_IMAP) find_package(mailio REQUIRED CONFIG) endif() -find_package(Qt6 COMPONENTS Core Gui Widgets Network Sql Test Concurrent REQUIRED) +# Find OpenSSL for S/MIME support (optional on some platforms) +find_package(OpenSSL QUIET) +if (OPENSSL_FOUND) + message(STATUS "OpenSSL found: ${OPENSSL_VERSION}") + add_compile_definitions(OPENSSL_FOUND) +else() + if (WIN32) + message(WARNING "OpenSSL not found - S/MIME support disabled. Install OpenSSL and set OPENSSL_ROOT_DIR to enable.") + else() + message(WARNING "OpenSSL not found - S/MIME support disabled") + endif() +endif() + +find_package(Qt6 COMPONENTS Core Gui Widgets Network Sql Test Concurrent PrintSupport REQUIRED) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON)