Drop PCRE dependency.

The config file is now manually parsed instead of using regex.
While this is less beautifull, it allows us to drop PCRE
as a dependency on Windows.
This commit is contained in:
xaqq 2015-07-22 15:47:36 +02:00
parent 6be73720fa
commit 17ed36a7a5
7 changed files with 122 additions and 101 deletions

View file

@ -1,42 +0,0 @@
# This CMake script wants to use pcre functionality needed for windows
# compilation. However, since PCRE isn't really a default install location
# there isn't much to search.
#
# Operating Systems Supported:
# - Windows (requires MinGW)
# Tested with Windows XP/Windows 7
#
# This should work for both 32 bit and 64 bit systems.
#
# Author: A. Lian <alex.lian@gmail.com>
#
IF(WIN32)
IF(NOT PCRE_FOUND)
FIND_PATH(PCRE_INCLUDE_DIRS regex.h)
FIND_LIBRARY(PCRE_LIBRARIES NAMES PCRE pcre)
FIND_PATH(PCRE_BIN_DIRS pcre3.dll)
IF(PCRE_INCLUDE_DIRS AND PCRE_LIBRARIES AND PCRE_BIN_DIRS)
SET(PCRE_FOUND TRUE)
ENDIF(PCRE_INCLUDE_DIRS AND PCRE_LIBRARIES AND PCRE_BIN_DIRS)
ENDIF(NOT PCRE_FOUND)
IF(PCRE_FOUND)
IF(NOT PCRE_FIND_QUIETLY)
MESSAGE(STATUS "Found PCRE: ${PCRE_LIBRARIES} ${PCRE_INCLUDE_DIRS} ${PCRE_BIN_DIRS}")
ENDIF (NOT PCRE_FIND_QUIETLY)
ELSE(PCRE_FOUND)
IF(PCRE_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find PCRE")
ENDIF(PCRE_FIND_REQUIRED)
ENDIF(PCRE_FOUND)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG
PCRE_LIBRARIES
PCRE_INCLUDE_DIRS
PCRE_BIN_DIRS
)
ENDIF(WIN32)

View file

@ -2,6 +2,5 @@ EXTRA_DIST = \
COPYING-CMAKE-SCRIPTS \
FindLIBUSB.cmake \
FindPCSC.cmake \
FindPCRE.cmake \
UseDoxygen.cmake \
LibnfcDrivers.cmake