diff --git a/CMakeLists.txt b/CMakeLists.txt index 18f5f7ac..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 @@ -199,6 +207,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 +216,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 +232,8 @@ INSTALL_HEADERS_WITH_DIRECTORY(VMIME_LIBRARY_GENERATED_INCLUDE_FILES headers "${ # COMPONENT headers #) +install(EXPORT ${VMIME_LIBRARY_NAME}-config DESTINATION cmake) + ############################################################################## # Tests