mirror of
https://git.freebsd.org/ports.git
synced 2025-07-08 04:49:17 -04:00
71 lines
2 KiB
Text
71 lines
2 KiB
Text
--- cmake-config.txt.orig 2017-08-08 16:22:50.000000000 -0700
|
|
+++ cmake-config.txt 2017-09-17 21:03:21.838497000 -0700
|
|
@@ -79,6 +79,7 @@
|
|
option(USE_FIXEDPOINT "use fixed point (instead of floating point) arithmetic" OFF)
|
|
option(SPLASH_CMYK "include support for CMYK rasterization" OFF)
|
|
option(SPLASH_DEVICEN "include support for DeviceN rasterization" OFF)
|
|
+option(USE_LIBPAPER "use libpaper" OFF)
|
|
if (SPLASH_DEVICEN)
|
|
set(SPLASH_CMYK ON)
|
|
endif ()
|
|
@@ -235,9 +236,7 @@
|
|
if (XPDFWIDGET_PRINTING)
|
|
set(QT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS}")
|
|
set(QT_DEFINITIONS "${Qt5Widgets_DEFINITIONS} ${Qt5PrintSupport_DEFINITIONS}")
|
|
- if (APPLE)
|
|
- set(QT_LIBRARIES Qt5::Widgets Qt5::PrintSupport "-framework ApplicationServices")
|
|
- elseif (UNIX)
|
|
+ if (CUPS)
|
|
set(QT_LIBRARIES Qt5::Widgets Qt5::PrintSupport cups)
|
|
else ()
|
|
set(QT_LIBRARIES Qt5::Widgets Qt5::PrintSupport)
|
|
@@ -248,9 +247,7 @@
|
|
set(QT_LIBRARIES Qt5::Widgets)
|
|
endif ()
|
|
if (XPDFWIDGET_PRINTING)
|
|
- if (APPLE)
|
|
- set(EXTRA_QT_LIBRARIES "-framework ApplicationServices")
|
|
- elseif (UNIX)
|
|
+ if (CUPS)
|
|
set(EXTRA_QT_LIBRARIES cups)
|
|
else ()
|
|
set(EXTRA_QT_LIBRARIES "")
|
|
@@ -278,10 +275,34 @@
|
|
endif()
|
|
|
|
#--- look for libpaper
|
|
-find_library(HAVE_PAPER_H
|
|
- NAMES paper libpaper
|
|
- PATH_SUFFIXES lib64 lib
|
|
-)
|
|
+if(USE_LIBPAPER)
|
|
+ find_library(PAPER_LIBRARY
|
|
+ NAMES paper libpaper
|
|
+ HINTS
|
|
+ ${PAPER_DIR}
|
|
+ PATHS
|
|
+ /usr/local
|
|
+ /usr/freeware
|
|
+ )
|
|
+ find_path(PAPER_INCLUDE_DIR .h
|
|
+ HINTS
|
|
+ ${PAPER_DIR}
|
|
+ PATHS
|
|
+ /usr/local/include
|
|
+ /usr/freeware/include
|
|
+ PATH_SUFFIXES include
|
|
+ )
|
|
+endif()
|
|
+
|
|
+if (USE_LIBPAPER)
|
|
+ if (PAPER_INCLUDE_DIR AND PAPER_LIBRARY)
|
|
+ set(HAVE_PAPER_H TRUE)
|
|
+ message(STATUS "Found libpaper: ${PAPER_LIBRARY}")
|
|
+ else ()
|
|
+ set(HAVE_PAPER_H FALSE)
|
|
+ message(STATUS "libpaper not found")
|
|
+ endif ()
|
|
+endif ()
|
|
|
|
#--- look for pthreads
|
|
find_package(Threads)
|