compile
[kdegraphics.git] / okular / generators / poppler / CMakeLists.txt
blob6a3d40074efbfdc719cf789d06351db1dc19d43f
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>
8 int main()
10   Poppler::FormFieldButton * button = 0;
11   button->buttonType();
12   return 0;
14 " HAVE_POPPLER_0_7)
15 check_cxx_source_compiles("
16 #include <poppler-qt4.h>
17 int main()
19   Poppler::Document * doc = 0;
20   (void)doc->scripts();
21   return 0;
23 " HAVE_POPPLER_0_9)
25 configure_file(
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})
36 include_directories(
37    ${CMAKE_BINARY_DIR}/okular
38    ${CMAKE_CURRENT_SOURCE_DIR}/../..
41 ########### next target ###############
43 set(okularGenerator_poppler_PART_SRCS
44    generator_pdf.cpp
45    formfields.cpp
46    annots.cpp
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} )