From fb94e8ad598af67f11471e2f1d3d6c3decbbe43c Mon Sep 17 00:00:00 2001 From: open-license-manager <rillf@maildrop.cc> Date: ćšć, 16 10æ 2014 04:24:17 +0800 Subject: [PATCH] openssl --- CMakeLists.txt | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01cdfd4..503ae24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,8 @@ #make it compatible with find_boost (exchange lowercase to camelcase) #fix shared libraries activation -cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) +#cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR) #version variables, major and minor must be 1 character only SET(LICENSECC_MAJOR_VERSION 1) @@ -12,8 +13,7 @@ SET(LICENSECC_VERSION "${LICENSECC_MAJOR_VERSION}.${LICENSECC_MINOR_VERSION}.${LICENSECC_PATCH_VERSION}") SET(LICENSECC_SHORT_LICENSE "BSD Software License") -# add this options before PROJECT keyword -SET(CMAKE_DISABLE_SOURCE_CHANGES OFF) +SET(CMAKE_DISABLE_SOURCE_CHANGES ON) SET(CMAKE_DISABLE_IN_SOURCE_BUILD ON) SET(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "CMake verbose" FORCE) @@ -80,11 +80,17 @@ #find a static version of openssl crypto library find_package(OpenSSL REQUIRED) include_directories(${OPENSSL_INCLUDE_DIR}) + #-lssl for backward compatibility with old openssl versions + list(APPEND EXTERNAL_LIBS ${OPENSSL_LIBRARIES}) list(APPEND EXTERNAL_LIBS ${OPENSSL_CRYPTO_LIBRARY}) - FIND_PACKAGE(Dbus REQUIRED) - include_directories(${DBUS_INCLUDE_DIR}) - include_directories(${DBUS_ARCH_INCLUDE_DIR}) - list(APPEND EXTERNAL_LIBS ${DBUS_LIBRARIES}) + MESSAGE(STATUS "Found openssl version ${OPENSSL_VERSION}") + if(USE_DBUS_IDENTIFIER) + FIND_PACKAGE(Dbus REQUIRED) + add_definitions(-DUSE_DBUS) + include_directories(${DBUS_INCLUDE_DIR}) + include_directories(${DBUS_ARCH_INCLUDE_DIR}) + list(APPEND EXTERNAL_LIBS ${DBUS_LIBRARIES}) + endif(USE_DBUS_IDENTIFIER) list(APPEND EXTERNAL_LIBS dl) endif(NOT WIN32) @@ -139,6 +145,8 @@ message("") message( STATUS "C compiler: " ${CMAKE_C_COMPILER}) message( STATUS "C compiler flags: " ${CMAKE_C_FLAGS}) +message( STATUS "CXX compiler: " ${CMAKE_CXX_COMPILER}) +message( STATUS "CXX compiler flags: " ${CMAKE_CXX_FLAGS}) if(CMAKE_BUILD_TYPE) message( STATUS "Build type: " ${CMAKE_BUILD_TYPE}) endif(CMAKE_BUILD_TYPE) -- Gitblit v1.9.1