1############################################################################ 2# 3# PCRE additions 4# 5# Perl-Compatible Regular Expressions (PCRE) 6 7find_package(PCRE) 8set(PCRE_INCLUDE ${PCRE_INCLUDE_DIR}) 9set(PCRE_LIBS ${PCRE_LIBRARIES}) 10if (PCRE_FOUND) 11 set(HAVE_LIBPCRE 1) 12endif() 13 14if (WIN32 AND HAVE_LIBPCRE) 15 set(USE_LOCAL_PCRE TRUE) 16endif() 17 18if (HAVE_LIBPCRE AND NOT USE_LOCAL_PCRE) 19 set(PCRE_LIBS -lpcre) 20else(HAVE_LIBPCRE AND NOT USE_LOCAL_PCRE) 21 set(USE_LOCAL_PCRE 1 CACHE INTERNAL "Using local PCRE due to system library absence") 22 set(PCRE_LIBS regexp) 23endif(HAVE_LIBPCRE AND NOT USE_LOCAL_PCRE) 24 25