diff options
author | Brent Cook <bcook@openbsd.org> | 2018-03-18 09:52:27 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2018-03-18 09:52:27 -0500 |
commit | c9c8e32fbe95f254f9017c23b4804c5988f35caa (patch) | |
tree | 5c50eed60713968f387c0133f9dc8aedd1a9f692 /ssl | |
parent | 0dfd7cb1034f1bdbab8bbc7cb1dee2b4b02f092e (diff) | |
parent | 5fb488de9f70d9d306c83d1316998e86d95f4a4e (diff) | |
download | portable-c9c8e32fbe95f254f9017c23b4804c5988f35caa.tar.gz portable-c9c8e32fbe95f254f9017c23b4804c5988f35caa.tar.bz2 portable-c9c8e32fbe95f254f9017c23b4804c5988f35caa.zip |
Land #400, Use groups in CMake install command for libraries
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/CMakeLists.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt index 3ea16a8..93f20ee 100644 --- a/ssl/CMakeLists.txt +++ b/ssl/CMakeLists.txt | |||
@@ -47,7 +47,9 @@ set( | |||
47 | ) | 47 | ) |
48 | 48 | ||
49 | add_library(ssl-objects OBJECT ${SSL_SRC}) | 49 | add_library(ssl-objects OBJECT ${SSL_SRC}) |
50 | set(SSL_LIBRARIES ssl) | ||
50 | if (BUILD_SHARED) | 51 | if (BUILD_SHARED) |
52 | list(APPEND SSL_LIBRARIES ssl-shared) | ||
51 | add_library(ssl STATIC $<TARGET_OBJECTS:ssl-objects>) | 53 | add_library(ssl STATIC $<TARGET_OBJECTS:ssl-objects>) |
52 | add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>) | 54 | add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>) |
53 | export_symbol(ssl-shared ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym) | 55 | export_symbol(ssl-shared ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym) |
@@ -61,12 +63,15 @@ if (BUILD_SHARED) | |||
61 | ARCHIVE_OUTPUT_NAME ssl${SSL_POSTFIX}) | 63 | ARCHIVE_OUTPUT_NAME ssl${SSL_POSTFIX}) |
62 | set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION} | 64 | set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION} |
63 | SOVERSION ${SSL_MAJOR_VERSION}) | 65 | SOVERSION ${SSL_MAJOR_VERSION}) |
64 | if(ENABLE_LIBRESSL_INSTALL) | ||
65 | install(TARGETS ssl ssl-shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
66 | endif(ENABLE_LIBRESSL_INSTALL) | ||
67 | else() | 66 | else() |
68 | add_library(ssl STATIC ${SSL_SRC}) | 67 | add_library(ssl STATIC ${SSL_SRC}) |
69 | if(ENABLE_LIBRESSL_INSTALL) | ||
70 | install(TARGETS ssl DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
71 | endif(ENABLE_LIBRESSL_INSTALL) | ||
72 | endif() | 68 | endif() |
69 | |||
70 | if(ENABLE_LIBRESSL_INSTALL) | ||
71 | install( | ||
72 | TARGETS ${SSL_LIBRARIES} | ||
73 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
74 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
75 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
76 | ) | ||
77 | endif(ENABLE_LIBRESSL_INSTALL) | ||