From b848dec86a6abe467b13dc2148cbbb6da7fba096 Mon Sep 17 00:00:00 2001 From: rusdevops Date: Thu, 12 Oct 2017 07:53:24 -0700 Subject: [PATCH 1/2] Update CMakeLists.txt --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 18f5f7ac..a17532ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,6 +199,7 @@ SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries") IF(VMIME_BUILD_SHARED_LIBRARY) INSTALL( TARGETS ${VMIME_LIBRARY_NAME} + EXPORT ${VMIME_LIBRARY_NAME}-config LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" COMPONENT sharedlibs ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" COMPONENT sharedlibs ) @@ -207,6 +208,7 @@ ENDIF() IF(VMIME_BUILD_STATIC_LIBRARY) INSTALL( TARGETS ${VMIME_LIBRARY_NAME}-static + EXPORT ${VMIME_LIBRARY_NAME}-config LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" COMPONENT staticlibs ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" COMPONENT staticlibs ) @@ -222,6 +224,8 @@ INSTALL_HEADERS_WITH_DIRECTORY(VMIME_LIBRARY_GENERATED_INCLUDE_FILES headers "${ # COMPONENT headers #) +install(EXPORT ${VMIME_LIBRARY_NAME}-config DESTINATION cmake) + ############################################################################## # Tests From 51af739f8ecea4cde3f7ac2648be9c4c9ee421b4 Mon Sep 17 00:00:00 2001 From: rusdevops Date: Thu, 12 Oct 2017 08:06:53 -0700 Subject: [PATCH 2/2] Update CMakeLists.txt --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a17532ba..74291351 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,10 @@ IF(VMIME_BUILD_SHARED_LIBRARY) ${VMIME_LIBRARY_INCLUDE_FILES} ) + TARGET_INCLUDE_DIRECTORIES(${VMIME_LIBRARY_NAME} PUBLIC + $ + ) + GENERATE_EXPORT_HEADER( ${VMIME_LIBRARY_NAME} BASE_NAME VMIME @@ -154,6 +158,10 @@ IF(VMIME_BUILD_STATIC_LIBRARY) ${VMIME_LIBRARY_INCLUDE_FILES} ) + TARGET_INCLUDE_DIRECTORIES(${VMIME_LIBRARY_NAME}-static PUBLIC + $ + ) + GENERATE_EXPORT_HEADER( ${VMIME_LIBRARY_NAME}-static BASE_NAME VMIME