aboutsummaryrefslogtreecommitdiff
path: root/tls
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2018-03-18 09:52:27 -0500
committerBrent Cook <bcook@openbsd.org>2018-03-18 09:52:27 -0500
commitc9c8e32fbe95f254f9017c23b4804c5988f35caa (patch)
tree5c50eed60713968f387c0133f9dc8aedd1a9f692 /tls
parent0dfd7cb1034f1bdbab8bbc7cb1dee2b4b02f092e (diff)
parent5fb488de9f70d9d306c83d1316998e86d95f4a4e (diff)
downloadportable-c9c8e32fbe95f254f9017c23b4804c5988f35caa.tar.gz
portable-c9c8e32fbe95f254f9017c23b4804c5988f35caa.tar.bz2
portable-c9c8e32fbe95f254f9017c23b4804c5988f35caa.zip
Land #400, Use groups in CMake install command for libraries
Diffstat (limited to 'tls')
-rw-r--r--tls/CMakeLists.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt
index 0e13da5..71f505a 100644
--- a/tls/CMakeLists.txt
+++ b/tls/CMakeLists.txt
@@ -37,7 +37,9 @@ else()
37endif() 37endif()
38 38
39add_library(tls-objects OBJECT ${TLS_SRC}) 39add_library(tls-objects OBJECT ${TLS_SRC})
40set(TLS_LIBRARIES tls)
40if (BUILD_SHARED) 41if (BUILD_SHARED)
42 list(APPEND TLS_LIBRARIES tls-shared)
41 add_library(tls STATIC $<TARGET_OBJECTS:tls-objects>) 43 add_library(tls STATIC $<TARGET_OBJECTS:tls-objects>)
42 add_library(tls-shared SHARED $<TARGET_OBJECTS:tls-objects>) 44 add_library(tls-shared SHARED $<TARGET_OBJECTS:tls-objects>)
43 export_symbol(tls-shared ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym) 45 export_symbol(tls-shared ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym)
@@ -51,13 +53,15 @@ if (BUILD_SHARED)
51 ARCHIVE_OUTPUT_NAME tls${TLS_POSTFIX}) 53 ARCHIVE_OUTPUT_NAME tls${TLS_POSTFIX})
52 set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION} 54 set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION}
53 SOVERSION ${TLS_MAJOR_VERSION}) 55 SOVERSION ${TLS_MAJOR_VERSION})
54 if(ENABLE_LIBRESSL_INSTALL)
55 install(TARGETS tls tls-shared DESTINATION ${CMAKE_INSTALL_LIBDIR})
56 endif(ENABLE_LIBRESSL_INSTALL)
57else() 56else()
58 add_library(tls STATIC ${TLS_SRC}) 57 add_library(tls STATIC ${TLS_SRC})
59 if(ENABLE_LIBRESSL_INSTALL)
60 install(TARGETS tls DESTINATION ${CMAKE_INSTALL_LIBDIR})
61 endif(ENABLE_LIBRESSL_INSTALL)
62endif() 58endif()
63 59
60if(ENABLE_LIBRESSL_INSTALL)
61 install(
62 TARGETS ${TLS_LIBRARIES}
63 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
64 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
65 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
66 )
67endif(ENABLE_LIBRESSL_INSTALL)