diff options
author | Rolf Eike Beer <eb@emlix.com> | 2022-09-27 09:11:07 +0200 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-11-23 08:44:48 -0500 |
commit | 5ec794dc7e06bacebb10228a0029e6c2458f420f (patch) | |
tree | 79aa809102510be5fc8618fd0b80ae75e5f9dd9c /src/CMakeLists.txt | |
parent | 6009f33c2ebbd676c18f9ccf460c74c61eb81b9a (diff) | |
download | lighttpd-git-5ec794dc7e06bacebb10228a0029e6c2458f420f.tar.gz |
[cmake] prefer libpcre.pc over pcre-config
github: #121
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 73e298d0..bc872a3a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -578,8 +578,11 @@ if(WITH_PCRE2) message(FATAL_ERROR "libpcre2-8 couldn't be found") endif() elseif(WITH_PCRE) - ## if we have pcre-config, use it - xconfig(pcre-config PCRE_LDFLAGS PCRE_CFLAGS) + pkg_check_modules(PCRE libpcre) + if(NOT PCRE_FOUND) + ## if we have pcre-config, use it + xconfig(pcre-config PCRE_LDFLAGS PCRE_CFLAGS) + endif() if(PCRE_LDFLAGS OR PCRE_CFLAGS) message(STATUS "found pcre at: LDFLAGS: ${PCRE_LDFLAGS} CFLAGS: ${PCRE_CFLAGS}") |