From f580d3086a8b3c7625e2122ab5761a7f3ab89d7a Mon Sep 17 00:00:00 2001 From: assange0 Date: Wed, 14 Aug 2019 21:55:35 +0800 Subject: [PATCH] :pushpin: Fix for Botan 2.11+ Some functions were moved into "botan/filters.h" header since Botan2 Version 2.11. --- CMakeLists.txt | 6 +++++- lib/crypto/cipher.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a8d731..6915faf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.1) project(QtShadowsocks - VERSION 2.1.0 + VERSION 2.1.0.1 LANGUAGES CXX) option(BUILD_SHARED_LIBS "Build ${PROJECT_NAME} as a shared library" ON) @@ -31,6 +31,10 @@ pkg_search_module(BOTAN REQUIRED botan-2>=2.3.0 botan-1.10) if(BOTAN_VERSION VERSION_GREATER 2.0) message(STATUS "Botan-2 is found and will be used in this build") add_definitions(-DUSE_BOTAN2) + if(BOTAN_VERSION VERSION_GREATER_EQUAL 2.11.0) + message(STATUS "Botan-2 Version 2.11+ is found and will be used in this build") + add_definitions(-DUSE_BOTAN211P) + endif() else() message(DEPRECATION "Botan-1.10 is found and will be used in this build. However, Botan-1.10 is deprecated and should not be used if possible") endif() diff --git a/lib/crypto/cipher.cpp b/lib/crypto/cipher.cpp index 561d677..5e621c1 100644 --- a/lib/crypto/cipher.cpp +++ b/lib/crypto/cipher.cpp @@ -37,6 +37,10 @@ #include #endif +#ifdef USE_BOTAN211P +#include +#endif + #include #include #include