From 4563cc93829cf2b14f778f5062e5a18b07c00cda Mon Sep 17 00:00:00 2001 From: SharpCoiner Date: Thu, 6 Feb 2014 14:06:26 -0800 Subject: [PATCH] Fixed header and lib search paths for too old Crypto++. --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be0b668d9..56928928e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,6 @@ find_library(LS NAMES cryptoppeth cryptopp ) if(ID AND LS) - set(CRYPTOPP_FOUND TRUE) message(STATUS "Found Crypto++: ${ID}, ${LS}") set(_CRYPTOPP_VERSION_HEADER ${ID}/config.h) if(EXISTS ${_CRYPTOPP_VERSION_HEADER}) @@ -60,9 +59,13 @@ if(ID AND LS) endif() if(NOT CRYPTOPP_FOUND) - message(STATUS "System Crypto++ not found, broken or too old. We use ../cryptopp562") set(CRYPTOPP_INCLUDE_DIR "../cryptopp562" CACHE FILEPATH "" FORCE) - set(CRYPTOPP_LIBRARIES "../cryptopp562" CACHE FILEPATH "" FORCE) + find_library(LSLOC NAMES cryptoppeth cryptopp + PATHS ../cryptopp562 + NO_DEFAULT_PATH + ) + set(CRYPTOPP_LIBRARIES ${LSLOC} CACHE FILEPATH "" FORCE) + message(STATUS "System Crypto++ not found, broken or too old. We use ${LSLOC}") endif() # Not really worth caching. We want to reevaluate anyway.