summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-12-01 16:31:40 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-12-01 16:31:40 +0000
commit112d7173a2ae719061dde6b3b7222b37adaab1fc (patch)
treef631313e337bd7dbdab24fd89ebcfbf4958682ce
parent2cadfa0ec8900bb784aa4c4171ad5aec0e9b7edf (diff)
downloadpcre-112d7173a2ae719061dde6b3b7222b37adaab1fc.tar.gz
Add Jeff Trawick's patch to CMakeLists.txt for MSVC features.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1407 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--CMakeLists.txt33
-rw-r--r--ChangeLog11
2 files changed, 44 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0405aa1..846241d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -186,6 +186,12 @@ IF (MINGW)
OFF)
ENDIF(MINGW)
+IF(MSVC)
+ OPTION(INSTALL_MSVC_PDB
+ "ON=Install .pdb files built by MSVC, if generated"
+ OFF)
+ENDIF(MSVC)
+
# bzip2 lib
IF(BZIP2_FOUND)
OPTION (PCRE_SUPPORT_LIBBZ2 "Enable support for linking pcregrep with libbz2." ON)
@@ -550,6 +556,17 @@ SET(PCREPOSIX_SOURCES
ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc)
ENDIF(MINGW AND NOT PCRE_STATIC)
+IF(MSVC AND NOT PCRE_STATIC)
+IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)
+SET(PCRE_SOURCES
+ ${PCRE_SOURCES} pcre.rc)
+ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)
+IF (EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc)
+SET(PCREPOSIX_SOURCES
+ ${PCREPOSIX_SOURCES} pcreposix.rc)
+ENDIF (EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc)
+ENDIF(MSVC AND NOT PCRE_STATIC)
+
SET(PCRECPP_HEADERS
pcrecpp.h
pcre_scanner.h
@@ -875,6 +892,17 @@ INSTALL(FILES ${man1} DESTINATION man/man1)
INSTALL(FILES ${man3} DESTINATION man/man3)
INSTALL(FILES ${html} DESTINATION share/doc/pcre/html)
+IF(MSVC AND INSTALL_MSVC_PDB)
+ INSTALL(FILES ${PROJECT_BINARY_DIR}/pcre.pdb
+ ${PROJECT_BINARY_DIR}/pcreposix.pdb
+ DESTINATION bin
+ CONFIGURATIONS RelWithDebInfo)
+ INSTALL(FILES ${PROJECT_BINARY_DIR}/pcred.pdb
+ ${PROJECT_BINARY_DIR}/pcreposixd.pdb
+ DESTINATION bin
+ CONFIGURATIONS Debug)
+ENDIF(MSVC AND INSTALL_MSVC_PDB)
+
# help, only for nice output
IF(BUILD_SHARED_LIBS)
SET(BUILD_STATIC_LIBS OFF)
@@ -952,6 +980,11 @@ IF(PCRE_SHOW_REPORT)
MESSAGE(STATUS " Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")
MESSAGE(STATUS " Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}")
ENDIF(MINGW AND NOT PCRE_STATIC)
+
+ IF(MSVC)
+ MESSAGE(STATUS " Install MSVC .pdb files ..........: ${INSTALL_MSVC_PDB}")
+ ENDIF(MSVC)
+
MESSAGE(STATUS "")
ENDIF(PCRE_SHOW_REPORT)
diff --git a/ChangeLog b/ChangeLog
index 7e3c875..254566f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -186,6 +186,17 @@ Version 8.34 19-November-2013
40. Document that the same character tables must be used at compile time and
run time, and that the facility to pass tables to pcre_exec() and
pcre_dfa_exec() is for use only with saved/restored patterns.
+
+41. Applied Jeff Trawick's patch CMakeLists.txt, which "provides two new
+ features for Builds with MSVC:
+
+ 1. Support pcre.rc and/or pcreposix.rc (as is already done for MinGW
+ builds). The .rc files can be used to set FileDescription and many other
+ attributes.
+
+ 2. Add an option (-DINSTALL_MSVC_PDB) to enable installation of .pdb files.
+ This allows higher-level build scripts which want .pdb files to avoid
+ hard-coding the exact files needed."
Version 8.33 28-May-2013