r21091 by craig -

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 19 00:12:32 UTC 2016


Author: craig
Date: Sat Mar 19 00:12:31 2016
New Revision: 21091

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21091
Log:
Add PoDoFo version info to FindLIBPODOFO.cmake

Modified:
    trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake

Modified: trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21091&path=/trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake
==============================================================================
--- trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake	(original)
+++ trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake	Sat Mar 19 00:12:31 2016
@@ -35,6 +35,18 @@
 
 IF(LIBPODOFO_INCLUDE_DIR AND LIBPODOFO_LIBRARY)
   SET(LIBPODOFO_FOUND TRUE CACHE BOOLEAN "Was libpodofo found")
+
+  file(STRINGS "${LIBPODOFO_INCLUDE_DIR}/podofo/base/podofo_config.h" PODOFO_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$")
+  file(STRINGS "${LIBPODOFO_INCLUDE_DIR}/podofo/base/podofo_config.h" PODOFO_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$")
+  file(STRINGS "${LIBPODOFO_INCLUDE_DIR}/podofo/base/podofo_config.h" PODOFO_PATCH_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+[0-9]+$")
+  string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+([0-9]+)$" "\\1" PODOFO_MAJOR_VER "${PODOFO_MAJOR_VER_LINE}")
+  string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+([0-9]+)$" "\\1" PODOFO_MINOR_VER "${PODOFO_MINOR_VER_LINE}")
+  string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+([0-9]+)$" "\\1" PODOFO_PATCH_VER "${PODOFO_PATCH_VER_LINE}")
+#  MESSAGE(STATUS "PODOFO MAJOR VERSION ${PODOFO_MAJOR_VER}")
+#  MESSAGE(STATUS "PODOFO MINOR VERSION ${PODOFO_MINOR_VER}")
+#  MESSAGE(STATUS "PODOFO PATCH VERSION ${PODOFO_PATCH_VER}")
+  SET(LIBPODOFO_VERSION "${PODOFO_MAJOR_VER}.${PODOFO_MINOR_VER}.${PODOFO_PATCH_VER}" CACHE STRING "PoDoFo version string")
+
 ENDIF(LIBPODOFO_INCLUDE_DIR AND LIBPODOFO_LIBRARY)
 
 SET(LIBPODOFO_CFLAGS "${useshared}" CACHE STRING "Extra flags for compiling against PoDoFo")




More information about the scribus-commit mailing list