summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2017-03-27 15:57:08 +0300
committerDmitry Kozlov <xeb@mail.ru>2017-03-27 15:57:08 +0300
commit837f73242956814bf98350d732d8aea0b7b830fa (patch)
tree9967a0029372aa29036703162333b37e41260a85 /CMakeLists.txt
parentb72efa378b32980f2114bcb8081fafbd93096aa0 (diff)
downloadaccel-ppp-837f73242956814bf98350d732d8aea0b7b830fa.tar.gz
accel-ppp-837f73242956814bf98350d732d8aea0b7b830fa.zip
cmake: check for pcre and openssl headers are present
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 22 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8cf2b901..1b0dbe83 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,20 @@ IF (NOT DEFINED LIB_SUFFIX)
ENDIF (ARCH STREQUAL x86_64)
ENDIF (NOT DEFINED LIB_SUFFIX)
+#color console example message(FATAL_ERROR "${Esc}[31m Red Text ${Esc}[m Restore Normal Text")
+string(ASCII 27 Esc)
+
+#Check libpcre
+find_library(PCRE_LIBRARY pcre
+ HINTS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
+ PATHS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
+)
+
+IF(NOT PCRE_LIBRARY)
+ message(FATAL_ERROR "${Esc}[31mRequired libpcre not found.\n Install libpcre3-dev and run cmake again${Esc}[m")
+ENDIF(NOT PCRE_LIBRARY)
+
+
IF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT IGNORE_GIT)
EXECUTE_PROCESS(
COMMAND git log --no-color
@@ -48,8 +62,15 @@ if (NOT BUILD_DRIVER_ONLY)
if (NOT DEFINED CRYPTO)
set(CRYPTO OPENSSL)
endif (NOT DEFINED CRYPTO)
-
+
if (CRYPTO STREQUAL OPENSSL)
+ find_library(CRYPTO_LIBRARY ssl
+ HINTS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
+ PATHS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
+ )
+ IF(NOT CRYPTO_LIBRARY)
+ message(FATAL_ERROR "${Esc}[31mRequired libcrypto-0.9.8 or probably later (openssl-0.9.8) not found.\n Install libssl-dev and run cmake again${Esc}[m")
+ ENDIF(NOT CRYPTO_LIBRARY)
add_definitions(-DCRYPTO_OPENSSL)
set(crypto_lib crypto ssl)
elseif (CRYPTO STREQUAL TOMCRYPT)