CMakeLists.txt 7.81 KB
Newer Older
1 2 3 4
macro_optional_find_package(Nepomuk)
macro_optional_find_package(QJSON)

add_subdirectory(audioscopes)
5
add_subdirectory(beziercurve)
6
add_subdirectory(blackmagic)
7
add_subdirectory(colorcorrection)
8 9 10
add_subdirectory(colorscopes)
add_subdirectory(commands)
add_subdirectory(databackup)
11
add_subdirectory(kiss_fft)
12 13
add_subdirectory(mimetypes)
add_subdirectory(onmonitoritems)
14 15
add_subdirectory(simplekeyframes)
add_subdirectory(stopmotion)
16

17 18 19 20 21 22 23 24 25 26 27 28 29
if(QJSON_FOUND)
  add_subdirectory(rotoscoping)
  add_subdirectory(onmonitoritems/rotoscoping)
  include_directories(QJSON_INCLUDE_DIR)
  set(optional_libs ${optional_libs} ${QJSON_LIBRARIES})
  add_definitions(-DQJSON)
else(QJSON_FOUND)
  message(STATUS "Install QJson to use the rotoscoping filter")
endif(QJSON_FOUND)

if(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")
  add_subdirectory(v4l)
endif(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")
30

Alberto Villa's avatar
Alberto Villa committed
31 32 33 34 35 36 37
include_directories(
  ${KDE4_INCLUDE_DIR}
  ${KDE4_INCLUDE_DIR}/KDE
  ${QT_INCLUDES}
  ${LIBMLT_INCLUDE_DIR}
  ${LIBMLTPLUS_INCLUDE_DIR}
  ${QDBUS_INCLUDE_DIRS}
38
  ${CMAKE_CURRENT_BINARY_DIR}
Alberto Villa's avatar
Alberto Villa committed
39 40 41 42 43
  ${CMAKE_BINARY_DIR}
)

if(Nepomuk_FOUND)
  include_directories(NEPOMUK_INCLUDES)
44
  set(optional_libs ${optional_libs} ${NEPOMUK_LIBRARIES})
Alberto Villa's avatar
Alberto Villa committed
45 46
  add_definitions(-DNEPOMUK)
endif(Nepomuk_FOUND)
Marco Gittler's avatar
Marco Gittler committed
47

Alberto Villa's avatar
Alberto Villa committed
48 49 50
if(Q_WS_X11)
  include_directories(${X11_Xlib_INCLUDE_PATH})
endif(Q_WS_X11)
51

Alberto Villa's avatar
Alberto Villa committed
52
if(APPLE)
53 54
  find_package(OpenGL)
  set(QT_USE_QTOPENGL TRUE)
Alberto Villa's avatar
Alberto Villa committed
55
else(APPLE)
56
  macro_optional_find_package(OpenGL)
Alberto Villa's avatar
Alberto Villa committed
57
endif(APPLE)
58

59

Alberto Villa's avatar
Alberto Villa committed
60 61 62 63
link_libraries(
  ${LIBMLT_LIBRARY}
  ${LIBMLTPLUS_LIBRARY}
  ${optional_libs}
64 65 66 67
)

kde4_add_ui_files(kdenlive_UI
  widgets/timeline_ui.ui
68
  widgets/recmonitor_ui.ui
69
  widgets/colorclip_ui.ui
70
  widgets/slideshowclip_ui.ui
71
  widgets/configmisc_ui.ui
72
  widgets/configenv_ui.ui
73
  widgets/configtimeline_ui.ui
74
  widgets/configsdl_ui.ui
75
  widgets/configcapture_ui.ui
76
  widgets/configtranscode_ui.ui
77
  widgets/configproject_ui.ui
78
  widgets/effectlist_ui.ui
79
  widgets/effectstack_ui.ui
80
  widgets/profiledialog_ui.ui
81
  widgets/projectsettings_ui.ui
Marco Gittler's avatar
Marco Gittler committed
82
  widgets/keyframewidget_ui.ui
83
  widgets/listval_ui.ui
84
  widgets/wipeval_ui.ui
85
  widgets/boolval_ui.ui
Marco Gittler's avatar
Marco Gittler committed
86
  widgets/titlewidget_ui.ui
87
  widgets/unicodedialog_ui.ui
88
  widgets/timelinebuttons_ui.ui
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
89
  widgets/renderwidget_ui.ui
90
  widgets/saveprofile_ui.ui
91
  widgets/transitionsettings_ui.ui
92
  widgets/configjogshuttle_ui.ui
93
  widgets/trackheader_ui.ui
94
  widgets/clipproperties_ui.ui
95
  widgets/markerdialog_ui.ui
96
  widgets/keyframedialog_ui.ui
97
  widgets/clipdurationdialog_ui.ui
98
  widgets/managecaptures_ui.ui
99
  widgets/geometryval_ui.ui
100 101
  widgets/wizardstandard_ui.ui
  widgets/wizardextra_ui.ui
102
  widgets/wizardcapture_ui.ui
103
  widgets/wizardcheck_ui.ui
104
  widgets/wizardmltcheck_ui.ui
105
  widgets/spacerdialog_ui.ui
106
  widgets/addtrack_ui.ui
107 108 109
  widgets/dvdwizardvob_ui.ui
  widgets/dvdwizardmenu_ui.ui
  widgets/dvdwizardstatus_ui.ui
110
  widgets/dvdwizardchapters_ui.ui
111
  widgets/missingclips_ui.ui
112
  widgets/cliptranscode_ui.ui
113
  widgets/templateclip_ui.ui
114
  widgets/keyframeeditor_ui.ui
115
  widgets/tracksconfigdialog_ui.ui
116
  widgets/urlval_ui.ui
Simon A. Eugster's avatar
Simon A. Eugster committed
117
  widgets/vectorscope_ui.ui
Simon A. Eugster's avatar
Simon A. Eugster committed
118
  widgets/colorplaneexport_ui.ui
Simon A. Eugster's avatar
Simon A. Eugster committed
119
  widgets/waveform_ui.ui
Simon A. Eugster's avatar
Simon A. Eugster committed
120
  widgets/rgbparade_ui.ui
121
  widgets/histogram_ui.ui
122
  widgets/geometrywidget_ui.ui
123
  widgets/stopmotion_ui.ui
124
  widgets/audiospectrum_ui.ui
125
  widgets/spectrogram_ui.ui
126
  widgets/smconfig_ui.ui
Till Theato's avatar
Till Theato committed
127
  widgets/bezierspline_ui.ui
128
  widgets/monitoreditwidget_ui.ui
129
  widgets/archivewidget_ui.ui
130
  widgets/manageencodingprofile_ui.ui
131
  widgets/backupdialog_ui.ui
132
)
Alberto Villa's avatar
Alberto Villa committed
133 134

set(kdenlive_SRCS
135
  ${kdenlive_SRCS}
136 137 138
  main.cpp
  mainwindow.cpp
  customruler.cpp
139
  smallruler.cpp
140 141 142 143 144 145
  projectlist.cpp
  projectitem.cpp
  monitor.cpp
  gentime.cpp
  renderer.cpp
  kdenlivedoc.cpp
146
  projectlistview.cpp
147 148 149
  trackview.cpp
  docclipbase.cpp
  timecode.cpp
150
  monitormanager.cpp
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
151
  headertrack.cpp
152 153
  customtrackview.cpp
  clipitem.cpp
154
  kthumb.cpp
155
  clipmanager.cpp
156 157
  effectslist.cpp
  initeffects.cpp
158
  effectslistview.cpp
159
  effectstackview.cpp
Marco Gittler's avatar
Marco Gittler committed
160
  effectstackedit.cpp
Marco Gittler's avatar
Marco Gittler committed
161
  parameterplotter.cpp
162 163
  profilesdialog.cpp
  projectsettings.cpp
164
  kdenlivesettingsdialog.cpp
165
  complexparameter.cpp
Marco Gittler's avatar
Marco Gittler committed
166
  titlewidget.cpp
167
  unicodedialog.cpp
168
  graphicsscenerectmove.cpp
169
  effectslistwidget.cpp
170
  titledocument.cpp
171
  transition.cpp
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
172
  renderwidget.cpp
173
  abstractclipitem.cpp
174
  transitionsettings.cpp
175
  recmonitor.cpp
176
  clipproperties.cpp
177
  slideshowclip.cpp
178
  markerdialog.cpp
179
  guide.cpp
180
  statusbarmessagelabel.cpp
181
  clipdurationdialog.cpp
182
  managecapturesdialog.cpp
183
  geometryval.cpp
184
  wizard.cpp
185 186
  customtrackscene.cpp
  abstractgroupitem.cpp
187
  keyframehelper.cpp
188
  spacerdialog.cpp
189
  dvdwizardvob.cpp
190
  dvdwizardmenu.cpp
191
  dvdwizard.cpp
192
  documentchecker.cpp
193
  dvdwizardchapters.cpp
Alberto Villa's avatar
Alberto Villa committed
194
  documentvalidator.cpp
195
  cliptranscode.cpp
196
  keyframeedit.cpp
197
  positionedit.cpp
198
  trackdialog.cpp
199
  subprojectitem.cpp
200
  folderprojectitem.cpp
201
  KoSliderCombo.cpp
202 203
  kis_cubic_curve.cpp
  kis_curve_widget.cpp
204
  timecodedisplay.cpp
205
  tracksconfigdialog.cpp
206
  abstractscopewidget.cpp
Simon A. Eugster's avatar
Simon A. Eugster committed
207 208
  colorplaneexport.cpp
  colortools.cpp
209 210
  colorpickerwidget.cpp
  choosecolorwidget.cpp
211 212
  monitorscene.cpp
  geometrywidget.cpp
213
  doubleparameterwidget.cpp
Marco Gittler's avatar
Marco Gittler committed
214
  audiosignal.cpp
215
  cornerswidget.cpp
216
  dragvalue.cpp
217
  monitoreditwidget.cpp
218
  noteswidget.cpp
219
  archivewidget.cpp
220 221
  mltdevicecapture.cpp
  abstractmonitor.cpp
222
  encodingprofilesdialog.cpp
223 224
)

Alberto Villa's avatar
Alberto Villa committed
225
add_definitions(${KDE4_DEFINITIONS})
226

227 228 229 230 231
if(CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")
  add_definitions(-DQ_OS_KFREEBSD)
endif(CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")

if(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE)
232
  add_definitions(-DNO_JOGSHUTTLE)
233
else(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE)
Dan Dennedy's avatar
Dan Dennedy committed
234
  set(kdenlive_SRCS jogshuttle.cpp jogaction.cpp jogshuttleconfig.cpp ${kdenlive_SRCS})
235
endif(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE)
236

Alberto Villa's avatar
Alberto Villa committed
237
if(APPLE OR OPENGL_FOUND)
238
  add_definitions(-DUSE_OPEN_GL)
239
  set(kdenlive_SRCS videoglwidget.cpp ${kdenlive_SRCS})
Alberto Villa's avatar
Alberto Villa committed
240
endif(APPLE OR OPENGL_FOUND)
241

242
# Add libdl
Alberto Villa's avatar
Alberto Villa committed
243 244
find_library(DL_LIB NAMES ${CMAKE_DL_LIBS})
message(STATUS "using dl library: ${DL_LIB}")
245

Alberto Villa's avatar
Alberto Villa committed
246 247
kde4_add_kcfg_files(kdenlive_SRCS kdenlivesettings.kcfgc)
qt4_add_dbus_adaptor(kdenlive_SRCS org.kdenlive.MainWindow.xml mainwindow.h MainWindow)
248
qt4_add_resources(kdenlive_SRCS widgets/resources.qrc)
249
kde4_add_executable(kdenlive ${kdenlive_SRCS} ${kdenlive_UI})
250

251
set(KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF3_LIBS})
252

Alberto Villa's avatar
Alberto Villa committed
253
target_link_libraries(kdenlive
254
  ${KDE4_KDEUI_LIBS}
255
  ${KDE4_KIO_LIBS}
Alberto Villa's avatar
Alberto Villa committed
256
  ${KNEWSTUFF_LIBS}
257 258
  ${LIBMLTPLUS_LIBRARY}
  ${LIBMLT_LIBRARY}
Marco Gittler's avatar
Marco Gittler committed
259
  ${optional_libs}
260
  ${KDE4_KNOTIFYCONFIG_LIBRARY}
261
  ${KDE4_KROSSUI_LIBS}
262
  ${CMAKE_DL_LIBS}
263
  ${CMAKE_THREAD_LIBS_INIT}
264
  ${QT_QTSCRIPT_LIBRARY}
265
)
266

Alberto Villa's avatar
Alberto Villa committed
267
if(Q_WS_X11)
268
  target_link_libraries(kdenlive ${X11_LIBRARIES})
Alberto Villa's avatar
Alberto Villa committed
269
endif(Q_WS_X11)
270

Alberto Villa's avatar
Alberto Villa committed
271
if(APPLE)
272 273
  find_package(SDL REQUIRED)
  target_link_libraries(kdenlive ${SDL_LIBRARY})
274 275
  target_link_libraries(kdenlive ${QT_QTOPENGL_LIBRARY})
  target_link_libraries(kdenlive ${OPENGL_LIBRARIES})
Alberto Villa's avatar
Alberto Villa committed
276
else(APPLE)
277
  add_definitions(-DHAVE_V4L2)
Alberto Villa's avatar
Alberto Villa committed
278 279 280 281 282
  if(OPENGL_FOUND)
    target_link_libraries(kdenlive ${QT_QTOPENGL_LIBRARY})
    target_link_libraries(kdenlive ${OPENGL_LIBRARIES})
  endif(OPENGL_FOUND)
endif(APPLE)
283

284
install(TARGETS kdenlive DESTINATION ${BIN_INSTALL_DIR})
Alberto Villa's avatar
Alberto Villa committed
285 286 287 288
install(FILES kdenliveui.rc kdenlive.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kdenlive)
install(FILES kdenlivesettings.kcfg DESTINATION ${KCFG_INSTALL_DIR})
install(FILES kdenlive.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
kde4_install_icons(${ICON_INSTALL_DIR})
289
install(FILES kdenlive_titles.knsrc kdenlive_wipes.knsrc kdenlive_renderprofiles.knsrc kdenlive_projectprofiles.knsrc kdenlivetranscodingrc DESTINATION ${CONFIG_INSTALL_DIR})