[poppler] 7 commits - CMakeLists.txt glib/CMakeLists.txt qt5/src qt6/src test/CMakeLists.txt utils/CMakeLists.txt

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 16 10:38:04 UTC 2022


 CMakeLists.txt         |   31 +++++++++++++------------------
 glib/CMakeLists.txt    |    2 +-
 qt5/src/CMakeLists.txt |    2 +-
 qt6/src/CMakeLists.txt |    2 +-
 test/CMakeLists.txt    |    2 +-
 utils/CMakeLists.txt   |    2 +-
 6 files changed, 18 insertions(+), 23 deletions(-)

New commits:
commit 608c6eaf32252f3798ff0a91d3be5d52fdcdacc0
Author: Kai Pastor <dg0yt at darc.de>
Date:   Fri Feb 11 08:30:23 2022 +0100

    Use Freetype::Freetype

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03bc067b..4fcf7e83 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -317,8 +317,6 @@ include_directories(
   ${CMAKE_CURRENT_SOURCE_DIR}/poppler
   ${CMAKE_CURRENT_BINARY_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}/poppler
-  SYSTEM
-  ${FREETYPE_INCLUDE_DIRS}
 )
 
 if (NSS3_FOUND)
@@ -466,7 +464,7 @@ set(poppler_SRCS
   splash/SplashXPath.cc
   splash/SplashXPathScanner.cc
 )
-set(poppler_LIBS ${FREETYPE_LIBRARIES})
+set(poppler_LIBS Freetype::Freetype)
 if(FONTCONFIG_FOUND)
   add_definitions(${FONTCONFIG_DEFINITIONS})
   include_directories(SYSTEM ${FONTCONFIG_INCLUDE_DIR})
diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
index 6e56cbc5..8c122de0 100644
--- a/glib/CMakeLists.txt
+++ b/glib/CMakeLists.txt
@@ -95,7 +95,7 @@ if(MINGW AND BUILD_SHARED_LIBS)
     get_target_property(POPPLER_GLIB_SOVERSION poppler-glib SOVERSION)
     set_target_properties(poppler-glib PROPERTIES SUFFIX "-${POPPLER_GLIB_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
 endif()
-target_link_libraries(poppler-glib poppler PkgConfig::GLIB2 ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES})
+target_link_libraries(poppler-glib poppler PkgConfig::GLIB2 ${CAIRO_LIBRARIES} Freetype::Freetype)
 if(CMAKE_USE_PTHREADS_INIT)
    target_link_libraries(poppler-glib Threads::Threads)
 endif()
diff --git a/qt5/src/CMakeLists.txt b/qt5/src/CMakeLists.txt
index 187c3b1f..55671715 100644
--- a/qt5/src/CMakeLists.txt
+++ b/qt5/src/CMakeLists.txt
@@ -43,7 +43,7 @@ if(MINGW AND BUILD_SHARED_LIBS)
     get_target_property(POPPLER_QT5_SOVERSION poppler-qt5 SOVERSION)
     set_target_properties(poppler-qt5 PROPERTIES SUFFIX "-${POPPLER_QT5_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
 endif()
-target_link_libraries(poppler-qt5 poppler Qt5::Core Qt5::Gui Qt5::Xml ${FREETYPE_LIBRARIES})
+target_link_libraries(poppler-qt5 poppler Qt5::Core Qt5::Gui Qt5::Xml Freetype::Freetype)
 if(MSVC)
 target_link_libraries(poppler-qt5 poppler ${poppler_LIBS})
 endif()
diff --git a/qt6/src/CMakeLists.txt b/qt6/src/CMakeLists.txt
index 7069b90f..7ba61d12 100644
--- a/qt6/src/CMakeLists.txt
+++ b/qt6/src/CMakeLists.txt
@@ -43,7 +43,7 @@ if(MINGW AND BUILD_SHARED_LIBS)
     get_target_property(POPPLER_QT6_SOVERSION poppler-qt6 SOVERSION)
     set_target_properties(poppler-qt6 PROPERTIES SUFFIX "-${POPPLER_QT6_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
 endif()
-target_link_libraries(poppler-qt6 poppler Qt6::Core Qt6::Gui ${FREETYPE_LIBRARIES})
+target_link_libraries(poppler-qt6 poppler Qt6::Core Qt6::Gui Freetype::Freetype)
 if(MSVC)
 target_link_libraries(poppler-qt6 poppler ${poppler_LIBS})
 endif()
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a9ee29c6..d6f32443 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -38,7 +38,7 @@ if (GTK_FOUND)
       ${CMAKE_SOURCE_DIR}/poppler/CairoRescaleBox.cc
     )
     poppler_add_test(pdf-inspector BUILD_GTK_TESTS ${pdf_inspector_SRCS})
-    target_link_libraries(pdf-inspector ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES} ${common_libs} ${GTK3_LIBRARIES} poppler)
+    target_link_libraries(pdf-inspector ${CAIRO_LIBRARIES} Freetype::Freetype ${common_libs} ${GTK3_LIBRARIES} poppler)
     target_compile_definitions(pdf-inspector PRIVATE -DSRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
     if(CMAKE_USE_PTHREADS_INIT)
        target_link_libraries(pdf-inspector Threads::Threads)
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index ce0ce166..3789005b 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -37,7 +37,7 @@ if (HAVE_CAIRO)
   )
   add_definitions(${CAIRO_CFLAGS})
   add_executable(pdftocairo ${pdftocairo_SOURCES})
-  target_link_libraries(pdftocairo ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES} ${common_libs})
+  target_link_libraries(pdftocairo ${CAIRO_LIBRARIES} Freetype::Freetype ${common_libs})
   if(CMAKE_USE_PTHREADS_INIT)
     target_link_libraries(pdftocairo Threads::Threads)
   endif()
commit d3a4b3f94a007e39d625d3b88ef8d2d9a370d678
Author: Kai Pastor <dg0yt at darc.de>
Date:   Fri Feb 11 08:29:53 2022 +0100

    Concentrate Fontconfig CMake setup

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc48fb3e..03bc067b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -304,10 +304,6 @@ if(MINGW)
   # Use mingw's ansi stdio extensions
   add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
 endif()
-if(FONTCONFIG_FOUND)
-  add_definitions(${FONTCONFIG_DEFINITIONS})
-  include_directories(SYSTEM ${FONTCONFIG_INCLUDE_DIR})
-endif()
 if(WITH_FONTCONFIGURATION_WIN32)
   if(MINGW)
     # Set the minimum required Internet Explorer version to 5.0
@@ -472,6 +468,8 @@ set(poppler_SRCS
 )
 set(poppler_LIBS ${FREETYPE_LIBRARIES})
 if(FONTCONFIG_FOUND)
+  add_definitions(${FONTCONFIG_DEFINITIONS})
+  include_directories(SYSTEM ${FONTCONFIG_INCLUDE_DIR})
   set(poppler_LIBS ${poppler_LIBS} ${FONTCONFIG_LIBRARIES})
 endif()
 
commit 9f9c55f9ad249b004a341c2df6cd8ff920083b5d
Author: Kai Pastor <dg0yt at darc.de>
Date:   Fri Feb 11 08:24:04 2022 +0100

    Concentrate JPEG CMake setup

diff --git a/CMakeLists.txt b/CMakeLists.txt
index abf65a3b..dc48fb3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -328,9 +328,6 @@ include_directories(
 if (NSS3_FOUND)
   set(ENABLE_NSS3 ON)
 endif()
-if(JPEG_FOUND)
-  include_directories(SYSTEM ${JPEG_INCLUDE_DIR})
-endif()
 if(PNG_FOUND)
   set(ENABLE_LIBPNG ON)
 endif()
@@ -482,7 +479,12 @@ if(JPEG_FOUND)
   set(poppler_SRCS ${poppler_SRCS}
     poppler/DCTStream.cc
   )
-  set(poppler_LIBS ${poppler_LIBS} ${JPEG_LIBRARIES})
+  if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
+    include_directories(SYSTEM ${JPEG_INCLUDE_DIR})
+    set(poppler_LIBS ${poppler_LIBS} ${JPEG_LIBRARIES})
+  else()
+    set(poppler_LIBS ${poppler_LIBS} JPEG::JPEG)
+  endif()
 endif()
 if(ENABLE_ZLIB)
   set(poppler_SRCS ${poppler_SRCS}
commit 6c2126b3149b9ff07e0322fb59ba29d628c21dfc
Author: Kai Pastor <dg0yt at darc.de>
Date:   Fri Feb 11 08:19:32 2022 +0100

    Concentrate OpenJPEG CMake setup

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62af4c8a..abf65a3b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -337,9 +337,6 @@ endif()
 if(TIFF_FOUND)
   set(ENABLE_LIBTIFF ON)
 endif()
-if(OpenJPEG_FOUND)
-  include_directories(SYSTEM ${OPENJPEG_INCLUDE_DIRS})
-endif()
 
 # Recent versions of poppler-data install a .pc file.
 # Use it to determine the encoding data path, if available.
@@ -521,6 +518,8 @@ if (OpenJPEG_FOUND)
     poppler/JPEG2000Stream.cc
   )
   set(poppler_LIBS ${poppler_LIBS} openjp2)
+  # target openjp2 may lack interface include directories
+  include_directories(SYSTEM ${OPENJPEG_INCLUDE_DIRS})
 else ()
   set(poppler_SRCS ${poppler_SRCS}
     poppler/JPXStream.cc
commit 314f71d4c509ea431a09efc5e302f01be6382654
Author: Kai Pastor <dg0yt at darc.de>
Date:   Fri Feb 11 08:18:01 2022 +0100

    Concentrate LCMS CMake setup

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bff30eec..62af4c8a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -340,9 +340,6 @@ endif()
 if(OpenJPEG_FOUND)
   include_directories(SYSTEM ${OPENJPEG_INCLUDE_DIRS})
 endif()
-if(LCMS2_FOUND)
-  include_directories(SYSTEM ${LCMS2_INCLUDE_DIR})
-endif()
 
 # Recent versions of poppler-data install a .pc file.
 # Use it to determine the encoding data path, if available.
@@ -530,6 +527,7 @@ else ()
   )
 endif()
 if(USE_CMS)
+  include_directories(SYSTEM ${LCMS2_INCLUDE_DIR})
   set(poppler_LIBS ${poppler_LIBS} ${LCMS2_LIBRARIES})
 endif()
 if(WIN32)
commit bdb43ae4d7000e86bb90ab099ee22be3d9798d24
Author: Kai Pastor <dg0yt at darc.de>
Date:   Fri Feb 11 07:58:32 2022 +0100

    Don't use CURL_INCLUDE_DIRS with CURL::libcurl

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e6fcc23..bff30eec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -294,7 +294,6 @@ endif()
 if(ENABLE_LIBCURL)
   find_package(CURL)
   if(CURL_FOUND)
-    include_directories(SYSTEM ${CURL_INCLUDE_DIRS})
     set(POPPLER_HAS_CURL_SUPPORT ON)
   else()
     set(ENABLE_LIBCURL OFF)
@@ -508,6 +507,7 @@ if(ENABLE_LIBCURL)
     poppler/CurlPDFDocBuilder.cc
   )
   if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
+    include_directories(SYSTEM ${CURL_INCLUDE_DIRS})
     set(poppler_LIBS ${poppler_LIBS} ${CURL_LIBRARIES})
   else()
     set(poppler_LIBS ${poppler_LIBS} CURL::libcurl)
commit 401845240f5a7b265961a77103a01da25e711054
Author: Kai Pastor <dg0yt at darc.de>
Date:   Fri Feb 11 07:57:23 2022 +0100

    Use output variable from CMake find modules

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a0dcb15..0e6fcc23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -294,7 +294,7 @@ endif()
 if(ENABLE_LIBCURL)
   find_package(CURL)
   if(CURL_FOUND)
-    include_directories(SYSTEM ${CURL_INCLUDE_DIR})
+    include_directories(SYSTEM ${CURL_INCLUDE_DIRS})
     set(POPPLER_HAS_CURL_SUPPORT ON)
   else()
     set(ENABLE_LIBCURL OFF)


More information about the poppler mailing list