Revision: 1407
http://vcs.pcre.org/viewvc?view=rev&revision=1407
Author: ph10
Date: 2013-12-01 16:31:40 +0000 (Sun, 01 Dec 2013)
Log Message:
-----------
Add Jeff Trawick's patch to CMakeLists.txt for MSVC features.
Modified Paths:
--------------
code/trunk/CMakeLists.txt
code/trunk/ChangeLog
Modified: code/trunk/CMakeLists.txt
===================================================================
--- code/trunk/CMakeLists.txt 2013-11-30 07:05:00 UTC (rev 1406)
+++ code/trunk/CMakeLists.txt 2013-12-01 16:31:40 UTC (rev 1407)
@@ -186,6 +186,12 @@
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 @@
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 ${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 @@
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)
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2013-11-30 07:05:00 UTC (rev 1406)
+++ code/trunk/ChangeLog 2013-12-01 16:31:40 UTC (rev 1407)
@@ -186,8 +186,19 @@
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
------------------------