From 8d5ba0ce79fc6762c0f4d92c290638b5614e6fb6 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Wed, 14 Dec 2016 15:14:39 +1000 Subject: [PATCH] * check is pcre.h available in cmake --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f37a422..efdb429 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ set(VERSION 0.3) project(${CNAME} C) cmake_minimum_required(VERSION 2.6) +include(CheckIncludeFiles) include(CTest) option(WITH_CLIENT "Simple client for configuring daemon" ON) @@ -37,6 +38,12 @@ if (WITH_HARDENING) add_definitions("-D_FORTIFY_SOURCE=2") endif () +check_include_files("pcre.h" HAS_PCRE) +if (${WITH_PCRE} STREQUAL "ON" AND NOT ${HAS_PCRE}) + set(WITH_PCRE "OFF") + message(WARNING "pcre headers not found, support disabled") +endif () + message(STATUS "Compiler : ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION})") message(STATUS "- CFLAGS : ${CMAKE_C_FLAGS}") message(STATUS "Paths:")