diff options
author | Julien Schueller <schueller@phimeca.com> | 2021-08-05 15:27:00 +0200 |
---|---|---|
committer | Vadim Zeitlin <vz-swig@zeitlins.org> | 2021-10-03 16:32:11 +0200 |
commit | 42ed181e0816e32e0145bc02bdd4cc0141519de3 (patch) | |
tree | bb89829f4455a681079a07be546b2ea6b2d5dd6d /CMakeLists.txt | |
parent | 892db20d1244f2514c4c5deb25078e0b3da9942a (diff) | |
download | swig-42ed181e0816e32e0145bc02bdd4cc0141519de3.tar.gz |
[CMake] Add option to enable pcre
Closes #2031, #2065.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b6743471..8a195de54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,9 +73,9 @@ if (MSVC) set (CMAKE_CXX_FLAGS "/EHsc ${CMAKE_CXX_FLAGS}") endif () -set (PCRE_REQUIRED_ARG "REQUIRED" CACHE STRING "required arg") -find_package (PCRE ${PCRE_REQUIRED_ARG}) -if (PCRE_FOUND) +option (WITH_PCRE "Enable pcre" ON) +if (WITH_PCRE) + find_package (PCRE REQUIRED) set (HAVE_PCRE 1) include_directories (${PCRE_INCLUDE_DIRS}) endif() |