Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-01-28 08:50:21 +0300
committerAdam Langley <agl@google.com>2015-01-28 23:40:10 +0300
commit507c1eec51b51f09d922b76e088f89fbb66b6161 (patch)
tree6c97411f6edcea45170be35abbd9576159ac9e4e /CMakeLists.txt
parentf4600adb0ec14b1b9334bb3cee6d85788d654094 (diff)
Honor the standard BUILD_SHARED_LIBS cmake variable.
The variable switches the default type for add_library from STATIC to SHARED. We can condition additional stuff on that for convenience. (tabtest still doesn't build.) BoringSSL as any kind of stable system shared library is still very much unsupported, but this is probably handy for making sure we don't forget all those pesky OPENSSL_EXPORTs. Change-Id: I66ab80bcddbf3724e03e85384141fdf4f4acbc2e Reviewed-on: https://boringssl-review.googlesource.com/3092 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 199d44da..6d2c39ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,13 @@ endif()
add_definitions(-DBORINGSSL_IMPLEMENTATION)
+if (BUILD_SHARED_LIBS)
+ add_definitions(-DBORINGSSL_SHARED_LIBRARY)
+ # Enable position-independent code globally. This is needed because
+ # some library targets are OBJECT libraries.
+ set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+endif()
+
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(ARCH "x86_64")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "amd64")