From 79f2b46f721b69bc182f35324f8fc195a5cf3f54 Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周六, 14 12月 2019 11:35:52 +0800 Subject: [PATCH] fix windows compilation, better cmake output --- CMakeLists.txt | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 405cd5c..e8fddab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR) +cmake_minimum_required(VERSION 3.6 FATAL_ERROR) SET(LICENSECC_SHORT_LICENSE "BSD Software License") @@ -34,13 +34,10 @@ SET(CMAKE_CROSSCOMPILING_EMULATOR "wine") ENDIF() - -SET ( OPENSSL_USE_STATIC_LIBS ON ) -find_package(OpenSSL COMPONENTS Crypto) +SET (OPENSSL_USE_STATIC_LIBS ON) +find_package(OpenSSL COMPONENTS Crypto QUIET) IF(OPENSSL_FOUND) MESSAGE(STATUS "Found openssl version ${OPENSSL_VERSION}") -ELSE(OPENSSL_FOUND) - MESSAGE(STATUS "OpenSSL not found") ENDIF(OPENSSL_FOUND) if(UNIX) #this is true for all the linux systems but not for cross compiling "linux->windows" @@ -69,6 +66,9 @@ endif(USE_DBUS_IDENTIFIER) set(main_lib_dest "lib/${PROJECT_NAME}") else(UNIX) + IF(NOT OPENSSL_FOUND) + MESSAGE(STATUS "Openssl not found, configuring the library without it (running in wine not supported).") + ENDIF(NOT OPENSSL_FOUND) if(MSVC) include(target_arch) target_architecture( TARGET_ARCHITECTURE ) -- Gitblit v1.9.1