bluetiger9 / SmtpClient-for-Qt

An SMTP Client writen in C++ for Qt. Allows applications to send emails (MIME with text, html, attachments, inline files, etc.) via SMTP. Supports SSL and SMTP authentication.
https://github.com/bluetiger9/SmtpClient-for-Qt/wiki
GNU Lesser General Public License v2.1
449 stars 226 forks source link

Add CMake support #147

Closed bgallois closed 1 year ago

bgallois commented 1 year ago

Added CMakeLists.txt to support CMake build. Library can be compiled and installed using:

cmake ../ -DCMAKE_INSTALL_PREFIX="path_to_release_folder" -DQT_VERSION_MAJOR=6
cmake --build .
cmake --install .

Library can be used with #include "smtpmime/SmtpMime" and adding:

link_directories("path_to_release_folder/lib")
include_directories("path_to_release_folder/include")
target_link_libraries(exec_name PRIVATE Qt${QT_VERSION_MAJOR}SmtpMime)
bluetiger9 commented 1 year ago

Merged this. Thanks!