Skip to content

Commit

Permalink
Merge pull request #167 from jdelromano/patch-1
Browse files Browse the repository at this point in the history
Update CMakeLists.txt
  • Loading branch information
attila-tokes authored Sep 9, 2024
2 parents cd3836e + 95c8758 commit 97db20e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)

project(SmtpMime VERSION 0.1 LANGUAGES CXX)
project(SmtpMime VERSION 2.0 LANGUAGES C CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
Expand All @@ -14,9 +14,9 @@ find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Network REQUIRED)

add_compile_options(-DSMTP_MIME_LIBRARY)

message(USING QT${QT_VERSION_MAJOR})
message(USING Qt${QT_VERSION_MAJOR})

add_library(${PROJECT_NAME} SHARED
qt_add_library(${PROJECT_NAME} SHARED
emailaddress.cpp
mimeattachment.cpp
mimebytearrayattachment.cpp
Expand Down Expand Up @@ -98,12 +98,14 @@ set(public_headers
mimebytearrayattachment.h
)
# note that ${public_headers} has to be in quotes
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${public_headers}")
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
PUBLIC_HEADER "${public_headers}"
)

include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/smtpmime
)

0 comments on commit 97db20e

Please sign in to comment.