[poppler] CMakeLists.txt cmake/modules utils/CMakeLists.txt

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Sep 6 14:16:01 PDT 2015


 CMakeLists.txt                                 |    1 +
 cmake/modules/GObjectIntrospectionMacros.cmake |    2 +-
 utils/CMakeLists.txt                           |   22 +++++++++++-----------
 3 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit c871ae2cd6fbc8a827dfe2c4d5595d7439a4b54e
Author: Heiko Becker <heirecka at exherbo.org>
Date:   Sun May 3 16:06:30 2015 +0200

    cmake: Allow configuring SHARE_INSTALL_DIR
    
    This is helpful on a multiarch layout where the prefix is /usr/${host}
    but arch-independent files should still be installed to /usr/share.
    
    Bug 90293

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c587ea6..98a4c2f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,6 +49,7 @@ else(WIN32)
 endif(WIN32)
 
 set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
+set(SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Share directory name")
 
 set(TESTDATADIR "${CMAKE_SOURCE_DIR}/../test" CACHE STRING "Specify test data dir.")
 if(NOT (EXISTS ${TESTDATADIR} AND EXISTS ${TESTDATADIR}/test-poppler.c))
diff --git a/cmake/modules/GObjectIntrospectionMacros.cmake b/cmake/modules/GObjectIntrospectionMacros.cmake
index 3f90c2a..62af11d 100644
--- a/cmake/modules/GObjectIntrospectionMacros.cmake
+++ b/cmake/modules/GObjectIntrospectionMacros.cmake
@@ -72,7 +72,7 @@ macro(gir_add_introspections introspections_girs)
       VERBATIM
     )
     list(APPEND _gir_girs ${CMAKE_CURRENT_BINARY_DIR}/${gir})
-    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${gir} DESTINATION share/gir-1.0)
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${gir} DESTINATION ${SHARE_INSTALL_DIR}/gir-1.0)
 
     string(REPLACE ".gir" ".typelib" _typelib "${gir}")
     add_custom_command(
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index 9c16018..e533ff8 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -14,7 +14,7 @@ if (ENABLE_SPLASH)
   add_executable(pdftoppm ${pdftoppm_SOURCES})
   target_link_libraries(pdftoppm ${common_libs})
   install(TARGETS pdftoppm DESTINATION bin)
-  install(FILES pdftoppm.1 DESTINATION share/man/man1)
+  install(FILES pdftoppm.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 endif (ENABLE_SPLASH)
 
 if (HAVE_CAIRO)
@@ -44,7 +44,7 @@ if (HAVE_CAIRO)
     target_link_libraries(pdftocairo ${LCMS2_LIBRARIES})
   endif(LCMS2_FOUND)
   install(TARGETS pdftocairo DESTINATION bin)
-  install(FILES pdftocairo.1 DESTINATION share/man/man1)
+  install(FILES pdftocairo.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 endif (HAVE_CAIRO)
 
 # pdfdetach
@@ -54,7 +54,7 @@ set(pdfdetach_SOURCES ${common_srcs}
 add_executable(pdfdetach ${pdfdetach_SOURCES})
 target_link_libraries(pdfdetach ${common_libs})
 install(TARGETS pdfdetach DESTINATION bin)
-install(FILES pdfdetach.1 DESTINATION share/man/man1)
+install(FILES pdfdetach.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 
 # pdffonts
 set(pdffonts_SOURCES ${common_srcs}
@@ -63,7 +63,7 @@ set(pdffonts_SOURCES ${common_srcs}
 add_executable(pdffonts ${pdffonts_SOURCES})
 target_link_libraries(pdffonts ${common_libs})
 install(TARGETS pdffonts DESTINATION bin)
-install(FILES pdffonts.1 DESTINATION share/man/man1)
+install(FILES pdffonts.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 
 # pdfimages
 set(pdfimages_SOURCES ${common_srcs}
@@ -76,7 +76,7 @@ set(pdfimages_SOURCES ${common_srcs}
 add_executable(pdfimages ${pdfimages_SOURCES})
 target_link_libraries(pdfimages ${common_libs})
 install(TARGETS pdfimages DESTINATION bin)
-install(FILES pdfimages.1 DESTINATION share/man/man1)
+install(FILES pdfimages.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 
 # pdfinfo
 set(pdfinfo_SOURCES ${common_srcs}
@@ -87,7 +87,7 @@ set(pdfinfo_SOURCES ${common_srcs}
 add_executable(pdfinfo ${pdfinfo_SOURCES})
 target_link_libraries(pdfinfo ${common_libs})
 install(TARGETS pdfinfo DESTINATION bin)
-install(FILES pdfinfo.1 DESTINATION share/man/man1)
+install(FILES pdfinfo.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 
 # pdftops
 set(pdftops_SOURCES ${common_srcs}
@@ -96,7 +96,7 @@ set(pdftops_SOURCES ${common_srcs}
 add_executable(pdftops ${pdftops_SOURCES})
 target_link_libraries(pdftops ${common_libs})
 install(TARGETS pdftops DESTINATION bin)
-install(FILES pdftops.1 DESTINATION share/man/man1)
+install(FILES pdftops.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 
 # pdftotext
 set(pdftotext_SOURCES ${common_srcs}
@@ -105,7 +105,7 @@ set(pdftotext_SOURCES ${common_srcs}
 add_executable(pdftotext ${pdftotext_SOURCES})
 target_link_libraries(pdftotext ${common_libs})
 install(TARGETS pdftotext DESTINATION bin)
-install(FILES pdftotext.1 DESTINATION share/man/man1)
+install(FILES pdftotext.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 
 # pdftohtml
 set(pdftohtml_SOURCES ${common_srcs}
@@ -117,7 +117,7 @@ set(pdftohtml_SOURCES ${common_srcs}
 add_executable(pdftohtml ${pdftohtml_SOURCES})
 target_link_libraries(pdftohtml ${common_libs})
 install(TARGETS pdftohtml DESTINATION bin)
-install(FILES pdftohtml.1 DESTINATION share/man/man1)
+install(FILES pdftohtml.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 
 # pdfseparate
 set(pdfseparate_SOURCES ${common_srcs}
@@ -126,7 +126,7 @@ set(pdfseparate_SOURCES ${common_srcs}
 add_executable(pdfseparate ${pdfseparate_SOURCES})
 target_link_libraries(pdfseparate ${common_libs})
 install(TARGETS pdfseparate DESTINATION bin)
-install(FILES pdfseparate.1 DESTINATION share/man/man1)
+install(FILES pdfseparate.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)
 
 # pdfunite
 set(pdfunite_SOURCES ${common_srcs}
@@ -135,4 +135,4 @@ set(pdfunite_SOURCES ${common_srcs}
 add_executable(pdfunite ${pdfunite_SOURCES})
 target_link_libraries(pdfunite ${common_libs})
 install(TARGETS pdfunite DESTINATION bin)
-install(FILES pdfunite.1 DESTINATION share/man/man1)
+install(FILES pdfunite.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1)


More information about the poppler mailing list