diff --git a/CMakeLists.txt b/CMakeLists.txt index 16d89ff..ae10d1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,13 +71,14 @@ # 2021-06-14 PH applied Wolfgang Stöggl's patch for generating pcre-config and # libpcre*.pc files (Bugzilla #2583) -PROJECT(PCRE C CXX) + # Increased minimum to 2.8.5 to support GNUInstallDirs. Set policy # CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY. -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5) -CMAKE_POLICY(SET CMP0026 OLD) +CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +PROJECT(PCRE C CXX) +#CMAKE_POLICY(SET CMP0026 OLD) # For FindReadline.cmake. This was changed to allow setting CMAKE_MODULE_PATH # on the command line. @@ -485,12 +486,12 @@ OPTION(PCRE_REBUILD_CHARTABLES "Rebuild char tables" OFF) IF(PCRE_REBUILD_CHARTABLES) ADD_EXECUTABLE(dftables dftables.c) - GET_TARGET_PROPERTY(DFTABLES_EXE dftables LOCATION) + #GET_TARGET_PROPERTY(DFTABLES_EXE dftables LOCATION) ADD_CUSTOM_COMMAND( COMMENT "Generating character tables (pcre_chartables.c) for current locale" DEPENDS dftables - COMMAND ${DFTABLES_EXE} + COMMAND $ ARGS ${PROJECT_BINARY_DIR}/pcre_chartables.c OUTPUT ${PROJECT_BINARY_DIR}/pcre_chartables.c )