pcre: do not explode if pcre is missing

This commit is contained in:
Matthew Barr
2018-01-19 15:20:39 +11:00
committed by Xiang Wang
parent 905a67375a
commit 277ee016a5
2 changed files with 8 additions and 2 deletions

View File

@@ -35,7 +35,8 @@ if (PCRE_BUILD_SOURCE)
if (NOT CORRECT_PCRE_VERSION)
unset(CORRECT_PCRE_VERSION CACHE)
message(FATAL_ERROR "Incorrect version of pcre - version ${PCRE_REQUIRED_VERSION} is required")
message(STATUS "Incorrect version of pcre - version ${PCRE_REQUIRED_VERSION} is required")
return ()
else()
message(STATUS "PCRE version ${PCRE_REQUIRED_VERSION} - building from source.")
endif()
@@ -55,7 +56,8 @@ else ()
if (PCRE_FOUND)
message(STATUS "PCRE version ${PCRE_REQUIRED_VERSION}")
else ()
message(FATAL_ERROR "PCRE version ${PCRE_REQUIRED_VERSION} not found")
message(STATUS "PCRE version ${PCRE_REQUIRED_VERSION} not found")
return ()
endif ()
endif (PCRE_BUILD_SOURCE)