[poppler] CMakeLists.txt cmake/modules

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 27 14:03:45 UTC 2019


 CMakeLists.txt                    |   35 +++++++++++++++++++----------------
 cmake/modules/PopplerMacros.cmake |    6 ++----
 2 files changed, 21 insertions(+), 20 deletions(-)

New commits:
commit c250cbd2ef18aca9748e2e8d753a2cb414f6f1d9
Author: zdenop <zdenop at gmail.com>
Date:   Mon Apr 29 18:06:57 2019 +0200

    install pkg-config pc files if pkg-config is found

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1eb39f36..ae7ff4ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -687,24 +687,27 @@ else()
   set(PC_REQUIRES_PRIVATE "")
 endif()
 
-poppler_create_install_pkgconfig(poppler.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-if(ENABLE_SPLASH)
-  poppler_create_install_pkgconfig(poppler-splash.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-endif()
-if(ENABLE_QT5)
-  poppler_create_install_pkgconfig(poppler-qt5.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-endif()
-if(ENABLE_GLIB)
-  poppler_create_install_pkgconfig(poppler-glib.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-endif()
-if(CAIRO_FOUND)
-  poppler_create_install_pkgconfig(poppler-cairo.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-endif()
-if(ENABLE_CPP)
-  poppler_create_install_pkgconfig(poppler-cpp.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+if(PKG_CONFIG_EXECUTABLE)
+  poppler_create_install_pkgconfig(poppler.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+  if(ENABLE_SPLASH)
+    poppler_create_install_pkgconfig(poppler-splash.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+  endif()
+  if(ENABLE_QT5)
+    poppler_create_install_pkgconfig(poppler-qt5.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+  endif()
+  if(ENABLE_GLIB)
+    poppler_create_install_pkgconfig(poppler-glib.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+  endif()
+  if(CAIRO_FOUND)
+    poppler_create_install_pkgconfig(poppler-cairo.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+  endif()
+  if(ENABLE_CPP)
+    poppler_create_install_pkgconfig(poppler-cpp.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+  endif()
+else()
+  MESSAGE(STATUS ".pc files will not be installed becasue of missing 'pkg-config'!")
 endif()
 
-
 message("Building Poppler with support for:")
 show_end_message("font configuration" ${font_configuration})
 show_end_message_yesno("splash output" ENABLE_SPLASH)
diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
index 08fd3d6d..3b1d2a41 100644
--- a/cmake/modules/PopplerMacros.cmake
+++ b/cmake/modules/PopplerMacros.cmake
@@ -43,10 +43,8 @@ macro(POPPLER_ADD_UNITTEST exe build_flag)
 endmacro(POPPLER_ADD_UNITTEST)
 
 macro(POPPLER_CREATE_INSTALL_PKGCONFIG generated_file install_location)
-  if(NOT MSVC)
-    configure_file(${generated_file}.cmake ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} @ONLY)
-    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} DESTINATION ${install_location})
-  endif(NOT MSVC)
+  configure_file(${generated_file}.cmake ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} @ONLY)
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} DESTINATION ${install_location})
 endmacro(POPPLER_CREATE_INSTALL_PKGCONFIG)
 
 macro(SHOW_END_MESSAGE what value)


More information about the poppler mailing list