Commit 654176de authored by Michael Jansen's avatar Michael Jansen Committed by Pino Toscano

CMake: add the possibility to pass LIB_SUFFIX.

This allows to tune the installation libdir by adding a suffix for it
(making it eg lib, lib32, or lib64)
parent 43829ae4
......@@ -30,6 +30,8 @@ option(ENABLE_ZLIB "TODO" OFF)
option(USE_EXCEPTIONS "Throw exceptions to deal with not enough memory and similar problems." OFF)
option(USE_FIXEDPOINT "Use fixed point arithmetic" OFF)
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
# Enable these unconditionally.
set(MULTITHREAD ON)
set(OPI_SUPPORT ON)
......@@ -275,7 +277,7 @@ add_library(poppler SHARED ${poppler_SRCS})
endif(MSVC)
set_target_properties(poppler PROPERTIES VERSION 5.0.0 SOVERSION 5)
target_link_libraries(poppler ${poppler_LIBS})
install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
if(ENABLE_XPDF_HEADERS)
install(FILES
......@@ -430,21 +432,21 @@ else(PKG_CONFIG_VERSION_0_18)
set(PC_REQUIRES_PRIVATE "")
endif(PKG_CONFIG_VERSION_0_18)
poppler_create_install_pkgconfig(poppler.pc lib/pkgconfig)
poppler_create_install_pkgconfig(poppler.pc lib${LIB_SUFFIX}/pkgconfig)
if(ENABLE_SPLASH)
poppler_create_install_pkgconfig(poppler-splash.pc lib/pkgconfig)
poppler_create_install_pkgconfig(poppler-splash.pc lib${LIB_SUFFIX}/pkgconfig)
endif(ENABLE_SPLASH)
if(QT3_FOUND)
poppler_create_install_pkgconfig(poppler-qt.pc lib/pkgconfig)
poppler_create_install_pkgconfig(poppler-qt.pc lib${LIB_SUFFIX}/pkgconfig)
endif(QT3_FOUND)
if(QT4_FOUND)
poppler_create_install_pkgconfig(poppler-qt4.pc lib/pkgconfig)
poppler_create_install_pkgconfig(poppler-qt4.pc lib${LIB_SUFFIX}/pkgconfig)
endif(QT4_FOUND)
if(GLIB_FOUND)
poppler_create_install_pkgconfig(poppler-glib.pc lib/pkgconfig)
poppler_create_install_pkgconfig(poppler-glib.pc lib${LIB_SUFFIX}/pkgconfig)
endif(GLIB_FOUND)
if(CAIRO_FOUND)
poppler_create_install_pkgconfig(poppler-cairo.pc lib/pkgconfig)
poppler_create_install_pkgconfig(poppler-cairo.pc lib${LIB_SUFFIX}/pkgconfig)
endif(CAIRO_FOUND)
......
......@@ -98,7 +98,7 @@ target_link_libraries(poppler-glib poppler ${GLIB2_LIBRARIES})
if (CAIRO_FOUND)
target_link_libraries(poppler-glib ${CAIRO_LIBRARIES})
endif (CAIRO_FOUND)
install(TARGETS poppler-glib RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(TARGETS poppler-glib RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
install(FILES
${poppler_glib_public_headers}
......
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
libdir=${exec_prefix}/lib@LIB_SUFFIX@
includedir=${prefix}/include
Name: poppler-cairo
......
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
libdir=${exec_prefix}/lib@LIB_SUFFIX@
includedir=${prefix}/include
Name: poppler-glib
......
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
libdir=${exec_prefix}/lib@LIB_SUFFIX@
includedir=${prefix}/include
Name: poppler-qt
......
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
libdir=${exec_prefix}/lib@LIB_SUFFIX@
includedir=${prefix}/include
Name: poppler-qt4
......
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
libdir=${exec_prefix}/lib@LIB_SUFFIX@
includedir=${prefix}/include
Name: poppler-splash
......
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
libdir=${exec_prefix}/lib@LIB_SUFFIX@
includedir=${prefix}/include
Name: poppler
......
......@@ -16,7 +16,7 @@ set(poppler_qt_SRCS
add_library(poppler-qt SHARED ${poppler_qt_SRCS})
set_target_properties(poppler-qt PROPERTIES VERSION 2.0.0 SOVERSION 2)
target_link_libraries(poppler-qt poppler ${QT3_LIBRARIES})
install(TARGETS poppler-qt RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(TARGETS poppler-qt RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
install(FILES
poppler-qt.h
......
......@@ -38,7 +38,7 @@ target_link_libraries(poppler-qt4 poppler ${QT4_QTCORE_LIBRARY} ${QT4_QTGUI_LIBR
if(MSVC)
target_link_libraries(poppler-qt4 poppler ${poppler_LIBS})
endif(MSVC)
install(TARGETS poppler-qt4 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(TARGETS poppler-qt4 RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
install(FILES
poppler-qt4.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment