aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDon <don.j.olmstead@gmail.com>2018-03-19 19:42:55 -0700
committerDon <don.j.olmstead@gmail.com>2018-03-21 10:24:52 -0700
commit26bebfc564c48fdb7fca064ccc975565d1dc53ab (patch)
treebabfeefc5881772707dd533392ae02e16780e5f9 /CMakeLists.txt
parentc22031f0fc020e6de9b2ef4de16fa10c674ec8fa (diff)
downloadportable-26bebfc564c48fdb7fca064ccc975565d1dc53ab.tar.gz
portable-26bebfc564c48fdb7fca064ccc975565d1dc53ab.tar.bz2
portable-26bebfc564c48fdb7fca064ccc975565d1dc53ab.zip
Use BUILD_SHARED_LIBS to specify library type
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 1 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a67405a..b708f07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,23 +262,7 @@ if(ENABLE_ASM)
262 endif() 262 endif()
263endif() 263endif()
264 264
265if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|CYGWIN)")) 265set(OPENSSL_LIBS tls ssl crypto)
266 set(BUILD_SHARED true)
267endif()
268
269# USE_SHARED builds applications (e.g. openssl) using shared LibreSSL.
270# By default, applications use LibreSSL static library to avoid dependencies.
271# USE_SHARED isn't set by default; use -DUSE_SHARED=ON with CMake to enable.
272# Can be helpful for debugging; don't use for public releases.
273if(NOT BUILD_SHARED)
274 set(USE_SHARED off)
275endif()
276
277if(USE_SHARED)
278 set(OPENSSL_LIBS tls-shared ssl-shared crypto-shared)
279else()
280 set(OPENSSL_LIBS tls ssl crypto)
281endif()
282 266
283if(WIN32) 267if(WIN32)
284 set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32) 268 set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32)