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

Pino Toscano's avatar
Pino Toscano committed
3 4 5
add_subdirectory( ui )
add_subdirectory( shell )
add_subdirectory( generators )
6

7 8
include(OkularConfigureChecks.cmake)

Christian Ehrlicher's avatar
Christian Ehrlicher committed
9 10 11 12 13
if(NOT WIN32)
 set(MATH_LIB m)
else(NOT WIN32)
 set(MATH_LIB)
endif(NOT WIN32)
14
include_directories(
15
   ${CMAKE_CURRENT_SOURCE_DIR}
16
   ${BLITZ_INCLUDES}
17
)
18 19


20
# okularcore
21

22
set(okularcore_SRCS
Pino Toscano's avatar
Pino Toscano committed
23
   core/action.cpp
24 25
   core/annotations.cpp
   core/area.cpp
26
   core/audioplayer.cpp
27
   core/bookmarkmanager.cpp
28 29
   core/chooseenginedialog.cpp
   core/document.cpp
30
   core/fontinfo.cpp
31
   core/form.cpp
32
   core/generator.cpp
33
   core/generator_p.cpp
34
   core/misc.cpp
35
   core/observer.cpp
36
   core/page.cpp
37
   core/pagecontroller.cpp
38
   core/pagesize.cpp
39
   core/pagetransition.cpp
40
   core/rotationjob.cpp
41
   core/sound.cpp
42
   core/sourcereference.cpp
43
   core/textdocumentgenerator.cpp
44
   core/textpage.cpp
45
   core/utils.cpp
John Layt's avatar
John Layt committed
46
   core/fileprinter.cpp
47 48
)

49
install( FILES
Pino Toscano's avatar
Pino Toscano committed
50
           core/action.h
51 52 53
           core/annotations.h
           core/area.h
           core/document.h
54
           core/fontinfo.h
55
           core/form.h
56
           core/generator.h
57
           core/global.h
58
           core/observer.h
59
           core/okular_export.h
60
           core/page.h
61
           core/pagesize.h
62 63 64
           core/pagetransition.h
           core/sound.h
           core/sourcereference.h
65
           core/textdocumentgenerator.h
66 67
           core/textpage.h
           core/utils.h
John Layt's avatar
John Layt committed
68
           core/fileprinter.h
69 70 71 72 73 74 75 76
         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
77
kde4_add_ui_files(okularcore_SRCS
78
   core/chooseenginewidget.ui
79 80
)

81
kde4_add_kcfg_files(okularcore_SRCS conf/settings.kcfgc )
82 83 84 85


kde4_add_library(okularcore SHARED ${okularcore_SRCS})

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)

91
target_link_libraries(okularcore  ${OKULAR_IOKIT} ${KDE4_KIO_LIBS} ${KDE4_KUTILS_LIBS} ${KDE4_PHONON_LIBRARY} ${MATH_LIB} ${KDE4_THREADWEAVER_LIBRARY} )
92

93 94
set_target_properties(okularcore PROPERTIES VERSION 1.0.0 SOVERSION 1 )

95
install(TARGETS okularcore DESTINATION ${LIB_INSTALL_DIR} )
96

97 98 99
install(FILES conf/okular.kcfg DESTINATION ${KCFG_INSTALL_DIR})
install(FILES core/okularGenerator.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})

100 101 102 103
# okularpart

set(okularpart_SRCS
   part.cpp
104 105
   conf/preferencesdialog.cpp
   conf/dlgaccessibility.cpp
106
   conf/dlgdebug.cpp
107 108 109 110
   conf/dlggeneral.cpp
   conf/dlgidentity.cpp
   conf/dlgperformance.cpp
   conf/dlgpresentation.cpp
111
   ui/embeddedfilesdialog.cpp
112
   ui/annotwindow.cpp
113
   ui/annotationguiutils.cpp
114
   ui/annotationmodel.cpp
115
   ui/annotationpopup.cpp
116
   ui/annotationpropertiesdialog.cpp
117
   ui/annotationproxymodels.cpp
118
   ui/annotationtools.cpp
Pino Toscano's avatar
Pino Toscano committed
119
   ui/annotationwidgets.cpp
120
   ui/bookmarklist.cpp
121
   ui/findbar.cpp
122
   ui/formwidgets.cpp
123
   ui/ktreeviewsearchline.cpp
124
   ui/minibar.cpp
125
   ui/pageitemdelegate.cpp
126
   ui/pagepainter.cpp
Albert Astals Cid's avatar
Albert Astals Cid committed
127
   ui/pagesizelabel.cpp
128 129 130
   ui/pageviewannotator.cpp
   ui/pageview.cpp
   ui/pageviewutils.cpp
131
   ui/presentationsearchbar.cpp
132 133
   ui/presentationwidget.cpp
   ui/propertiesdialog.cpp
134
   ui/searchlineedit.cpp
135
   ui/searchwidget.cpp
Pino Toscano's avatar
Pino Toscano committed
136
   ui/sidebar.cpp
137 138 139
   ui/side_reviews.cpp
   ui/thumbnaillist.cpp
   ui/toc.cpp
140
   ui/tocmodel.cpp
141
   ui/toolaction.cpp
142
)
143

144 145 146 147 148 149 150 151
kde4_add_ui_files(okularpart_SRCS
   conf/dlgaccessibilitybase.ui
   conf/dlggeneralbase.ui
   conf/dlgidentitybase.ui
   conf/dlgperformancebase.ui
   conf/dlgpresentationbase.ui
)

152

153
kde4_add_plugin(okularpart WITH_PREFIX ${okularpart_SRCS})
154

155
target_link_libraries(okularpart okularcore ${KDE4_KPARTS_LIBS} ${KDE4_KNEWSTUFF2_LIBS} ${MATH_LIB} ${BLITZ_LIBRARIES})
156

157
install(TARGETS okularpart DESTINATION ${PLUGIN_INSTALL_DIR})
158 159 160 161


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

162
install( FILES okular_part.desktop  DESTINATION  ${SERVICES_INSTALL_DIR} )
163
install( FILES part.rc DESTINATION ${DATA_INSTALL_DIR}/okular )
164

165
kde4_install_icons( ${ICON_INSTALL_DIR}   )
166