r24762 by craig - #15130: Allow Podofo custom location
scribus-commit
scribus-commit at lists.scribus.net
Wed Oct 27 21:22:59 UTC 2021
Author: craig
Date: Wed Oct 27 21:22:59 2021
New Revision: 24762
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24762
Log:
#15130: Allow Podofo custom location
Modified:
trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake
Modified: trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24762&path=/trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake
==============================================================================
--- trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake (original)
+++ trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake Wed Oct 27 21:22:59 2021
@@ -31,20 +31,27 @@
)
if(LIBPODOFO_INCLUDE_DIR AND LIBPODOFO_LIBRARY)
- 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]+$")
+ if(NOT LIBPODOFO_CONFIG_H)
+ set(LIBPODOFO_CONFIG_H "${LIBPODOFO_INCLUDE_DIR}/podofo/base/podofo_config.h" CACHE FILEPATH "Alternative place of podofo_config.h")
+ endif()
+
+ file(STRINGS "${LIBPODOFO_CONFIG_H}" PODOFO_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$")
+ file(STRINGS "${LIBPODOFO_CONFIG_H}" PODOFO_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$")
+ file(STRINGS "${LIBPODOFO_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}")
+# 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")
if(LIBPODOFO_VERSION VERSION_GREATER "0.9.4")
# podofo 0.9.5 use OpenSSL includes in its public headers, we need to know OpenSSL include dirs
# (https://bugs.scribus.net/view.php?id=14838)
- find_package(OpenSSL)
+ find_package(OpenSSL QUIET)
+ if (NOT OPENSSL_FOUND)
+ find_package(OPENSSL)
+ endif()
if (OPENSSL_FOUND)
message("OpenSSL found OK for installed version of PoDoFo (>= 0.9.5) - Enabling support for PDF embedded in AI")
set(LIBPODOFO_FOUND ON CACHE BOOL "Was libpodofo found")
More information about the scribus-commit
mailing list