2 # check for Poppler::FormFieldButton as "0.7 check"
3 set(CMAKE_REQUIRED_INCLUDES ${POPPLER_INCLUDE_DIR} ${QT_INCLUDE_DIR})
4 set(CMAKE_REQUIRED_LIBRARIES ${POPPLER_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY})
5 check_cxx_source_compiles("
6 #include <poppler-qt4.h>
7 #include <poppler-form.h>
10 Poppler::FormFieldButton * button = 0;
15 check_cxx_source_compiles("
16 #include <poppler-qt4.h>
19 Poppler::Document * doc = 0;
26 ${CMAKE_CURRENT_SOURCE_DIR}/config-okular-poppler.h.cmake
27 ${CMAKE_CURRENT_BINARY_DIR}/config-okular-poppler.h
30 # Can be multiple include directories for poppler
31 separate_arguments(POPPLER_INCLUDE_DIR)
32 foreach(_include_dir ${POPPLER_INCLUDE_DIR})
33 include_directories(${_include_dir})
34 endforeach(_include_dir ${POPPLER_INCLUDE_DIR})
37 ${CMAKE_BINARY_DIR}/okular
38 ${CMAKE_CURRENT_SOURCE_DIR}/../..
41 ########### next target ###############
43 set(okularGenerator_poppler_PART_SRCS
49 kde4_add_plugin(okularGenerator_poppler ${okularGenerator_poppler_PART_SRCS})
51 target_link_libraries(okularGenerator_poppler ${POPPLER_LIBRARY} okularcore ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY})
53 install(TARGETS okularGenerator_poppler DESTINATION ${PLUGIN_INSTALL_DIR})
56 ########### install files ###############
58 install( FILES libokularGenerator_poppler.desktop okularPoppler.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
59 install( FILES okularApplication_pdf.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )