CMakeLists.txt 3.96 KB
Newer Older
Albert Astals Cid's avatar
Albert Astals Cid committed
1
project(okular)
2

3
option(
4
   OKULAR_FORCE_DRM
Albert Astals Cid's avatar
Albert Astals Cid committed
5
   "Forces okular to check for DRM to decide if you can copy/print protected pdf. (default=no)"
6 7 8 9 10 11 12 13 14 15 16 17 18
   OFF
)
if(OKULAR_FORCE_DRM STREQUAL "ON")
   set(_OKULAR_FORCE_DRM 1)
else(OKULAR_FORCE_DRM STREQUAL "ON")
   set(_OKULAR_FORCE_DRM 0)
endif(OKULAR_FORCE_DRM STREQUAL "ON")

configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/config-okular.h.cmake
   ${CMAKE_CURRENT_BINARY_DIR}/config-okular.h
)

Pino Toscano's avatar
Pino Toscano committed
19 20 21 22 23
add_subdirectory( conf )
add_subdirectory( core )
add_subdirectory( ui )
add_subdirectory( shell )
add_subdirectory( generators )
24

25
include_directories(
26
   ${CMAKE_SOURCE_DIR}
27 28
   ${CMAKE_SOURCE_DIR}/okular/ui/painter_agg2/
)
29 30


31
# okularcore
32

33
set(okularcore_SRCS
34 35
   core/annotations.cpp
   core/area.cpp
36
   core/bookmarkmanager.cpp
37 38 39 40
   core/chooseenginedialog.cpp
   core/document.cpp
   core/generator.cpp
   core/link.cpp
41
   core/misc.cpp
42
   core/observer.cpp
43
   core/page.cpp
44
   core/pagesize.cpp
45
   core/pagetransition.cpp
46
   core/rotationjob.cpp
47
   core/sound.cpp
48
   core/sourcereference.cpp
49
   core/textpage.cpp
50
   core/utils.cpp
51 52
)

53 54 55 56 57 58 59 60
install( FILES
           core/annotations.h
           core/area.h
           core/document.h
           core/generator.h
           core/link.h
           core/observer.h
           core/page.h
61
           core/pagesize.h
62 63 64 65 66 67 68 69 70 71 72 73 74
           core/pagetransition.h
           core/sound.h
           core/sourcereference.h
           core/textpage.h
           core/utils.h
         DESTINATION ${INCLUDE_INSTALL_DIR}/okular/core )

install( FILES
           interfaces/configinterface.h
           interfaces/guiinterface.h
           interfaces/printinterface.h
         DESTINATION ${INCLUDE_INSTALL_DIR}/okular/interfaces )

Albert Astals Cid's avatar
Albert Astals Cid committed
75
kde4_add_ui_files(okularcore_SRCS
76
   core/chooseenginewidget.ui
77 78
)

79
kde4_add_kcfg_files(okularcore_SRCS conf/settings.kcfgc )
80

81
kde4_automoc(${okularcore_SRCS})
82 83 84

kde4_add_library(okularcore SHARED ${okularcore_SRCS})

85 86 87 88 89 90
# Special handling for linking okularcore on OSX/Apple
IF(APPLE)
    SET(OKULAR_IOKIT "-framework IOKit" CACHE STRING "Apple IOKit framework")
ENDIF(APPLE)

target_link_libraries(okularcore  ${OKULAR_IOKIT} ${KDE4_KPARTS_LIBS} ${QT_QTCORE_LIBRARY} ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} m )
91

92
install(TARGETS okularcore DESTINATION ${LIB_INSTALL_DIR} )
93 94 95 96 97

# okularpart

set(okularpart_SRCS
   part.cpp
98 99
   conf/preferencesdialog.cpp
   conf/dlgaccessibility.cpp
100
   conf/dlgdebug.cpp
101 102 103 104
   conf/dlggeneral.cpp
   conf/dlgidentity.cpp
   conf/dlgperformance.cpp
   conf/dlgpresentation.cpp
105
   ui/embeddedfilesdialog.cpp
106
   ui/annotwindow.cpp
107
   ui/annotationguiutils.cpp
108
   ui/annotationpopup.cpp
109
   ui/annotationpropertiesdialog.cpp
110
   ui/annotationtools.cpp
Pino Toscano's avatar
Pino Toscano committed
111
   ui/annotationwidgets.cpp
112
   ui/bookmarklist.cpp
113 114
   ui/minibar.cpp
   ui/newstuff.cpp
115
   ui/pageitemdelegate.cpp
116
   ui/pagepainter.cpp
Albert Astals Cid's avatar
Albert Astals Cid committed
117
   ui/pagesizelabel.cpp
118 119 120 121 122 123 124 125 126 127 128 129 130 131
   ui/pageviewannotator.cpp
   ui/pageview.cpp
   ui/pageviewutils.cpp
   ui/presentationwidget.cpp
   ui/propertiesdialog.cpp
   ui/searchwidget.cpp
   ui/side_reviews.cpp
   ui/thumbnaillist.cpp
   ui/toc.cpp
   ui/painter_agg2/agg_bezier_arc.cpp
   ui/painter_agg2/agg_path_storage.cpp
   ui/painter_agg2/agg_rasterizer_scanline_aa.cpp
   ui/painter_agg2/agg_trans_affine.cpp
   ui/painter_agg2/agg_vcgen_stroke.cpp
132
)
133

134 135 136 137 138 139 140 141
kde4_add_ui_files(okularpart_SRCS
   conf/dlgaccessibilitybase.ui
   conf/dlggeneralbase.ui
   conf/dlgidentitybase.ui
   conf/dlgperformancebase.ui
   conf/dlgpresentationbase.ui
)

142
kde4_automoc(${okularpart_SRCS})
143

144
kde4_add_plugin(okularpart WITH_PREFIX ${okularpart_SRCS})
145

146 147 148 149
target_link_libraries(okularpart  okularcore  ${KDE4_KPARTS_LIBS} ${KDE4_KDEPRINT_LIBS} ${KDE4_KNEWSTUFF_LIBS} ${KDE4_KHTML_LIBS} m )
if ( X11_Xrender_FOUND )
   target_link_libraries( okularpart ${X11_Xrender_LIB} )
endif ( X11_Xrender_FOUND )
150

151
install(TARGETS okularpart DESTINATION ${PLUGIN_INSTALL_DIR})
152 153 154 155


########### install files ###############

156 157
install( FILES okular_part.desktop  DESTINATION  ${SERVICES_INSTALL_DIR} )
install( FILES part.rc DESTINATION ${DATA_INSTALL_DIR}/okularpart )
158

159
kde4_install_icons( ${ICON_INSTALL_DIR}   )
160