cmake: Write libssh-config.cmake using EXPORTS

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
(cherry picked from commit 68533147e2)
This commit is contained in:
Andreas Schneider
2019-07-03 10:13:33 +02:00
parent 2a3718de51
commit 36dc66da81
3 changed files with 4 additions and 22 deletions

View File

@@ -355,11 +355,15 @@ endif ()
install(TARGETS ${LIBSSH_SHARED_LIBRARY}
EXPORT libssh-config
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT libraries)
install(EXPORT libssh-config
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
if (BUILD_STATIC_LIB)
add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS})
target_compile_options(${LIBSSH_STATIC_LIBRARY}