diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2009-04-30 17:16:06 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2009-04-30 17:16:06 +0000 |
| commit | 5af5eef7eeff6cb26e34b1755471b4ee621d5edd (patch) | |
| tree | e4fd03b8f11f7ce932dea958516fd1eb5198d339 /cpp/src/ssl.cmake | |
| parent | cd5a790dcf32b692cedb82ef5d08549ce9a2d1b6 (diff) | |
| download | qpid-python-5af5eef7eeff6cb26e34b1755471b4ee621d5edd.tar.gz | |
Made cmake config more like the autotools version
- By default if it detects a dependency it will
build the module that needs it, otherwise it won't
- It can be forced to build modules so that automated
builds that have required outputs can fail config
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@770330 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/ssl.cmake')
| -rw-r--r-- | cpp/src/ssl.cmake | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cpp/src/ssl.cmake b/cpp/src/ssl.cmake index 4d42e04030..f7c155b24b 100644 --- a/cpp/src/ssl.cmake +++ b/cpp/src/ssl.cmake @@ -24,19 +24,25 @@ include(FindPkgConfig) +# According to some cmake docs this is not a reliable way to detect +# pkg-configed libraries, but it's no worse than what we did under +# autotools +pkg_check_modules(NSS nss) + +set (ssl_default ${ssl_force}) if (CMAKE_SYSTEM_NAME STREQUAL Windows) - set (ssl_default OFF) else (CMAKE_SYSTEM_NAME STREQUAL Windows) - set (ssl_default ON) + if (NSS_FOUND) + set (ssl_default ON) + endif (NSS_FOUND) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) option(BUILD_SSL "Build with support for SSL" ${ssl_default}) if (BUILD_SSL) - # According to some cmake docs this is not a reliable way to detect - # pkg-configed libraries, but it's no worse than what we did under - # autotools - pkg_check_modules(NSS REQUIRED nss) + if (NOT NSS_FOUND) + message(FATAL_ERROR "nss/nspr not found, required for ssl support") + endif (NOT NSS_FOUND) foreach(f ${NSS_CFLAGS}) set (NSS_COMPILE_FLAGS "${NSS_COMPILE_FLAGS} ${f}") |
