summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2020-06-01 16:36:00 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2020-06-01 16:36:00 +0000
commitb8e8f57b52ee1f450fdb69e450fb18122ab514f1 (patch)
tree7bdfa6403f3dcae21188e2f19ba173621a3f4308
parent58040c3b15f966857eef0b35885800f0805e7c7a (diff)
downloadpcre2-b8e8f57b52ee1f450fdb69e450fb18122ab514f1.tar.gz
Patch for CMakeLists.txt by Wolfgang Stoeggl fixes several things; see Bugzilla
#2584/ git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1259 6239d852-aaf2-0410-a92c-79f79f948069
-rw-r--r--CMakeLists.txt17
-rw-r--r--ChangeLog12
-rw-r--r--configure.ac6
3 files changed, 24 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e8a763..763b40b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,8 +96,8 @@
PROJECT(PCRE2 C)
-# Increased minimum to 2.8.0 to support newer add_test features.
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
+# Increased minimum to 2.8.5 to support GNUInstallDirs.
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5)
# Set policy CMP0026 to avoid warnings for the use of LOCATION in
# GET_TARGET_PROPERTY. This should no longer be required.
@@ -124,6 +124,7 @@ INCLUDE(CheckFunctionExists)
INCLUDE(CheckSymbolExists)
INCLUDE(CheckIncludeFile)
INCLUDE(CheckTypeSize)
+INCLUDE(GNUInstallDirs) # for CMAKE_INSTALL_LIBDIR
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
@@ -464,7 +465,7 @@ foreach(configure_line ${configure_lines})
foreach(_substitution_variable ${SEARCHED_VARIABLES})
string(TOUPPER ${_substitution_variable} _substitution_variable_upper)
if (NOT ${_substitution_variable_upper})
- string(REGEX MATCH "m4_define\\(${_substitution_variable}, *\\[(.*)\\]" MACTHED_STRING ${configure_line})
+ string(REGEX MATCH "m4_define\\(${_substitution_variable}, *\\[(.*)\\]" MATCHED_STRING ${configure_line})
if (CMAKE_MATCH_1)
set(${_substitution_variable_upper} ${CMAKE_MATCH_1})
endif()
@@ -500,7 +501,7 @@ SET(PACKAGE_VERSION "${PCRE2_MAJOR}.${PCRE2_MINOR}")
SET(prefix ${CMAKE_INSTALL_PREFIX})
SET(exec_prefix "\${prefix}")
-SET(libdir "\${exec_prefix}/lib")
+SET(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
SET(includedir "\${prefix}/include")
CONFIGURE_FILE(libpcre2-posix.pc.in libpcre2-posix.pc @ONLY)
SET(pkg_config_files ${pkg_config_files} "${CMAKE_CURRENT_BINARY_DIR}/libpcre2-posix.pc")
@@ -882,9 +883,9 @@ SET(CMAKE_INSTALL_ALWAYS 1)
INSTALL(TARGETS ${targets}
RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
-INSTALL(FILES ${pkg_config_files} DESTINATION lib/pkgconfig)
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+INSTALL(FILES ${pkg_config_files} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/pcre2-config"
DESTINATION bin
# Set 0755 permissions
@@ -935,7 +936,7 @@ IF(PCRE2_SHOW_REPORT)
ENDIF(CMAKE_C_FLAGS)
MESSAGE(STATUS "")
MESSAGE(STATUS "")
- MESSAGE(STATUS "PCRE2 configuration summary:")
+ MESSAGE(STATUS "PCRE2-${PCRE2_MAJOR}.${PCRE2_MINOR} configuration summary:")
MESSAGE(STATUS "")
MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}")
diff --git a/ChangeLog b/ChangeLog
index 94ab843..eb2b62f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,18 @@ invented by PH.
2. Fix inifinite loop when a single byte newline is searched in JIT when
invalid utf8 mode is enabled.
+3. Updated CMakeLists.txt with patch from Wolfgang Stöggl (Bugzilla #2584):
+
+ - Include GNUInstallDirs and use ${CMAKE_INSTALL_LIBDIR} instead of hardcoded
+ lib. This allows differentiation between lib and lib64.
+ CMAKE_INSTALL_LIBDIR is used for installation of libraries and also for
+ pkgconfig file generation.
+
+ - Add the version of PCRE2 to the configuration summary like ./configure
+ does.
+
+ - Fix typo: MACTHED_STRING->MATCHED_STRING
+
Version 10.35 09-May-2020
---------------------------
diff --git a/configure.ac b/configure.ac
index 61b93ba..288446a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,9 +9,9 @@ dnl The PCRE2_PRERELEASE feature is for identifying release candidates. It might
dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre2_major, [10])
-m4_define(pcre2_minor, [35])
-m4_define(pcre2_prerelease, [])
-m4_define(pcre2_date, [2020-05-09])
+m4_define(pcre2_minor, [36])
+m4_define(pcre2_prerelease, [-RC1])
+m4_define(pcre2_date, [2020-06-01])
# Libtool shared library interface versions (current:revision:age)
m4_define(libpcre2_8_version, [10:0:10])