1 | ############################################################################### |
---|
2 | # CMake file for the qStopMotion project # |
---|
3 | # (c) Ralf Lange, longsoft.de # |
---|
4 | # Last update: 2016-11-10 # |
---|
5 | # # |
---|
6 | # Usage: # |
---|
7 | # * Qt-Creator (Windows, Linux) # |
---|
8 | # + open this file # |
---|
9 | # + select a destination directory # |
---|
10 | # + press the CMake button # |
---|
11 | # * makefile: (Windows) # |
---|
12 | # + open Visual Studio Command Prompt # |
---|
13 | # (for 64bit use: 'VS2013 x64 Native Tools Command Prompt' # |
---|
14 | # (for 32bit use: 'VS2013 x32 Native Tools Command Prompt' # |
---|
15 | # + cmake -G "NMake Makefiles" . # |
---|
16 | # + nmake # |
---|
17 | # + nmake install (with administration rights) # |
---|
18 | # + nmake package # |
---|
19 | # * makefile: (Linux) # |
---|
20 | # + cmake . # |
---|
21 | # + make # |
---|
22 | # + sudo make install # |
---|
23 | # * MS Visual Studio (Windows) # |
---|
24 | # + for 32bit: cmake -G "Visual Studio 12 2013" # |
---|
25 | # + for 64bit: cmake -G "Visual Studio 12 2013 x64" # |
---|
26 | # + open the solution file # |
---|
27 | # # |
---|
28 | ############################################################################### |
---|
29 | |
---|
30 | project(qStopMotion) |
---|
31 | |
---|
32 | cmake_minimum_required(VERSION 2.8.8) |
---|
33 | |
---|
34 | ############################################################################### |
---|
35 | # Platform check |
---|
36 | ############################################################################### |
---|
37 | |
---|
38 | IF(WIN32) |
---|
39 | IF(CMAKE_CL_64) |
---|
40 | message("Target platform: Windows 64bit") |
---|
41 | ELSE(CMAKE_CL_64) |
---|
42 | message("Target platform: Windows 32bit") |
---|
43 | ENDIF(CMAKE_CL_64) |
---|
44 | ELSEIF(UNIX) |
---|
45 | IF(APPLE) |
---|
46 | message( |
---|
47 | FATAL_ERROR |
---|
48 | "Target platform: MacOS 64bit - Not supported!" |
---|
49 | ) |
---|
50 | ENDIF(APPLE) |
---|
51 | |
---|
52 | IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") |
---|
53 | message("Target platform: Unix 64bit") |
---|
54 | ELSE("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") |
---|
55 | message("Target platform: Unix 32bit") |
---|
56 | ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") |
---|
57 | ELSE(WIN32) |
---|
58 | message( |
---|
59 | FATAL_ERROR |
---|
60 | "Target platform - Not supported!" |
---|
61 | ) |
---|
62 | ENDIF(WIN32) |
---|
63 | |
---|
64 | ############################################################################### |
---|
65 | # General project settings |
---|
66 | ############################################################################### |
---|
67 | |
---|
68 | IF(NOT DEFINED CMAKE_BUILD_TYPE) |
---|
69 | SET( |
---|
70 | CMAKE_BUILD_TYPE |
---|
71 | "Release" |
---|
72 | CACHE |
---|
73 | STRING |
---|
74 | "Create Release Version" |
---|
75 | FORCE |
---|
76 | ) |
---|
77 | ENDIF(NOT DEFINED CMAKE_BUILD_TYPE) |
---|
78 | |
---|
79 | SET(CMAKE_PROJECT_NAME "qstopmotion") |
---|
80 | SET(QSTOPMOTION_HOMEPAGE "http://www.qstopmotion.org") |
---|
81 | SET(QSTOPMOTION_VERSION_MAJOR "2") |
---|
82 | SET(QSTOPMOTION_VERSION_MINOR "3") |
---|
83 | SET(QSTOPMOTION_VERSION_PATCH "2") |
---|
84 | |
---|
85 | SET(FILES_TO_TRANSLATE ) |
---|
86 | |
---|
87 | ############################################################################### |
---|
88 | # Qt5 support |
---|
89 | ############################################################################### |
---|
90 | |
---|
91 | # Enable/disable Qt functionality |
---|
92 | SET(CMAKE_AUTOMOC ON) |
---|
93 | SET(CMAKE_INCLUDE_CURRENT_DIR ON) |
---|
94 | |
---|
95 | # find and setup Qt5 for this poroject |
---|
96 | find_package(Qt5 REQUIRED COMPONENTS Core Widgets Xml) |
---|
97 | |
---|
98 | message("Qt5 Version: ${Qt5Widgets_VERSION_STRING}") |
---|
99 | |
---|
100 | IF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
101 | message("No Qt debug and warning output!") |
---|
102 | add_definitions(-DQT_NO_DEBUG_OUTPUT) |
---|
103 | add_definitions(-DQT_NO_WARNING_OUTPUT) |
---|
104 | ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
105 | |
---|
106 | ############################################################################### |
---|
107 | # File definitions |
---|
108 | ############################################################################### |
---|
109 | |
---|
110 | # add all header files of the project to HEADERS |
---|
111 | SET( |
---|
112 | HEADERS |
---|
113 | src/frontends/observer.h |
---|
114 | src/frontends/frontend.h |
---|
115 | src/frontends/viewfacade.h |
---|
116 | src/frontends/qtfrontend/dialogs/licence.h |
---|
117 | src/frontends/qtfrontend/timeline/exposurethumbview.h |
---|
118 | src/frontends/qtfrontend/timeline/thumbview.h |
---|
119 | src/technical/util.h |
---|
120 | src/technical/audio/audiodriver.h |
---|
121 | src/technical/audio/audioformat.h |
---|
122 | src/technical/grabber/grabbercontrolcapabilities.h |
---|
123 | src/technical/grabber/grabbercontroller.h |
---|
124 | src/technical/grabber/grabberresolution.h |
---|
125 | src/technical/grabber/imageconverter.h |
---|
126 | src/technical/grabber/imagegrabberdevice.h |
---|
127 | src/technical/grabber/imagegrabberthread.h |
---|
128 | src/technical/videoencoder/ffmpegencoder.h |
---|
129 | src/technical/videoencoder/libavencoder.h |
---|
130 | src/technical/videoencoder/videoencoder.h |
---|
131 | src/technical/videoencoder/videoencoderfactory.h |
---|
132 | ) |
---|
133 | |
---|
134 | IF(WIN32) |
---|
135 | SET( |
---|
136 | HEADERS |
---|
137 | ${HEADERS} |
---|
138 | src/technical/grabber/mediafoundation/mfcontroller.h |
---|
139 | src/technical/grabber/mediafoundation/mfutil.h |
---|
140 | ) |
---|
141 | ENDIF(WIN32) |
---|
142 | |
---|
143 | IF(UNIX AND NOT APPLE) |
---|
144 | SET( |
---|
145 | HEADERS |
---|
146 | ${HEADERS} |
---|
147 | src/technical/grabber/gphoto2/gpcontroller.h |
---|
148 | src/technical/grabber/video4linux2/v4l2controller.h |
---|
149 | ) |
---|
150 | ENDIF(UNIX AND NOT APPLE) |
---|
151 | |
---|
152 | # add all header files of the project to MOC to MOC_HEADERS |
---|
153 | SET( |
---|
154 | MOC_HEADERS |
---|
155 | src/domain/domainfacade.h |
---|
156 | src/domain/animation/animationproject.h |
---|
157 | src/domain/animation/exposure.h |
---|
158 | src/domain/animation/projectserializer.h |
---|
159 | src/domain/animation/scene.h |
---|
160 | src/domain/animation/take.h |
---|
161 | src/domain/undo/undobase.h |
---|
162 | src/domain/undo/undoexposureadd.h |
---|
163 | src/domain/undo/undoexposureinsert.h |
---|
164 | src/domain/undo/undoexposuremove.h |
---|
165 | src/domain/undo/undoexposureremove.h |
---|
166 | src/domain/undo/undoexposureselect.h |
---|
167 | src/domain/undo/undoprojectnew.h |
---|
168 | src/domain/undo/undoprojectopen.h |
---|
169 | src/domain/undo/undosceneadd.h |
---|
170 | src/domain/undo/undosceneinsert.h |
---|
171 | src/domain/undo/undoscenemove.h |
---|
172 | src/domain/undo/undosceneremove.h |
---|
173 | src/domain/undo/undosceneselect.h |
---|
174 | src/domain/undo/undotakeadd.h |
---|
175 | src/domain/undo/undotakeinsert.h |
---|
176 | src/domain/undo/undotakemove.h |
---|
177 | src/domain/undo/undotakeremove.h |
---|
178 | src/domain/undo/undotakeselect.h |
---|
179 | src/frontends/qtfrontend/mainwindowgui.h |
---|
180 | src/frontends/qtfrontend/menuframe.h |
---|
181 | src/frontends/qtfrontend/qtfrontend.h |
---|
182 | src/frontends/qtfrontend/toolbar.h |
---|
183 | src/frontends/qtfrontend/dialogs/aboutdialog.h |
---|
184 | src/frontends/qtfrontend/dialogs/cameracontrollerdialog.h |
---|
185 | src/frontends/qtfrontend/dialogs/descriptiondialog.h |
---|
186 | src/frontends/qtfrontend/dialogs/externalcommanddialog.h |
---|
187 | src/frontends/qtfrontend/dialogs/helpbrowser.h |
---|
188 | src/frontends/qtfrontend/dialogs/startdialog.h |
---|
189 | src/frontends/qtfrontend/elements/clickablelabel.h |
---|
190 | src/frontends/qtfrontend/elements/flexiblelineedit.h |
---|
191 | src/frontends/qtfrontend/elements/flexiblespinbox.h |
---|
192 | src/frontends/qtfrontend/frameview/frameviewimage.h |
---|
193 | src/frontends/qtfrontend/frameview/frameviewinterface.h |
---|
194 | src/frontends/qtfrontend/preferences/exportwidget.h |
---|
195 | src/frontends/qtfrontend/preferences/generaldialog.h |
---|
196 | src/frontends/qtfrontend/preferences/generalwidget.h |
---|
197 | src/frontends/qtfrontend/preferences/grabberwidget.h |
---|
198 | src/frontends/qtfrontend/preferences/importwidget.h |
---|
199 | src/frontends/qtfrontend/preferences/projectdialog.h |
---|
200 | src/frontends/qtfrontend/preferences/projectwidget.h |
---|
201 | src/frontends/qtfrontend/preferences/transformwidget.h |
---|
202 | src/frontends/qtfrontend/timeline/timeline.h |
---|
203 | src/frontends/qtfrontend/tooltabs/compositingtab.h |
---|
204 | src/frontends/qtfrontend/tooltabs/projecttab.h |
---|
205 | src/frontends/qtfrontend/tooltabs/recordingtab.h |
---|
206 | src/frontends/qtfrontend/tooltabs/viewtab.h |
---|
207 | src/technical/externalchangemonitor.h |
---|
208 | src/technical/preferenceselement.h |
---|
209 | src/technical/preferencestool.h |
---|
210 | src/technical/grabber/imagegrabber.h |
---|
211 | src/technical/grabber/imagegrabberfacade.h |
---|
212 | ) |
---|
213 | |
---|
214 | IF(WIN32) |
---|
215 | SET( |
---|
216 | MOC_HEADERS |
---|
217 | ${MOC_HEADERS} |
---|
218 | src/technical/grabber/mediafoundation/mfgrabber.h |
---|
219 | ) |
---|
220 | ENDIF(WIN32) |
---|
221 | |
---|
222 | IF(UNIX AND NOT APPLE) |
---|
223 | SET( |
---|
224 | MOC_HEADERS |
---|
225 | ${MOC_HEADERS} |
---|
226 | src/technical/grabber/gphoto2/gpgrabber.h |
---|
227 | src/technical/grabber/video4linux2/v4l2grabber.h |
---|
228 | ) |
---|
229 | ENDIF(UNIX AND NOT APPLE) |
---|
230 | |
---|
231 | # add all source files to SOURCES |
---|
232 | SET( |
---|
233 | SOURCES |
---|
234 | src/main.cpp |
---|
235 | src/domain/domainfacade.cpp |
---|
236 | src/domain/animation/animationproject.cpp |
---|
237 | src/domain/animation/exposure.cpp |
---|
238 | src/domain/animation/projectserializer.cpp |
---|
239 | src/domain/animation/scene.cpp |
---|
240 | src/domain/animation/take.cpp |
---|
241 | src/domain/undo/undobase.cpp |
---|
242 | src/domain/undo/undoexposureadd.cpp |
---|
243 | src/domain/undo/undoexposureinsert.cpp |
---|
244 | src/domain/undo/undoexposuremove.cpp |
---|
245 | src/domain/undo/undoexposureremove.cpp |
---|
246 | src/domain/undo/undoexposureselect.cpp |
---|
247 | src/domain/undo/undoprojectnew.cpp |
---|
248 | src/domain/undo/undoprojectopen.cpp |
---|
249 | src/domain/undo/undosceneadd.cpp |
---|
250 | src/domain/undo/undosceneinsert.cpp |
---|
251 | src/domain/undo/undoscenemove.cpp |
---|
252 | src/domain/undo/undosceneremove.cpp |
---|
253 | src/domain/undo/undosceneselect.cpp |
---|
254 | src/domain/undo/undotakeadd.cpp |
---|
255 | src/domain/undo/undotakeinsert.cpp |
---|
256 | src/domain/undo/undotakemove.cpp |
---|
257 | src/domain/undo/undotakeremove.cpp |
---|
258 | src/domain/undo/undotakeselect.cpp |
---|
259 | src/frontends/viewfacade.cpp |
---|
260 | src/frontends/qtfrontend/mainwindowgui.cpp |
---|
261 | src/frontends/qtfrontend/menuframe.cpp |
---|
262 | src/frontends/qtfrontend/qtfrontend.cpp |
---|
263 | src/frontends/qtfrontend/toolbar.cpp |
---|
264 | src/frontends/qtfrontend/dialogs/aboutdialog.cpp |
---|
265 | src/frontends/qtfrontend/dialogs/cameracontrollerdialog.cpp |
---|
266 | src/frontends/qtfrontend/dialogs/descriptiondialog.cpp |
---|
267 | src/frontends/qtfrontend/dialogs/externalcommanddialog.cpp |
---|
268 | src/frontends/qtfrontend/dialogs/helpbrowser.cpp |
---|
269 | src/frontends/qtfrontend/dialogs/startdialog.cpp |
---|
270 | src/frontends/qtfrontend/elements/clickablelabel.cpp |
---|
271 | src/frontends/qtfrontend/elements/flexiblelineedit.cpp |
---|
272 | src/frontends/qtfrontend/elements/flexiblespinbox.cpp |
---|
273 | src/frontends/qtfrontend/frameview/frameviewimage.cpp |
---|
274 | src/frontends/qtfrontend/frameview/frameviewinterface.cpp |
---|
275 | src/frontends/qtfrontend/preferences/exportwidget.cpp |
---|
276 | src/frontends/qtfrontend/preferences/generaldialog.cpp |
---|
277 | src/frontends/qtfrontend/preferences/generalwidget.cpp |
---|
278 | src/frontends/qtfrontend/preferences/grabberwidget.cpp |
---|
279 | src/frontends/qtfrontend/preferences/importwidget.cpp |
---|
280 | src/frontends/qtfrontend/preferences/projectdialog.cpp |
---|
281 | src/frontends/qtfrontend/preferences/projectwidget.cpp |
---|
282 | src/frontends/qtfrontend/preferences/transformwidget.cpp |
---|
283 | src/frontends/qtfrontend/timeline/timeline.cpp |
---|
284 | src/frontends/qtfrontend/timeline/exposurethumbview.cpp |
---|
285 | src/frontends/qtfrontend/timeline/thumbview.cpp |
---|
286 | src/frontends/qtfrontend/tooltabs/compositingtab.cpp |
---|
287 | src/frontends/qtfrontend/tooltabs/projecttab.cpp |
---|
288 | src/frontends/qtfrontend/tooltabs/recordingtab.cpp |
---|
289 | src/frontends/qtfrontend/tooltabs/viewtab.cpp |
---|
290 | src/technical/externalchangemonitor.cpp |
---|
291 | src/technical/preferenceselement.cpp |
---|
292 | src/technical/preferencestool.cpp |
---|
293 | src/technical/util.cpp |
---|
294 | src/technical/grabber/grabbercontrolcapabilities.cpp |
---|
295 | src/technical/grabber/grabbercontroller.cpp |
---|
296 | src/technical/grabber/grabberresolution.cpp |
---|
297 | src/technical/grabber/imageconverter.cpp |
---|
298 | src/technical/grabber/imagegrabber.cpp |
---|
299 | src/technical/grabber/imagegrabberdevice.cpp |
---|
300 | src/technical/grabber/imagegrabberfacade.cpp |
---|
301 | src/technical/grabber/imagegrabberthread.cpp |
---|
302 | src/technical/videoencoder/ffmpegencoder.cpp |
---|
303 | src/technical/videoencoder/libavencoder.cpp |
---|
304 | src/technical/videoencoder/videoencoder.cpp |
---|
305 | src/technical/videoencoder/videoencoderfactory.cpp |
---|
306 | ) |
---|
307 | |
---|
308 | IF(WIN32) |
---|
309 | SET( |
---|
310 | SOURCES |
---|
311 | ${SOURCES} |
---|
312 | src/technical/grabber/mediafoundation/mfcontroller.cpp |
---|
313 | src/technical/grabber/mediafoundation/mfgrabber.cpp |
---|
314 | src/technical/grabber/mediafoundation/mfutil.cpp |
---|
315 | ) |
---|
316 | ENDIF(WIN32) |
---|
317 | |
---|
318 | IF(UNIX AND NOT APPLE) |
---|
319 | SET( |
---|
320 | SOURCES |
---|
321 | ${SOURCES} |
---|
322 | src/technical/grabber/gphoto2/gpcontroller.cpp |
---|
323 | src/technical/grabber/gphoto2/gpgrabber.cpp |
---|
324 | src/technical/grabber/video4linux2/v4l2controller.cpp |
---|
325 | src/technical/grabber/video4linux2/v4l2grabber.cpp |
---|
326 | ) |
---|
327 | ENDIF(UNIX AND NOT APPLE) |
---|
328 | |
---|
329 | SET( |
---|
330 | TRANSLATIONS |
---|
331 | translations/qstopmotion_da.ts |
---|
332 | translations/qstopmotion_de.ts |
---|
333 | translations/qstopmotion_fr.ts |
---|
334 | translations/qstopmotion_se.ts |
---|
335 | # translations/qstopmotion_br.ts |
---|
336 | # translations/qstopmotion_cz.ts |
---|
337 | # translations/qstopmotion_es.ts |
---|
338 | # translations/qstopmotion_fi.ts |
---|
339 | # translations/qstopmotion_gr.ts |
---|
340 | # translations/qstopmotion_it.ts |
---|
341 | # translations/qstopmotion_kl.ts |
---|
342 | # translations/qstopmotion_no_nb.ts |
---|
343 | # translations/qstopmotion_no_nn.ts |
---|
344 | # translations/qstopmotion_no_se.ts |
---|
345 | # translations/qstopmotion_pt.ts |
---|
346 | # translations/qstopmotion_ru.ts |
---|
347 | # translations/qstopmotion_sl.ts |
---|
348 | # translations/qstopmotion_tr.ts |
---|
349 | ) |
---|
350 | |
---|
351 | SET( |
---|
352 | GENERAL_FILES |
---|
353 | AUTHORS # The authors |
---|
354 | README.txt # The readme for the users |
---|
355 | COPYING # GPL2 License |
---|
356 | Changes.txt # Change log |
---|
357 | ) |
---|
358 | |
---|
359 | SET( |
---|
360 | UNIX_FILES |
---|
361 | linux/qstopmotion.desktop # .desktop is installed in a separate step Unix systems |
---|
362 | linux/qstopmotion.mime # ??? |
---|
363 | linux/qstopmotion.1 # Linux man page |
---|
364 | linux/qstopmotion.1.gz # Linux man page compressed |
---|
365 | ) |
---|
366 | |
---|
367 | SET( |
---|
368 | DEB_FILES |
---|
369 | deb/qstopmotion.xpm # DEB Icon is installed in a separate step |
---|
370 | deb/changelog # DEB changelog file |
---|
371 | deb/changelog.gz # DEB changelog file compressed |
---|
372 | deb/copyright # DEB copyright file |
---|
373 | deb/qstopmotion.menu # DEB .menu is installed in a separate step for Debian systems |
---|
374 | deb/postinst # DEB post installation script file, call update-menus |
---|
375 | ) |
---|
376 | |
---|
377 | SET( |
---|
378 | RPM_FILES |
---|
379 | rpm/qstopmotion.png # RPM Icon is installed in a separate step |
---|
380 | ) |
---|
381 | |
---|
382 | ############################################################################### |
---|
383 | # gPhoto2 support |
---|
384 | # |
---|
385 | # (Only UNIX) |
---|
386 | # |
---|
387 | # used libraries: libgphoto2 |
---|
388 | ############################################################################### |
---|
389 | |
---|
390 | IF(UNIX AND NOT APPLE) |
---|
391 | find_package(PkgConfig) |
---|
392 | pkg_check_modules(GPHOTO2 REQUIRED libgphoto2) |
---|
393 | message("GPHOTO2_INCLUDE_DIR: ${GPHOTO2_INCLUDE_DIR}") |
---|
394 | message("GPHOTO2_LIBRARIES: ${GPHOTO2_LIBRARIES}") |
---|
395 | ELSE(UNIX AND NOT APPLE) |
---|
396 | SET(GPHOTO2_INCLUDE_DIR) |
---|
397 | SET(GPHOTO2_LIBRARIES) |
---|
398 | ENDIF(UNIX AND NOT APPLE) |
---|
399 | |
---|
400 | ############################################################################### |
---|
401 | # Video4Linux2 support |
---|
402 | # |
---|
403 | # (Only UNIX) |
---|
404 | # |
---|
405 | # used libraries: libv4l2 |
---|
406 | ############################################################################### |
---|
407 | |
---|
408 | IF(UNIX AND NOT APPLE) |
---|
409 | include(${CMAKE_SOURCE_DIR}/cmake/FindV4L2PkgConfig.cmake) |
---|
410 | message("V4L2_INCLUDE_DIRS: ${V4L2_INCLUDE_DIRS}") |
---|
411 | message("V4L2_LIBRARIES: ${V4L2_LIBRARIES}") |
---|
412 | ELSE(UNIX AND NOT APPLE) |
---|
413 | SET(V4L2_INCLUDE_DIRS) |
---|
414 | SET(V4L2_LIBRARIES) |
---|
415 | ENDIF(UNIX AND NOT APPLE) |
---|
416 | |
---|
417 | ############################################################################### |
---|
418 | # Microsoft Media Foundation support |
---|
419 | # |
---|
420 | # (Only Windows form Windows Vista and newer) |
---|
421 | # |
---|
422 | # used libraries: evr.lib, mf.lib, mfplat.lib |
---|
423 | ############################################################################### |
---|
424 | |
---|
425 | IF(WIN32) |
---|
426 | SET( |
---|
427 | MEDIAFOUNDATION_LIBRARIES |
---|
428 | evr.lib # ??? |
---|
429 | mf.lib # ??? |
---|
430 | mfplat.lib # ??? |
---|
431 | mfuuid.lib # ??? |
---|
432 | mfreadwrite.lib # Read and write media stream |
---|
433 | # strmiids.lib # Old Direct Show library |
---|
434 | ) |
---|
435 | ELSE(WIN32) |
---|
436 | SET(MEDIAFOUNDATION_LIBRARIES) |
---|
437 | ENDIF(WIN32) |
---|
438 | |
---|
439 | ############################################################################### |
---|
440 | # Directory definitions |
---|
441 | ############################################################################### |
---|
442 | |
---|
443 | # tell cmake where to search for headers: |
---|
444 | include_directories( |
---|
445 | ${CMAKE_SOURCE_DIR}/src |
---|
446 | ${GPHOTO2_INCLUDE_DIR} |
---|
447 | ${V4L2_INCLUDE_DIRS} |
---|
448 | ) |
---|
449 | |
---|
450 | ############################################################################### |
---|
451 | # Additional definitions |
---|
452 | ############################################################################### |
---|
453 | |
---|
454 | ############################################################################### |
---|
455 | # |
---|
456 | # CONFIG += debug |
---|
457 | # CONFIG += release warn_off |
---|
458 | # DEFINES += NO_DEBUG |
---|
459 | # TEMPLATE = app |
---|
460 | # |
---|
461 | ############################################################################### |
---|
462 | |
---|
463 | IF(WIN32) |
---|
464 | add_definitions(-DUNICODE -D_UNICODE) |
---|
465 | ENDIF(WIN32) |
---|
466 | |
---|
467 | ############################################################################### |
---|
468 | # Create binaries |
---|
469 | ############################################################################### |
---|
470 | |
---|
471 | # Set the output directory for the executable - old variable (CMake <= 2.8.0) |
---|
472 | SET(EXECUTABLE_OUTPUT_PATH |
---|
473 | ${PROJECT_BINARY_DIR}/bin |
---|
474 | CACHE PATH |
---|
475 | "Single directory for all executables" |
---|
476 | ) |
---|
477 | |
---|
478 | # Set the output directory for the executable - new variable (CMake > 2.8.0) |
---|
479 | SET(RUNTIME_OUTPUT_DIRECTORY |
---|
480 | ${PROJECT_BINARY_DIR}/bin |
---|
481 | CACHE PATH |
---|
482 | "Single directory for all executables" |
---|
483 | ) |
---|
484 | |
---|
485 | MARK_AS_ADVANCED( |
---|
486 | EXECUTABLE_OUTPUT_PATH |
---|
487 | RUNTIME_OUTPUT_DIRECTORY |
---|
488 | ) |
---|
489 | |
---|
490 | IF(UNIX AND NOT APPLE) |
---|
491 | # Linux |
---|
492 | |
---|
493 | # Create a executable |
---|
494 | add_executable( |
---|
495 | qstopmotion |
---|
496 | ${SOURCES} |
---|
497 | ${MOC_SOURCES} |
---|
498 | ) |
---|
499 | |
---|
500 | # tell cmake which libraries to link |
---|
501 | target_link_libraries( |
---|
502 | qstopmotion |
---|
503 | ${GPHOTO2_LIBRARIES} |
---|
504 | ${V4L2_LIBRARIES} |
---|
505 | Qt5::Widgets |
---|
506 | ) |
---|
507 | ELSEIF(APPLE) |
---|
508 | # MacOSX |
---|
509 | |
---|
510 | # Create a executable |
---|
511 | add_executable( |
---|
512 | qstopmotion |
---|
513 | MACOSX_BUNDLE |
---|
514 | ${SOURCES} |
---|
515 | ${MOC_SOURCES} |
---|
516 | ) |
---|
517 | |
---|
518 | # tell cmake which libraries to link |
---|
519 | target_link_libraries( |
---|
520 | qstopmotion |
---|
521 | ${GPHOTO2_LIBRARIES} |
---|
522 | ${V4L2_LIBRARIES} |
---|
523 | Qt5::Widgets |
---|
524 | ) |
---|
525 | ELSEIF(WIN32) |
---|
526 | # Windows |
---|
527 | |
---|
528 | # Create a executable |
---|
529 | add_executable( |
---|
530 | qstopmotion |
---|
531 | WIN32 |
---|
532 | src/qstopmotion.rc |
---|
533 | ${SOURCES} |
---|
534 | ${MOC_SOURCES} |
---|
535 | ) |
---|
536 | |
---|
537 | # tell cmake which libraries to link |
---|
538 | target_link_libraries( |
---|
539 | qstopmotion |
---|
540 | ${MEDIAFOUNDATION_LIBRARIES} |
---|
541 | Qt5::WinMain |
---|
542 | Qt5::Widgets |
---|
543 | ) |
---|
544 | ENDIF() |
---|
545 | |
---|
546 | # Use the Qt5 modules |
---|
547 | qt5_use_modules( |
---|
548 | qstopmotion |
---|
549 | Core |
---|
550 | Gui |
---|
551 | Widgets |
---|
552 | Xml |
---|
553 | ) |
---|
554 | |
---|
555 | add_definitions( |
---|
556 | ${QT_DEFINITIONS} |
---|
557 | ) |
---|
558 | |
---|
559 | IF(WIN32) |
---|
560 | file(COPY graphics DESTINATION ".") |
---|
561 | file(COPY manual DESTINATION ".") |
---|
562 | file(COPY translations DESTINATION ".") |
---|
563 | file(COPY ${ICON_FILES} DESTINATION ".") |
---|
564 | file(COPY ${GENERAL_FILES} DESTINATION ".") |
---|
565 | |
---|
566 | IF(CMAKE_CL_64) |
---|
567 | # Windows 64bit |
---|
568 | |
---|
569 | IF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
570 | file(COPY qt5runtime64bit/release/ DESTINATION "qtruntime") |
---|
571 | ELSE(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
572 | file(COPY qt5runtime64bit/debug/ DESTINATION "qtruntime") |
---|
573 | ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
574 | |
---|
575 | file(COPY ffmpeg64bit/ DESTINATION "ffmpeg") |
---|
576 | file(COPY libav64bit/ DESTINATION "libav") |
---|
577 | ELSE(CMAKE_CL_64) |
---|
578 | # Windows 32bit |
---|
579 | |
---|
580 | IF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
581 | file(COPY qt5runtime32bit/release/ DESTINATION "qtruntime") |
---|
582 | ELSE(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
583 | file(COPY qt5runtime32bit/debug/ DESTINATION "qtruntime") |
---|
584 | ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
585 | |
---|
586 | file(COPY ffmpeg32bit/ DESTINATION "ffmpeg") |
---|
587 | file(COPY libav32bit/ DESTINATION "libav") |
---|
588 | ENDIF(CMAKE_CL_64) |
---|
589 | ENDIF(WIN32) |
---|
590 | |
---|
591 | IF(UNIX AND NOT APPLE) |
---|
592 | file(COPY graphics DESTINATION "share/qstopmotion/") |
---|
593 | file(COPY manual/ DESTINATION "share/doc/qstopmotion/") |
---|
594 | file(COPY translations DESTINATION "share/qstopmotion/") |
---|
595 | file(COPY icons DESTINATION "share/qstopmotion/") |
---|
596 | file(COPY ${ICON_FILES} DESTINATION "share/qstopmotion/") |
---|
597 | file(COPY ${GENERAL_FILES} DESTINATION "share/qstopmotion/") |
---|
598 | file(COPY ${UNIX_FILES} DESTINATION "share/qstopmotion/") |
---|
599 | file(COPY ${DEB_FILES} DESTINATION "share/qstopmotion/deb/") |
---|
600 | file(COPY ${RPM_FILES} DESTINATION "share/qstopmotion/rpm/") |
---|
601 | ENDIF(UNIX AND NOT APPLE) |
---|
602 | |
---|
603 | ############################################################################### |
---|
604 | # Installation |
---|
605 | ############################################################################### |
---|
606 | |
---|
607 | IF(WIN32) |
---|
608 | # The predefined windows installer path include the qstopmotion subdirectory |
---|
609 | |
---|
610 | SET(QSTOPMOTION_GENERALS_INSTALL_DIR ".") |
---|
611 | SET(QSTOPMOTION_BIN_INSTALL_DIR "bin") |
---|
612 | SET(QSTOPMOTION_GRAPHICS_INSTALL_DIR "graphics") |
---|
613 | SET(QSTOPMOTION_GRAPHICS_ICONS_INSTALL_DIR "graphics/icons") |
---|
614 | SET(QSTOPMOTION_GRAPHICS_PICTURES_INSTALL_DIR "graphics/pictures") |
---|
615 | SET(QSTOPMOTION_MANUAL_INSTALL_DIR "manual") |
---|
616 | SET(QSTOPMOTION_TRANSLATIONS_INSTALL_DIR "translations") |
---|
617 | SET(QSTOPMOTION_PIXMAP_INSTALL_DIR "pixmaps") |
---|
618 | SET(QSTOPMOTION_ICONS_INSTALL_DIR "icons") |
---|
619 | ENDIF(WIN32) |
---|
620 | |
---|
621 | IF(UNIX AND NOT APPLE) |
---|
622 | # The predefined CMake-Linux installer path is "/usr/local" |
---|
623 | # The predefined RPM installer path is "/usr" |
---|
624 | # The predefined DEB installer path is "/usr" |
---|
625 | |
---|
626 | SET(QSTOPMOTION_GENERALS_INSTALL_DIR "share/qstopmotion") |
---|
627 | SET(QSTOPMOTION_BIN_INSTALL_DIR "bin") |
---|
628 | SET(QSTOPMOTION_GRAPHICS_INSTALL_DIR "share/qstopmotion/graphics") |
---|
629 | SET(QSTOPMOTION_GRAPHICS_ICONS_INSTALL_DIR "share/qstopmotion/graphics/icons") |
---|
630 | SET(QSTOPMOTION_GRAPHICS_PICTURES_INSTALL_DIR "share/qstopmotion/graphics/pictures") |
---|
631 | SET(QSTOPMOTION_TRANSLATIONS_INSTALL_DIR "share/qstopmotion/translations") |
---|
632 | SET(QSTOPMOTION_MANUAL_INSTALL_DIR "share/doc/qstopmotion") |
---|
633 | SET(QSTOPMOTION_DESKTOP_INSTALL_DIR "share/applications") |
---|
634 | SET(QSTOPMOTION_MENUFILE_INSTALL_DIR "share/menu") |
---|
635 | SET(QSTOPMOTION_PIXMAP_INSTALL_DIR "share/pixmaps") |
---|
636 | SET(QSTOPMOTION_ICONS_INSTALL_DIR "share/icons") |
---|
637 | SET(QSTOPMOTION_MAN1_INSTALL_DIR "share/man/man1") |
---|
638 | ENDIF(UNIX AND NOT APPLE) |
---|
639 | |
---|
640 | # installation of the executables |
---|
641 | install( |
---|
642 | TARGETS qstopmotion |
---|
643 | RUNTIME DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
644 | ) |
---|
645 | |
---|
646 | # installation of the content of the grapics directory |
---|
647 | install( |
---|
648 | DIRECTORY graphics/ |
---|
649 | DESTINATION ${QSTOPMOTION_GRAPHICS_INSTALL_DIR} |
---|
650 | ) |
---|
651 | |
---|
652 | # installation of the content of the manual directory |
---|
653 | install( |
---|
654 | DIRECTORY manual/ |
---|
655 | DESTINATION ${QSTOPMOTION_MANUAL_INSTALL_DIR} |
---|
656 | ) |
---|
657 | |
---|
658 | # installation of the content of the translations directory |
---|
659 | install( |
---|
660 | DIRECTORY translations/ |
---|
661 | DESTINATION ${QSTOPMOTION_TRANSLATIONS_INSTALL_DIR} |
---|
662 | ) |
---|
663 | |
---|
664 | # installation only on Windows systems |
---|
665 | IF(WIN32) |
---|
666 | message("Special task for windows package!") |
---|
667 | |
---|
668 | # installation of the general-purpose files |
---|
669 | install( |
---|
670 | FILES ${GENERAL_FILES} |
---|
671 | DESTINATION ${QSTOPMOTION_GENERALS_INSTALL_DIR} |
---|
672 | ) |
---|
673 | ENDIF(WIN32) |
---|
674 | |
---|
675 | # installation only on UNIX systems |
---|
676 | IF(UNIX AND NOT APPLE) |
---|
677 | # installation of the general unix files |
---|
678 | install( |
---|
679 | FILES "linux/qstopmotion.mime" |
---|
680 | DESTINATION ${QSTOPMOTION_GENERALS_INSTALL_DIR} |
---|
681 | ) |
---|
682 | |
---|
683 | # installation of the icons |
---|
684 | install( |
---|
685 | DIRECTORY icons/ |
---|
686 | DESTINATION ${QSTOPMOTION_ICONS_INSTALL_DIR} |
---|
687 | ) |
---|
688 | |
---|
689 | # installation of the .desktop file |
---|
690 | install( |
---|
691 | FILES "linux/qstopmotion.desktop" |
---|
692 | DESTINATION ${QSTOPMOTION_DESKTOP_INSTALL_DIR} |
---|
693 | ) |
---|
694 | |
---|
695 | # installation of the .1.gz file |
---|
696 | install( |
---|
697 | FILES "linux/qstopmotion.1.gz" |
---|
698 | DESTINATION ${QSTOPMOTION_MAN1_INSTALL_DIR} |
---|
699 | ) |
---|
700 | ENDIF(UNIX AND NOT APPLE) |
---|
701 | |
---|
702 | # installation on DEB systems |
---|
703 | IF(CPACK_BINARY_DEB) |
---|
704 | message("Special task for deb package!") |
---|
705 | |
---|
706 | # installation of the icon file |
---|
707 | install( |
---|
708 | FILES "deb/qstopmotion.xpm" |
---|
709 | DESTINATION ${QSTOPMOTION_PIXMAP_INSTALL_DIR} |
---|
710 | ) |
---|
711 | |
---|
712 | # installation of the .menufile file |
---|
713 | install( |
---|
714 | FILES "deb/qstopmotion.menu" |
---|
715 | DESTINATION ${QSTOPMOTION_MENUFILE_INSTALL_DIR} |
---|
716 | ) |
---|
717 | |
---|
718 | # installation of the changelog file |
---|
719 | install( |
---|
720 | FILES "deb/changelog.gz" |
---|
721 | DESTINATION ${QSTOPMOTION_MANUAL_INSTALL_DIR} |
---|
722 | ) |
---|
723 | |
---|
724 | # installation of the copyright file |
---|
725 | install( |
---|
726 | FILES "deb/copyright" |
---|
727 | DESTINATION ${QSTOPMOTION_MANUAL_INSTALL_DIR} |
---|
728 | ) |
---|
729 | ENDIF(CPACK_BINARY_DEB) |
---|
730 | |
---|
731 | # installation on RPM systems |
---|
732 | IF(CPACK_BINARY_RPM) |
---|
733 | message("Special task for rpm package!") |
---|
734 | |
---|
735 | # installation of the general-purpose files |
---|
736 | install( |
---|
737 | FILES ${GENERAL_FILES} |
---|
738 | DESTINATION ${QSTOPMOTION_GENERALS_INSTALL_DIR} |
---|
739 | ) |
---|
740 | |
---|
741 | # installation of the icon file |
---|
742 | install( |
---|
743 | FILES "rpm/qstopmotion.png" |
---|
744 | DESTINATION ${QSTOPMOTION_PIXMAP_INSTALL_DIR} |
---|
745 | ) |
---|
746 | ENDIF(CPACK_BINARY_RPM) |
---|
747 | |
---|
748 | # installation on Windows systems |
---|
749 | IF(WIN32) |
---|
750 | IF(CMAKE_CL_64) |
---|
751 | # Windows 64bit |
---|
752 | |
---|
753 | # installation of Qt runtime |
---|
754 | IF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
755 | install( |
---|
756 | DIRECTORY qt5runtime64bit/release/ |
---|
757 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
758 | ) |
---|
759 | ELSE(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
760 | install( |
---|
761 | DIRECTORY qt5runtime64bit/debug/ |
---|
762 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
763 | ) |
---|
764 | ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
765 | |
---|
766 | # installation of ffmpeg |
---|
767 | install( |
---|
768 | DIRECTORY ffmpeg64bit/ |
---|
769 | DESTINATION "${QSTOPMOTION_GENERALS_INSTALL_DIR}/ffmpeg" |
---|
770 | ) |
---|
771 | |
---|
772 | # installation of libav |
---|
773 | install( |
---|
774 | DIRECTORY libav64bit/ |
---|
775 | DESTINATION "${QSTOPMOTION_GENERALS_INSTALL_DIR}/libav" |
---|
776 | ) |
---|
777 | |
---|
778 | ELSE(CMAKE_CL_64) |
---|
779 | # Windows 32bit |
---|
780 | |
---|
781 | # installation of Qt runtime |
---|
782 | IF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
783 | install( |
---|
784 | DIRECTORY qt5runtime32bit/release/ |
---|
785 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
786 | ) |
---|
787 | ELSE(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
788 | install( |
---|
789 | DIRECTORY qt5runtime32bit/debug/ |
---|
790 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
791 | ) |
---|
792 | ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
793 | |
---|
794 | # installation of ffmpeg |
---|
795 | install( |
---|
796 | DIRECTORY ffmpeg32bit/ |
---|
797 | DESTINATION "${QSTOPMOTION_GENERALS_INSTALL_DIR}/ffmpeg" |
---|
798 | ) |
---|
799 | |
---|
800 | # installation of libav |
---|
801 | install( |
---|
802 | DIRECTORY libav32bit/ |
---|
803 | DESTINATION "${QSTOPMOTION_GENERALS_INSTALL_DIR}/libav" |
---|
804 | ) |
---|
805 | |
---|
806 | ENDIF(CMAKE_CL_64) |
---|
807 | |
---|
808 | ENDIF(WIN32) |
---|
809 | |
---|
810 | ############################################################################### |
---|
811 | ############################################################################### |
---|
812 | # |
---|
813 | # Packaging |
---|
814 | # |
---|
815 | ############################################################################### |
---|
816 | ############################################################################### |
---|
817 | |
---|
818 | ############################################################################### |
---|
819 | # General packaging settings |
---|
820 | ############################################################################### |
---|
821 | |
---|
822 | SET( |
---|
823 | CPACK_PACKAGE_NAME |
---|
824 | "qstopmotion" |
---|
825 | ) |
---|
826 | SET( |
---|
827 | CPACK_PACKAGE_DESCRIPTION_SUMMARY |
---|
828 | "Create stop motion animations" |
---|
829 | ) |
---|
830 | SET( |
---|
831 | CPACK_PACKAGE_VENDOR |
---|
832 | "Ralf Lange, qstopmotion.org" |
---|
833 | ) |
---|
834 | SET( |
---|
835 | CPACK_PACKAGE_CONTACT |
---|
836 | "Ralf Lange <ralf.lange@qstopmotion.org>" |
---|
837 | ) |
---|
838 | SET( |
---|
839 | CPACK_PACKAGE_DESCRIPTION_FILE |
---|
840 | "${CMAKE_CURRENT_SOURCE_DIR}/README.txt" |
---|
841 | ) |
---|
842 | SET( |
---|
843 | CPACK_RESOURCE_FILE_LICENSE |
---|
844 | "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" |
---|
845 | ) |
---|
846 | SET( |
---|
847 | CPACK_PACKAGE_ICON |
---|
848 | "${CMAKE_CURRENT_SOURCE_DIR}\\\\graphics\\\\qstopmotion_logo_installer.bmp" |
---|
849 | ) |
---|
850 | SET( |
---|
851 | CPACK_PACKAGE_INSTALL_DIRECTORY |
---|
852 | "qStopMotion ${QSTOPMOTION_VERSION_MAJOR}.${QSTOPMOTION_VERSION_MINOR}.${QSTOPMOTION_VERSION_PATCH}" |
---|
853 | ) |
---|
854 | SET( |
---|
855 | CPACK_PACKAGE_EXECUTABLES |
---|
856 | "qstopmotion" |
---|
857 | "qStopMotion" |
---|
858 | ) |
---|
859 | SET( |
---|
860 | CPACK_STRIP_FILES |
---|
861 | "qstopmotion" |
---|
862 | ) |
---|
863 | SET( |
---|
864 | CPACK_SOURCE_STRIP_FILES |
---|
865 | "" |
---|
866 | ) |
---|
867 | SET( |
---|
868 | CPACK_PACKAGE_VERSION_MAJOR |
---|
869 | "${QSTOPMOTION_VERSION_MAJOR}" |
---|
870 | ) |
---|
871 | SET( |
---|
872 | CPACK_PACKAGE_VERSION_MINOR |
---|
873 | "${QSTOPMOTION_VERSION_MINOR}" |
---|
874 | ) |
---|
875 | SET( |
---|
876 | CPACK_PACKAGE_VERSION_PATCH |
---|
877 | "${QSTOPMOTION_VERSION_PATCH}" |
---|
878 | ) |
---|
879 | SET( |
---|
880 | CPACK_TOPLEVEL_TAG |
---|
881 | "/user" |
---|
882 | ) |
---|
883 | # CPACK_PACKAGE_VERSION - generated from major, minor, patch |
---|
884 | |
---|
885 | IF(UNIX AND NOT APPLE) |
---|
886 | # Try to find architecture |
---|
887 | execute_process (COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE) |
---|
888 | string (STRIP "${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_ARCHITECTURE) |
---|
889 | # Try to find distro name and distro-specific arch |
---|
890 | execute_process (COMMAND lsb_release -is OUTPUT_VARIABLE LSB_ID) |
---|
891 | execute_process (COMMAND lsb_release -rs OUTPUT_VARIABLE LSB_RELEASE) |
---|
892 | string (STRIP "${LSB_ID}" LSB_ID) |
---|
893 | string (STRIP "${LSB_RELEASE}" LSB_RELEASE) |
---|
894 | SET (LSB_DISTRIB "${LSB_ID}${LSB_RELEASE}") |
---|
895 | IF (NOT LSB_DISTRIB) |
---|
896 | SET( |
---|
897 | LSB_DISTRIB |
---|
898 | "unix" |
---|
899 | ) |
---|
900 | ENDIF (NOT LSB_DISTRIB) |
---|
901 | SET( |
---|
902 | CPACK_SYSTEM_NAME |
---|
903 | "${LSB_DISTRIB}-${CPACK_PACKAGE_ARCHITECTURE}" |
---|
904 | ) |
---|
905 | |
---|
906 | MESSAGE("UNAME Infos =========================================================") |
---|
907 | MESSAGE("UNAME_ARCHITECTURE: ${UNAME_ARCHITECTURE}") |
---|
908 | MESSAGE("UNAME_LINUX_VERSION: ${UNAME_LINUX_VERSION}") |
---|
909 | MESSAGE("LSB Infos ===========================================================") |
---|
910 | MESSAGE("LSB_ID: ${LSB_ID}") |
---|
911 | MESSAGE("LSB_RELEASE: ${LSB_RELEASE}") |
---|
912 | MESSAGE("LSB_DISTRIB: ${LSB_DISTRIB}") |
---|
913 | MESSAGE("Infos ===============================================================") |
---|
914 | MESSAGE("CPACK_SYSTEM_NAME: ${CPACK_SYSTEM_NAME}") |
---|
915 | MESSAGE("CPACK_PACKAGE_ARCHITECTURE: ${CPACK_PACKAGE_ARCHITECTURE}") |
---|
916 | MESSAGE("End Infos ===========================================================") |
---|
917 | |
---|
918 | ENDIF(UNIX AND NOT APPLE) |
---|
919 | |
---|
920 | ############################################################################### |
---|
921 | # Source Packages |
---|
922 | ############################################################################### |
---|
923 | |
---|
924 | IF(WIN32) |
---|
925 | # Exclude: |
---|
926 | # * Mercurial SMC files |
---|
927 | SET( |
---|
928 | CPACK_SOURCE_IGNORE_FILES |
---|
929 | "${CPACK_SOURCE_IGNORE_FILES}" |
---|
930 | "${PROJECT_SOURCE_DIR}/.hg/" |
---|
931 | "${PROJECT_SOURCE_DIR}/.hgignore" |
---|
932 | "${PROJECT_SOURCE_DIR}/.hgtags" |
---|
933 | "${PROJECT_SOURCE_DIR}/.hgtimestamp" |
---|
934 | ) |
---|
935 | ENDIF(WIN32) |
---|
936 | |
---|
937 | IF(UNIX AND NOT APPLE) |
---|
938 | # Exclude: |
---|
939 | # * Mercurial SMC files |
---|
940 | # * ffmpeg Windows binaries |
---|
941 | # * libav Windows binaries |
---|
942 | # * Qt Windows runtime |
---|
943 | SET( |
---|
944 | CPACK_SOURCE_IGNORE_FILES |
---|
945 | "${CPACK_SOURCE_IGNORE_FILES}" |
---|
946 | "${PROJECT_SOURCE_DIR}/.hg/" |
---|
947 | "${PROJECT_SOURCE_DIR}/.hgignore" |
---|
948 | "${PROJECT_SOURCE_DIR}/.hgtags" |
---|
949 | "${PROJECT_SOURCE_DIR}/.hgtimestamp" |
---|
950 | "${PROJECT_SOURCE_DIR}/ffmpeg32bit/" |
---|
951 | "${PROJECT_SOURCE_DIR}/ffmpeg64bit/" |
---|
952 | "${PROJECT_SOURCE_DIR}/libav32bit/" |
---|
953 | "${PROJECT_SOURCE_DIR}/libav64bit/" |
---|
954 | "${PROJECT_SOURCE_DIR}/qt4runtime/" |
---|
955 | "${PROJECT_SOURCE_DIR}/qt5runtime32bit/" |
---|
956 | "${PROJECT_SOURCE_DIR}/qt5runtime64bit/" |
---|
957 | ) |
---|
958 | ENDIF(UNIX AND NOT APPLE) |
---|
959 | |
---|
960 | ############################################################################### |
---|
961 | # NSIS - Windows only |
---|
962 | ############################################################################### |
---|
963 | |
---|
964 | # Installers for 32- vs. 64-bit CMake: |
---|
965 | # - Root install directory (displayed to end user at installer-run time) |
---|
966 | # - "NSIS package/display name" (text used in the installer GUI) |
---|
967 | # - Registry key used to store info about the installation |
---|
968 | IF(CMAKE_CL_64) |
---|
969 | # 64-bit Windows |
---|
970 | SET( |
---|
971 | CPACK_NSIS_INSTALL_ROOT |
---|
972 | "$PROGRAMFILES64" |
---|
973 | ) |
---|
974 | SET( |
---|
975 | CPACK_NSIS_PACKAGE_NAME |
---|
976 | "${CPACK_PACKAGE_INSTALL_DIRECTORY} (Win64)" |
---|
977 | ) |
---|
978 | SET( |
---|
979 | CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
---|
980 | "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)" |
---|
981 | ) |
---|
982 | ELSE(CMAKE_CL_64) |
---|
983 | # 32-bit Windows |
---|
984 | SET( |
---|
985 | CPACK_NSIS_INSTALL_ROOT |
---|
986 | "$PROGRAMFILES" |
---|
987 | ) |
---|
988 | SET( |
---|
989 | CPACK_NSIS_PACKAGE_NAME |
---|
990 | "${CPACK_PACKAGE_INSTALL_DIRECTORY}" |
---|
991 | ) |
---|
992 | SET( |
---|
993 | CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
---|
994 | "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}" |
---|
995 | ) |
---|
996 | ENDIF(CMAKE_CL_64) |
---|
997 | |
---|
998 | MESSAGE("CPACK_NSIS_INSTALL_ROOT: ${CPACK_NSIS_INSTALL_ROOT}") |
---|
999 | MESSAGE("CPACK_NSIS_PACKAGE_NAME: ${CPACK_NSIS_PACKAGE_NAME}") |
---|
1000 | MESSAGE("CPACK_PACKAGE_INSTALL_REGISTRY_KEY: ${CPACK_PACKAGE_INSTALL_REGISTRY_KEY}") |
---|
1001 | |
---|
1002 | # Installing Microsoft run time libraries in the same directory as the executables |
---|
1003 | SET( |
---|
1004 | CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP |
---|
1005 | true |
---|
1006 | ) |
---|
1007 | INCLUDE(InstallRequiredSystemLibraries) |
---|
1008 | INSTALL( |
---|
1009 | PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} |
---|
1010 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
1011 | ) |
---|
1012 | |
---|
1013 | # There is a bug in NSI that does not handle full unix paths properly. Make |
---|
1014 | # sure there is at least one set of four (4) backlasshes. |
---|
1015 | |
---|
1016 | # Set the icons for the installer and the uninstaller |
---|
1017 | SET( |
---|
1018 | CPACK_NSIS_MUI_ICON |
---|
1019 | "${CMAKE_CURRENT_SOURCE_DIR}/graphics/qstopmotion.ico" |
---|
1020 | ) |
---|
1021 | SET( |
---|
1022 | CPACK_NSIS_MUI_UNIICON |
---|
1023 | "${CMAKE_CURRENT_SOURCE_DIR}/graphics/qstopmotion.ico" |
---|
1024 | ) |
---|
1025 | # Set the project name on the first page |
---|
1026 | # Use CPACK_PACKAGE_INSTALL_DIRECTORY |
---|
1027 | # Set the bitmap for the second and following pages |
---|
1028 | # Use CPACK_PACKAGE_ICON |
---|
1029 | # Set the licence text for the second page |
---|
1030 | # Use CPACK_RESOURCE_FILE_LICENSE |
---|
1031 | # Enable modify path environment variable on third page |
---|
1032 | SET( |
---|
1033 | CPACK_NSIS_MODIFY_PATH |
---|
1034 | ON |
---|
1035 | ) |
---|
1036 | # Set the executable name for the desktop icon on third page |
---|
1037 | SET( |
---|
1038 | CPACK_CREATE_DESKTOP_LINKS |
---|
1039 | qstopmotion |
---|
1040 | ) |
---|
1041 | # Create shortcuts in the start menu |
---|
1042 | # Use CPACK_PACKAGE_EXECUTABLES |
---|
1043 | SET(CPACK_NSIS_MENU_LINKS |
---|
1044 | "manual/index.html" "qStopMotion Help" |
---|
1045 | "http://www.qstopmotion.org" "qStopMotion Web Site" |
---|
1046 | ) |
---|
1047 | |
---|
1048 | # SET(CPACK_NSIS_INSTALLED_ICON_NAME "qstopmotion.exe") |
---|
1049 | # SET(CPACK_NSIS_DISPLAY_NAME "qStopMotion") |
---|
1050 | # SET(CPACK_NSIS_PACKAGE_NAME "qStopMotion") |
---|
1051 | # SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.qstopmotion.org") |
---|
1052 | # SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.longsoft.de") |
---|
1053 | SET( |
---|
1054 | CPACK_NSIS_CONTACT |
---|
1055 | ${CPACK_PACKAGE_VENDOR} |
---|
1056 | ) |
---|
1057 | |
---|
1058 | # Run the application on the finish page |
---|
1059 | # SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "qstopmotion.exe" |
---|
1060 | |
---|
1061 | ############################################################################### |
---|
1062 | # DEB package - Linux only (Debian, OpenSuse, Ubuntu, ...) |
---|
1063 | ############################################################################### |
---|
1064 | |
---|
1065 | IF ("${LSB_DISTRIB}" MATCHES "Ubuntu|Debian") |
---|
1066 | # We need to alter the architecture names as per distro rules |
---|
1067 | IF ("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "i[3-6]86") |
---|
1068 | SET( |
---|
1069 | CPACK_PACKAGE_ARCHITECTURE |
---|
1070 | "i386" |
---|
1071 | ) |
---|
1072 | ENDIF ("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "i[3-6]86") |
---|
1073 | IF ("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "x86_64") |
---|
1074 | SET( |
---|
1075 | CPACK_PACKAGE_ARCHITECTURE |
---|
1076 | "amd64" |
---|
1077 | ) |
---|
1078 | ENDIF ("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "x86_64") |
---|
1079 | SET( |
---|
1080 | CPACK_SYSTEM_NAME |
---|
1081 | "${LSB_DISTRIB}-${CPACK_PACKAGE_ARCHITECTURE}" |
---|
1082 | ) |
---|
1083 | |
---|
1084 | # Set the dependencies based on the distro version |
---|
1085 | # thus only one package is build you must list here *any* depending libraries, |
---|
1086 | # even if they are only used in one module |
---|
1087 | IF ("${LSB_DISTRIB}" MATCHES "Ubuntu14.04") |
---|
1088 | SET( |
---|
1089 | CPACK_DEBIAN_PACKAGE_DEPENDS |
---|
1090 | "libc6 (>=2.11), libavbin0 (>=7-1), libqt5core5 (>=5.2.1) | libqt5core5a (>=5.2.1), libqt5gui5 (>=5.2.1), libqt5widgets5 (>=5.2.1), libqt5xml5 (>=5.2.1), libv4l-0 (>=1.0.0), libgphoto2-6 (>=2.5.3), qt5-image-formats-plugins (>=5.2.1)" |
---|
1091 | ) |
---|
1092 | ENDIF ("${LSB_DISTRIB}" MATCHES "Ubuntu14.04") |
---|
1093 | IF ("${LSB_DISTRIB}" MATCHES "Ubuntu16.04") |
---|
1094 | SET( |
---|
1095 | CPACK_DEBIAN_PACKAGE_DEPENDS |
---|
1096 | "libc6 (>=2.11), ffmpeg (>=2.8.6), libqt5core5 (>=5.3.2) | libqt5core5a (>=5.3.2), libqt5gui5 (>=5.3.2), libqt5widgets5 (>=5.3.2), libqt5xml5 (>=5.3.2), libv4l-0 (>=1.0.0), libgphoto2-6 (>=2.5.3), qt5-image-formats-plugins (>=5.3.2)" |
---|
1097 | ) |
---|
1098 | ENDIF ("${LSB_DISTRIB}" MATCHES "Ubuntu16.04") |
---|
1099 | IF ("${LSB_DISTRIB}" MATCHES "Debian7.*") |
---|
1100 | SET( |
---|
1101 | CPACK_DEBIAN_PACKAGE_DEPENDS |
---|
1102 | "libc6 (>=2.11), ffmpeg (>=0.8.9), libqtcore4 (>=4.8.2), libqtgui4 (>=4.8.2), libqt4-xml (>=4.8.2), libv4l-0 (>=0.8.8), libgphoto2-2 (>=2.4.14), libgphoto2-port0 (>=2.4.14)" |
---|
1103 | ) |
---|
1104 | ENDIF ("${LSB_DISTRIB}" MATCHES "Debian7.*") |
---|
1105 | IF ("${LSB_DISTRIB}" MATCHES "Debian8.*") |
---|
1106 | SET( |
---|
1107 | CPACK_DEBIAN_PACKAGE_DEPENDS |
---|
1108 | "libc6 (>=2.11), libav-tools (>=6:11.3), libqt5core5 (>=5.3.2) | libqt5core5a (>=5.3.2), libqt5gui5 (>=5.3.2), libqt5widgets5 (>=5.3.2), libqt5xml5 (>=5.3.2), libv4l-0 (>=1.0.0), libgphoto2-6 (>=2.5.3), qt5-image-formats-plugins (>=5.3.2)" |
---|
1109 | ) |
---|
1110 | ENDIF ("${LSB_DISTRIB}" MATCHES "Debian8.*") |
---|
1111 | IF (NOT CPACK_DEBIAN_PACKAGE_DEPENDS) |
---|
1112 | MESSAGE ("WARNING: ${LSB_DISTRIB} not supported yet.\nPlease set deps in CMakeLists.txt before packaging.") |
---|
1113 | ENDIF (NOT CPACK_DEBIAN_PACKAGE_DEPENDS) |
---|
1114 | ENDIF ("${LSB_DISTRIB}" MATCHES "Ubuntu|Debian") |
---|
1115 | MESSAGE("CPACK_DEBIAN_PACKAGE_DEPENDS: ${CPACK_DEBIAN_PACKAGE_DEPENDS}") |
---|
1116 | |
---|
1117 | # Mandatory |
---|
1118 | # CPACK_DEBIAN_PACKAGE_NAME = CPACK_PACKAGE_NAME |
---|
1119 | MESSAGE("CPACK_DEBIAN_PACKAGE_NAME: ${CPACK_DEBIAN_PACKAGE_NAME}") |
---|
1120 | # CPACK_DEBIAN_PACKAGE_VERSION = CPACK_PACKAGE_VERSION |
---|
1121 | MESSAGE("CPACK_DEBIAN_PACKAGE_VERSION: ${CPACK_DEBIAN_PACKAGE_VERSION}") |
---|
1122 | # CPACK_DEBIAN_PACKAGE_ARCHITECTURE = dpkg output # dpkg --print-architecture ??? |
---|
1123 | MESSAGE("CPACK_DEBIAN_PACKAGE_ARCHITECTURE: ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") |
---|
1124 | # CPACK_DEBIAN_PACKAGE_MAINTAINER = CPACK_PACKAGE_CONTACT |
---|
1125 | MESSAGE("CPACK_DEBIAN_PACKAGE_MAINTAINER: ${CPACK_DEBIAN_PACKAGE_MAINTAINER}") |
---|
1126 | SET( |
---|
1127 | CPACK_DEBIAN_PACKAGE_DESCRIPTION |
---|
1128 | "create stop motion animations\n qStopMotion can be used to create stop motion animations." |
---|
1129 | ) |
---|
1130 | MESSAGE("CPACK_DEBIAN_PACKAGE_DESCRIPTION: ${CPACK_DEBIAN_PACKAGE_DESCRIPTION}") |
---|
1131 | SET( |
---|
1132 | CPACK_DEBIAN_PACKAGE_SECTION |
---|
1133 | "graphics" |
---|
1134 | ) |
---|
1135 | MESSAGE("CPACK_DEBIAN_PACKAGE_SECTION: ${CPACK_DEBIAN_PACKAGE_SECTION}") |
---|
1136 | SET( |
---|
1137 | CPACK_DEBIAN_PACKAGE_PRIORITY |
---|
1138 | "optional" |
---|
1139 | ) |
---|
1140 | MESSAGE("CPACK_DEBIAN_PACKAGE_PRIORITY: ${CPACK_DEBIAN_PACKAGE_PRIORITY}") |
---|
1141 | |
---|
1142 | # Options |
---|
1143 | |
---|
1144 | SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${QSTOPMOTION_HOMEPAGE}) |
---|
1145 | # CPACK_DEBIAN_PACKAGE_SHLIBDEPS |
---|
1146 | # SET(CPACK_DEBIAN_PACKAGE_DEBUG "ON") |
---|
1147 | # CPACK_DEBIAN_PACKAGE_DEBUG |
---|
1148 | # CPACK_DEBIAN_PACKAGE_ENHANCES |
---|
1149 | # CPACK_DEBIAN_PACKAGE_BREAKS |
---|
1150 | # CPACK_DEBIAN_PACKAGE_CONFLICTS |
---|
1151 | # CPACK_DEBIAN_PACKAGE_PROVIDES |
---|
1152 | # CPACK_DEBIAN_PACKAGE_REPLACES |
---|
1153 | SET( |
---|
1154 | CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA |
---|
1155 | "${CMAKE_SOURCE_DIR}/deb/postinst" |
---|
1156 | ) |
---|
1157 | |
---|
1158 | ############################################################################### |
---|
1159 | # RPM package - Linux only (Fedora, Red Hat, CentOS, Mandriva, ...) |
---|
1160 | ############################################################################### |
---|
1161 | |
---|
1162 | # Mandatory |
---|
1163 | SET( |
---|
1164 | CPACK_RPM_PACKAGE_SUMMARY |
---|
1165 | ${CPACK_PACKAGE_DESCRIPTION_SUMMARY} |
---|
1166 | ) |
---|
1167 | MESSAGE("CPACK_RPM_PACKAGE_SUMMARY: ${CPACK_RPM_PACKAGE_SUMMARY}") |
---|
1168 | # CPACK_RPM_PACKAGE_NAME = CPACK_PACKAGE_NAME |
---|
1169 | MESSAGE("CPACK_RPM_PACKAGE_NAME: ${CPACK_RPM_PACKAGE_NAME}") |
---|
1170 | # CPACK_RPM_PACKAGE_VERSION = CPACK_PACKAGE_VERSION |
---|
1171 | MESSAGE("CPACK_RPM_PACKAGE_VERSION: ${CPACK_RPM_PACKAGE_VERSION}") |
---|
1172 | # SET(CPACK_RPM_PACKAGE_RELEASE "1") |
---|
1173 | MESSAGE("CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}") |
---|
1174 | SET( |
---|
1175 | CPACK_RPM_PACKAGE_LICENSE |
---|
1176 | "GPLv2" |
---|
1177 | ) |
---|
1178 | MESSAGE("CPACK_RPM_PACKAGE_LICENSE: ${CPACK_RPM_PACKAGE_LICENSE}") |
---|
1179 | SET( |
---|
1180 | CPACK_RPM_PACKAGE_GROUP |
---|
1181 | "Applications/Multimedia" |
---|
1182 | ) |
---|
1183 | MESSAGE("CPACK_RPM_PACKAGE_GROUP: ${CPACK_RPM_PACKAGE_GROUP}") |
---|
1184 | # CPACK_RPM_PACKAGE_VENDOR = CPACK_PACKAGE_VENDOR |
---|
1185 | MESSAGE("CPACK_RPM_PACKAGE_VENDOR: ${CPACK_RPM_PACKAGE_VENDOR}") |
---|
1186 | # CPACK_RPM_PACKAGE_MAINTAINER = CPACK_PACKAGE_CONTACT |
---|
1187 | MESSAGE("CPACK_RPM_PACKAGE_MAINTAINER: ${CPACK_RPM_PACKAGE_MAINTAINER}") |
---|
1188 | |
---|
1189 | # Options |
---|
1190 | # SET(CPACK_RPM_PACKAGE_ARCHITECTURE "noarch") |
---|
1191 | SET( |
---|
1192 | CPACK_RPM_PACKAGE_URL |
---|
1193 | ${QSTOPMOTION_HOMEPAGE} |
---|
1194 | ) |
---|
1195 | # CPACK_RPM_PACKAGE_DESCRIPTION = CPACK_PACKAGE_DESCRIPTION_FILE |
---|
1196 | # CPACK_RPM_COMPRESSION_TYPE |
---|
1197 | # requireses must be in a aphabetic order |
---|
1198 | # Qt5: qt5-qtbase - Core, Concurrent, DBus, Network, Sql, Test, Xml |
---|
1199 | # Qt5: qt5-qtbase-gui - Gui, OpenGL, PrintSupport, Widgets, XcbQpa |
---|
1200 | # Qt5: qt5-qtimageformats - Qt5 image format plugins |
---|
1201 | # Qt5: qt5-qtmultimedia - Multimedia, MultimediaQuick, MultimediaWidgets |
---|
1202 | SET( |
---|
1203 | CPACK_RPM_PACKAGE_REQUIRES |
---|
1204 | "glibc >= 2.12, libgphoto2 >= 2.4.7, libv4l >= 0.6.3, qt5-qtbase >= 5.2.0, qt5-qtbase-gui >= 5.2.0, qt5-qtimageformats >= 5.2.0" |
---|
1205 | ) |
---|
1206 | MESSAGE("CPACK_RPM_PACKAGE_REQUIRES: ${CPACK_RPM_PACKAGE_REQUIRES}") |
---|
1207 | # CPACK_RPM_PACKAGE_SUGGESTS |
---|
1208 | # CPACK_RPM_PACKAGE_PROVIDES |
---|
1209 | |
---|
1210 | # SET(CPACK_RPM_SPEC_INSTALL_POST "desktop-file-validate /usr/share/applications/qstopmotion.desktop") |
---|
1211 | |
---|
1212 | # SET(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "pre_install.sh") |
---|
1213 | # SET(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "post_install.sh") |
---|
1214 | # SET(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "pre_install.sh") |
---|
1215 | # SET(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "post_install.sh") |
---|
1216 | |
---|
1217 | # Prevent conflicts with the filesystem package |
---|
1218 | SET( |
---|
1219 | CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION |
---|
1220 | "/usr/bin" |
---|
1221 | "/usr/share/applications" |
---|
1222 | "/usr/share/icons" |
---|
1223 | "/usr/share/pixmaps" |
---|
1224 | "/usr/share/man" |
---|
1225 | "/usr/share/man/man1" |
---|
1226 | ) |
---|
1227 | |
---|
1228 | ############################################################################### |
---|
1229 | # Activate packaging functionality |
---|
1230 | ############################################################################### |
---|
1231 | |
---|
1232 | INCLUDE(CPack) |
---|
1233 | |
---|
1234 | ############################################################################### |
---|
1235 | # "this is the end" |
---|
1236 | ############################################################################### |
---|