From f96a083d979b03d0fcb1205ad69ac57bab79c26a Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 12 Feb 2020 14:54:28 -0800 Subject: [PATCH] Always use bundled PCRE on Mac A code-signed fish cannot load a PCRE that is not codesigned, which can easily come about through Homebrew. --- cmake/PCRE2.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/PCRE2.cmake b/cmake/PCRE2.cmake index 23f483551..9121916d0 100644 --- a/cmake/PCRE2.cmake +++ b/cmake/PCRE2.cmake @@ -7,8 +7,10 @@ SET(PCRE2_BUILD_PCRE2GREP OFF CACHE BOOL "Build pcre2grep") SET(PCRE2_MIN_VERSION 10.21) -FIND_LIBRARY(PCRE2_LIB pcre2-${PCRE2_WIDTH}) -FIND_PATH(PCRE2_INCLUDE_DIR pcre2.h) +IF (NOT APPLE) + FIND_LIBRARY(PCRE2_LIB pcre2-${PCRE2_WIDTH}) + FIND_PATH(PCRE2_INCLUDE_DIR pcre2.h) +ENDIF() IF (PCRE2_LIB AND PCRE2_INCLUDE_DIR) MESSAGE(STATUS "Found system PCRE2 library ${PCRE2_INCLUDE_DIR}") ELSE() @@ -16,5 +18,5 @@ ELSE() ADD_SUBDIRECTORY(pcre2-10.32 EXCLUDE_FROM_ALL) SET(PCRE2_INCLUDE_DIR ${CMAKE_BINARY_DIR}/pcre2-10.32/) SET(PCRE2_LIB pcre2-${PCRE2_WIDTH}) -endif(PCRE2_LIB AND PCRE2_INCLUDE_DIR) +ENDIF(PCRE2_LIB AND PCRE2_INCLUDE_DIR) INCLUDE_DIRECTORIES(${PCRE2_INCLUDE_DIR})