diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2017-12-10 22:12:09 -0800 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2017-12-10 22:12:09 -0800 |
commit | 415a8b06cbfc382ddeed36e95ef390ee2f015bde (patch) | |
tree | fa35b8b8a1fb56f7c0134ebd5cb1c8f2ce023346 /CMakeLists.txt | |
parent | 0694aa1a766439abea8d3501dedb1e81cbdafc5d (diff) | |
download | rabbitmq-c-ossl-init.tar.gz |
Fix: move threads-checkossl-init
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ce807a2..fc07473 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,17 @@ if (CLOCK_GETTIME_NEEDS_LIBRT OR POSIX_SPAWNP_NEEDS_LIBRT) set(LIBRT rt) endif() +option(ENABLE_SSL_SUPPORT "Enable SSL support" ON) + +if (ENABLE_SSL_SUPPORT) + find_package(OpenSSL 0.9.8 REQUIRED) + + cmake_push_check_state() + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + cmake_pop_check_state() +endif() + if (MSVC) set(CMAKE_C_FLAGS "/W4 /nologo ${CMAKE_C_FLAGS}") elseif (CMAKE_C_COMPILER_ID MATCHES ".*Clang") @@ -255,16 +266,6 @@ option(BUILD_TOOLS "Build Tools (requires POPT Library)" ${POPT_FOUND}) option(BUILD_TOOLS_DOCS "Build man pages for Tools (requires xmlto)" ${DO_DOCS}) option(BUILD_TESTS "Build tests (run tests with make test)" ON) option(BUILD_API_DOCS "Build Doxygen API docs" ${DOXYGEN_FOUND}) -option(ENABLE_SSL_SUPPORT "Enable SSL support" ON) - -if (ENABLE_SSL_SUPPORT) - find_package(OpenSSL 0.9.8 REQUIRED) - - cmake_push_check_state() - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) - cmake_pop_check_state() -endif() if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS) message(FATAL_ERROR "One or both of BUILD_SHARED_LIBS or BUILD_STATIC_LIBS must be set to ON to build") |