aboutsummaryrefslogtreecommitdiff
path: root/external/CMakeLists.txt
diff options
context:
space:
mode:
authorwarptangent <warptangent@tutanota.com>2016-02-12 16:52:52 -0800
committerwarptangent <warptangent@tutanota.com>2016-02-12 16:54:14 -0800
commit9832d18dcaf664750758f5f0afb73097cfdfa9c8 (patch)
tree49d32c8a41428b4ef1f8f1789c0fb17be9cb7e61 /external/CMakeLists.txt
parentcmake: Remove unused variable (diff)
downloadmonero-9832d18dcaf664750758f5f0afb73097cfdfa9c8.tar.xz
cmake: Include OpenSSL libraries in static linking
Diffstat (limited to 'external/CMakeLists.txt')
-rw-r--r--external/CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 70763caf0..33e843e63 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -76,11 +76,12 @@ endif()
find_package(Unbound)
if(NOT UNBOUND_INCLUDE_DIR OR STATIC)
- # We want unbound config tests to be independent of changes made to this setting.
- set(CURRENT_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+ # NOTE: If STATIC is true, CMAKE_FIND_LIBRARY_SUFFIXES has been reordered.
+ # unbound has config tests which used OpenSSL libraries, so -ldl may need to
+ # be set in this case.
+ # The unbound CMakeLists.txt can set it, since it's also needed for the
+ # static OpenSSL libraries set up there after with target_link_libraries.
add_subdirectory(unbound)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${CURRENT_CMAKE_FIND_LIBRARY_SUFFIXES})
set(UNBOUND_STATIC true PARENT_SCOPE)
set(UNBOUND_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/unbound/libunbound" PARENT_SCOPE)