diff options
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/cmake-config.txt')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/cmake-config.txt | 49 |
1 files changed, 38 insertions, 11 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/cmake-config.txt b/Build/source/libs/xpdf/xpdf-src/cmake-config.txt index 1fbd6e59eb6..3fe2faf125c 100644 --- a/Build/source/libs/xpdf/xpdf-src/cmake-config.txt +++ b/Build/source/libs/xpdf/xpdf-src/cmake-config.txt @@ -81,6 +81,7 @@ option(MULTITHREADED "include support for multithreading" ON) option(USE_EXCEPTIONS "use C++ exceptions" ON) option(USE_FIXEDPOINT "use fixed point (instead of floating point) arithmetic" OFF) option(SPLASH_CMYK "include support for CMYK rasterization" OFF) +option(NO_FONTCONFIG "disable support for libfontconfig" OFF) option(SYSTEM_XPDFRC "full path for system-wide xpdfrc file" "") if (SYSTEM_XPDFRC) set(SYSTEM_XPDFRC_DEFINE "#define SYSTEM_XPDFRC \"${SYSTEM_XPDFRC}\"") @@ -193,20 +194,14 @@ if (Qt5Widgets_FOUND) find_package(Qt5Network) find_package(Qt5PrintSupport) else () - find_package(Qt4) + find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED) endif () if(Qt5Widgets_FOUND) message(STATUS "Qt5 found") if (XPDFWIDGET_PRINTING) set(QT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS}") set(QT_DEFINITIONS "${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS} ${Qt5PrintSupport_DEFINITIONS}") - if (APPLE) - set(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::PrintSupport "-framework ApplicationServices") - elseif (UNIX) - set(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::PrintSupport cups) - else () - set(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::PrintSupport) - endif () + set(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::PrintSupport) else () set(QT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS}") set(QT_DEFINITIONS "${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS}") @@ -216,7 +211,12 @@ if(Qt5Widgets_FOUND) if (APPLE) set(EXTRA_QT_LIBRARIES "-framework ApplicationServices") elseif (UNIX) - set(EXTRA_QT_LIBRARIES cups) + find_package(Cups) + if (CUPS_FOUND) + set(EXTRA_QT_LIBRARIES ${CUPS_LIBRARIES}) + else () + set (XPDFWIDGET_PRINTING OFF) + endif () else () set(EXTRA_QT_LIBRARIES "") endif () @@ -229,7 +229,12 @@ elseif(QT4_FOUND) if (APPLE) set(EXTRA_QT_LIBRARIES "-framework ApplicationServices") elseif (UNIX) - set(EXTRA_QT_LIBRARIES cups) + find_package(Cups) + if (CUPS_FOUND) + set(EXTRA_QT_LIBRARIES ${CUPS_LIBRARIES}) + else () + set (XPDFWIDGET_PRINTING OFF) + endif () else () set(EXTRA_QT_LIBRARIES "") endif () @@ -250,8 +255,30 @@ else () set(PAPER_LIBRARY "") endif () +#--- look for fontconfig +if (NOT NO_FONTCONFIG) + find_library(FONTCONFIG_LIBRARY + NAMES fontconfig libfontconfig + PATH_SUFFIXES lib64 lib + ) + if (FONTCONFIG_LIBRARY) + set(HAVE_FONTCONFIG TRUE) + message(STATUS "Found fontconfig") + else () + set(HAVE_FONTCONFIG FALSE) + set(FONTCONFIG_LIBRARY "") + endif () +else () + set(HAVE_FONTCONFIG FALSE) + set(FONTCONFIG_LIBRARY "") +endif () + #--- look for pthreads -find_package(Threads) +if (MULTITHREADED) + find_package(Threads) +else () + set(CMAKE_THREAD_LIBS_INIT "") +endif () #--- create aconf.h configure_file("aconf.h.in" "aconf.h") |