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 | ############################################################################### |
---|
368 | # gPhoto2 support |
---|
369 | # |
---|
370 | # (Only UNIX) |
---|
371 | # |
---|
372 | # used libraries: libgphoto2 |
---|
373 | ############################################################################### |
---|
374 | |
---|
375 | IF(UNIX AND NOT APPLE) |
---|
376 | find_package(PkgConfig) |
---|
377 | pkg_check_modules(GPHOTO2 REQUIRED libgphoto2) |
---|
378 | message("GPHOTO2_INCLUDE_DIR: ${GPHOTO2_INCLUDE_DIR}") |
---|
379 | message("GPHOTO2_LIBRARIES: ${GPHOTO2_LIBRARIES}") |
---|
380 | ELSE(UNIX AND NOT APPLE) |
---|
381 | SET(GPHOTO2_INCLUDE_DIR) |
---|
382 | SET(GPHOTO2_LIBRARIES) |
---|
383 | ENDIF(UNIX AND NOT APPLE) |
---|
384 | |
---|
385 | ############################################################################### |
---|
386 | # Video4Linux2 support |
---|
387 | # |
---|
388 | # (Only UNIX) |
---|
389 | # |
---|
390 | # used libraries: libv4l2 |
---|
391 | ############################################################################### |
---|
392 | |
---|
393 | IF(UNIX AND NOT APPLE) |
---|
394 | include(${CMAKE_SOURCE_DIR}/cmake/FindV4L2PkgConfig.cmake) |
---|
395 | message("V4L2_INCLUDE_DIRS: ${V4L2_INCLUDE_DIRS}") |
---|
396 | message("V4L2_LIBRARIES: ${V4L2_LIBRARIES}") |
---|
397 | ELSE(UNIX AND NOT APPLE) |
---|
398 | SET(V4L2_INCLUDE_DIRS) |
---|
399 | SET(V4L2_LIBRARIES) |
---|
400 | ENDIF(UNIX AND NOT APPLE) |
---|
401 | |
---|
402 | ############################################################################### |
---|
403 | # Microsoft Media Foundation support |
---|
404 | # |
---|
405 | # (Only Windows form Windows Vista and newer) |
---|
406 | # |
---|
407 | # used libraries: evr.lib, mf.lib, mfplat.lib |
---|
408 | ############################################################################### |
---|
409 | |
---|
410 | IF(WIN32) |
---|
411 | SET( |
---|
412 | MEDIAFOUNDATION_LIBRARIES |
---|
413 | evr.lib # ??? |
---|
414 | mf.lib # ??? |
---|
415 | mfplat.lib # ??? |
---|
416 | mfuuid.lib # ??? |
---|
417 | mfreadwrite.lib # Read and write media stream |
---|
418 | # strmiids.lib # Old Direct Show library |
---|
419 | ) |
---|
420 | ELSE(WIN32) |
---|
421 | SET(MEDIAFOUNDATION_LIBRARIES) |
---|
422 | ENDIF(WIN32) |
---|
423 | |
---|
424 | ############################################################################### |
---|
425 | # Directory definitions |
---|
426 | ############################################################################### |
---|
427 | |
---|
428 | # tell cmake where to search for headers: |
---|
429 | include_directories( |
---|
430 | ${CMAKE_SOURCE_DIR}/src |
---|
431 | ${GPHOTO2_INCLUDE_DIR} |
---|
432 | ${V4L2_INCLUDE_DIRS} |
---|
433 | ) |
---|
434 | |
---|
435 | ############################################################################### |
---|
436 | # Additional definitions |
---|
437 | ############################################################################### |
---|
438 | |
---|
439 | ############################################################################### |
---|
440 | # |
---|
441 | # CONFIG += debug |
---|
442 | # CONFIG += release warn_off |
---|
443 | # DEFINES += NO_DEBUG |
---|
444 | # TEMPLATE = app |
---|
445 | # |
---|
446 | ############################################################################### |
---|
447 | |
---|
448 | IF(WIN32) |
---|
449 | add_definitions(-DUNICODE -D_UNICODE) |
---|
450 | ENDIF(WIN32) |
---|
451 | |
---|
452 | ############################################################################### |
---|
453 | # Create binaries |
---|
454 | ############################################################################### |
---|
455 | |
---|
456 | # Set the output directory for the executable - old variable (CMake <= 2.8.0) |
---|
457 | SET(EXECUTABLE_OUTPUT_PATH |
---|
458 | ${PROJECT_BINARY_DIR}/bin |
---|
459 | CACHE PATH |
---|
460 | "Single directory for all executables" |
---|
461 | ) |
---|
462 | |
---|
463 | # Set the output directory for the executable - new variable (CMake > 2.8.0) |
---|
464 | SET(RUNTIME_OUTPUT_DIRECTORY |
---|
465 | ${PROJECT_BINARY_DIR}/bin |
---|
466 | CACHE PATH |
---|
467 | "Single directory for all executables" |
---|
468 | ) |
---|
469 | |
---|
470 | MARK_AS_ADVANCED( |
---|
471 | EXECUTABLE_OUTPUT_PATH |
---|
472 | RUNTIME_OUTPUT_DIRECTORY |
---|
473 | ) |
---|
474 | |
---|
475 | IF(UNIX AND NOT APPLE) |
---|
476 | # Linux |
---|
477 | |
---|
478 | # Create a executable |
---|
479 | add_executable( |
---|
480 | qstopmotion |
---|
481 | ${SOURCES} |
---|
482 | ${MOC_SOURCES} |
---|
483 | ) |
---|
484 | |
---|
485 | # tell cmake which libraries to link |
---|
486 | target_link_libraries( |
---|
487 | qstopmotion |
---|
488 | ${GPHOTO2_LIBRARIES} |
---|
489 | ${V4L2_LIBRARIES} |
---|
490 | Qt5::Widgets |
---|
491 | ) |
---|
492 | ELSEIF(APPLE) |
---|
493 | # MacOSX |
---|
494 | |
---|
495 | # Create a executable |
---|
496 | add_executable( |
---|
497 | qstopmotion |
---|
498 | MACOSX_BUNDLE |
---|
499 | ${SOURCES} |
---|
500 | ${MOC_SOURCES} |
---|
501 | ) |
---|
502 | |
---|
503 | # tell cmake which libraries to link |
---|
504 | target_link_libraries( |
---|
505 | qstopmotion |
---|
506 | ${GPHOTO2_LIBRARIES} |
---|
507 | ${V4L2_LIBRARIES} |
---|
508 | Qt5::Widgets |
---|
509 | ) |
---|
510 | ELSEIF(WIN32) |
---|
511 | # Windows |
---|
512 | |
---|
513 | # Create a executable |
---|
514 | add_executable( |
---|
515 | qstopmotion |
---|
516 | WIN32 |
---|
517 | src/qstopmotion.rc |
---|
518 | ${SOURCES} |
---|
519 | ${MOC_SOURCES} |
---|
520 | ) |
---|
521 | |
---|
522 | # tell cmake which libraries to link |
---|
523 | target_link_libraries( |
---|
524 | qstopmotion |
---|
525 | ${MEDIAFOUNDATION_LIBRARIES} |
---|
526 | Qt5::WinMain |
---|
527 | Qt5::Widgets |
---|
528 | ) |
---|
529 | ENDIF() |
---|
530 | |
---|
531 | # Use the Qt5 modules |
---|
532 | qt5_use_modules( |
---|
533 | qstopmotion |
---|
534 | Core |
---|
535 | Gui |
---|
536 | Widgets |
---|
537 | Xml |
---|
538 | ) |
---|
539 | |
---|
540 | add_definitions( |
---|
541 | ${QT_DEFINITIONS} |
---|
542 | ) |
---|
543 | |
---|
544 | IF(WIN32) |
---|
545 | file(COPY graphics DESTINATION ".") |
---|
546 | file(COPY manual DESTINATION ".") |
---|
547 | file(COPY translations DESTINATION ".") |
---|
548 | file(COPY ${ICON_FILES} DESTINATION ".") |
---|
549 | file(COPY ${GENERAL_FILES} DESTINATION ".") |
---|
550 | |
---|
551 | IF(CMAKE_CL_64) |
---|
552 | # Windows 64bit |
---|
553 | |
---|
554 | IF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
555 | file(COPY qt5runtime64bit/release/ DESTINATION "qtruntime") |
---|
556 | ELSE(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
557 | file(COPY qt5runtime64bit/debug/ DESTINATION "qtruntime") |
---|
558 | ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
559 | |
---|
560 | file(COPY ffmpeg64bit/ DESTINATION "ffmpeg") |
---|
561 | file(COPY libav64bit/ DESTINATION "libav") |
---|
562 | ELSE(CMAKE_CL_64) |
---|
563 | # Windows 32bit |
---|
564 | |
---|
565 | IF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
566 | file(COPY qt5runtime32bit/release/ DESTINATION "qtruntime") |
---|
567 | ELSE(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
568 | file(COPY qt5runtime32bit/debug/ DESTINATION "qtruntime") |
---|
569 | ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
570 | |
---|
571 | file(COPY ffmpeg32bit/ DESTINATION "ffmpeg") |
---|
572 | file(COPY libav32bit/ DESTINATION "libav") |
---|
573 | ENDIF(CMAKE_CL_64) |
---|
574 | ENDIF(WIN32) |
---|
575 | |
---|
576 | IF(UNIX AND NOT APPLE) |
---|
577 | file(COPY graphics DESTINATION "share/qstopmotion/") |
---|
578 | file(COPY manual/ DESTINATION "share/doc/qstopmotion/") |
---|
579 | file(COPY translations DESTINATION "share/qstopmotion/") |
---|
580 | file(COPY icons DESTINATION "share/qstopmotion/") |
---|
581 | file(COPY ${ICON_FILES} DESTINATION "share/qstopmotion/") |
---|
582 | file(COPY ${GENERAL_FILES} DESTINATION "share/qstopmotion/") |
---|
583 | file(COPY ${UNIX_FILES} DESTINATION "share/qstopmotion/") |
---|
584 | ENDIF(UNIX AND NOT APPLE) |
---|
585 | |
---|
586 | ############################################################################### |
---|
587 | # Installation |
---|
588 | ############################################################################### |
---|
589 | |
---|
590 | IF(WIN32) |
---|
591 | # The predefined windows installer path include the qstopmotion subdirectory |
---|
592 | |
---|
593 | SET(QSTOPMOTION_GENERALS_INSTALL_DIR ".") |
---|
594 | SET(QSTOPMOTION_BIN_INSTALL_DIR "bin") |
---|
595 | SET(QSTOPMOTION_GRAPHICS_INSTALL_DIR "graphics") |
---|
596 | SET(QSTOPMOTION_GRAPHICS_ICONS_INSTALL_DIR "graphics/icons") |
---|
597 | SET(QSTOPMOTION_GRAPHICS_PICTURES_INSTALL_DIR "graphics/pictures") |
---|
598 | SET(QSTOPMOTION_MANUAL_INSTALL_DIR "manual") |
---|
599 | SET(QSTOPMOTION_TRANSLATIONS_INSTALL_DIR "translations") |
---|
600 | SET(QSTOPMOTION_PIXMAP_INSTALL_DIR "pixmaps") |
---|
601 | SET(QSTOPMOTION_ICONS_INSTALL_DIR "icons") |
---|
602 | ENDIF(WIN32) |
---|
603 | |
---|
604 | IF(UNIX AND NOT APPLE) |
---|
605 | # The predefined CMake-Linux installer path is "/usr/local" |
---|
606 | # The predefined RPM installer path is "/usr" |
---|
607 | # The predefined DEB installer path is "/usr" |
---|
608 | |
---|
609 | SET(QSTOPMOTION_GENERALS_INSTALL_DIR "share/qstopmotion") |
---|
610 | SET(QSTOPMOTION_BIN_INSTALL_DIR "bin") |
---|
611 | SET(QSTOPMOTION_GRAPHICS_INSTALL_DIR "share/qstopmotion/graphics") |
---|
612 | SET(QSTOPMOTION_GRAPHICS_ICONS_INSTALL_DIR "share/qstopmotion/graphics/icons") |
---|
613 | SET(QSTOPMOTION_GRAPHICS_PICTURES_INSTALL_DIR "share/qstopmotion/graphics/pictures") |
---|
614 | SET(QSTOPMOTION_TRANSLATIONS_INSTALL_DIR "share/qstopmotion/translations") |
---|
615 | SET(QSTOPMOTION_MANUAL_INSTALL_DIR "share/doc/qstopmotion") |
---|
616 | SET(QSTOPMOTION_DESKTOP_INSTALL_DIR "share/applications") |
---|
617 | SET(QSTOPMOTION_MENUFILE_INSTALL_DIR "share/menu") |
---|
618 | SET(QSTOPMOTION_PIXMAP_INSTALL_DIR "share/pixmaps") |
---|
619 | SET(QSTOPMOTION_ICONS_INSTALL_DIR "share/icons") |
---|
620 | SET(QSTOPMOTION_MAN1_INSTALL_DIR "share/man/man1") |
---|
621 | ENDIF(UNIX AND NOT APPLE) |
---|
622 | |
---|
623 | # installation of the executables |
---|
624 | install( |
---|
625 | TARGETS qstopmotion |
---|
626 | RUNTIME DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
627 | ) |
---|
628 | |
---|
629 | # installation of the content of the grapics directory |
---|
630 | install( |
---|
631 | DIRECTORY graphics/ |
---|
632 | DESTINATION ${QSTOPMOTION_GRAPHICS_INSTALL_DIR} |
---|
633 | ) |
---|
634 | |
---|
635 | # installation of the content of the manual directory |
---|
636 | install( |
---|
637 | DIRECTORY manual/ |
---|
638 | DESTINATION ${QSTOPMOTION_MANUAL_INSTALL_DIR} |
---|
639 | ) |
---|
640 | |
---|
641 | # installation of the content of the translations directory |
---|
642 | install( |
---|
643 | DIRECTORY translations/ |
---|
644 | DESTINATION ${QSTOPMOTION_TRANSLATIONS_INSTALL_DIR} |
---|
645 | ) |
---|
646 | |
---|
647 | # installation only on Windows systems |
---|
648 | IF(WIN32) |
---|
649 | message("Special task for windows package!") |
---|
650 | |
---|
651 | # installation of the general-purpose files |
---|
652 | install( |
---|
653 | FILES ${GENERAL_FILES} |
---|
654 | DESTINATION ${QSTOPMOTION_GENERALS_INSTALL_DIR} |
---|
655 | ) |
---|
656 | ENDIF(WIN32) |
---|
657 | |
---|
658 | # installation only on UNIX systems |
---|
659 | IF(UNIX AND NOT APPLE) |
---|
660 | # installation of the general unix files |
---|
661 | install( |
---|
662 | FILES "linux/qstopmotion.mime" |
---|
663 | DESTINATION ${QSTOPMOTION_GENERALS_INSTALL_DIR} |
---|
664 | ) |
---|
665 | |
---|
666 | # installation of the icons |
---|
667 | install( |
---|
668 | DIRECTORY icons/ |
---|
669 | DESTINATION ${QSTOPMOTION_ICONS_INSTALL_DIR} |
---|
670 | ) |
---|
671 | |
---|
672 | # installation of the .desktop file |
---|
673 | install( |
---|
674 | FILES "linux/qstopmotion.desktop" |
---|
675 | DESTINATION ${QSTOPMOTION_DESKTOP_INSTALL_DIR} |
---|
676 | ) |
---|
677 | |
---|
678 | # installation of the .1.gz file |
---|
679 | install( |
---|
680 | FILES "linux/qstopmotion.1.gz" |
---|
681 | DESTINATION ${QSTOPMOTION_MAN1_INSTALL_DIR} |
---|
682 | ) |
---|
683 | ENDIF(UNIX AND NOT APPLE) |
---|
684 | |
---|
685 | # installation on Windows systems |
---|
686 | IF(WIN32) |
---|
687 | IF(CMAKE_CL_64) |
---|
688 | # Windows 64bit |
---|
689 | |
---|
690 | # installation of Qt runtime |
---|
691 | IF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
692 | install( |
---|
693 | DIRECTORY qt5runtime64bit/release/ |
---|
694 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
695 | ) |
---|
696 | ELSE(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
697 | install( |
---|
698 | DIRECTORY qt5runtime64bit/debug/ |
---|
699 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
700 | ) |
---|
701 | ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
702 | |
---|
703 | # installation of ffmpeg |
---|
704 | install( |
---|
705 | DIRECTORY ffmpeg64bit/ |
---|
706 | DESTINATION "${QSTOPMOTION_GENERALS_INSTALL_DIR}/ffmpeg" |
---|
707 | ) |
---|
708 | |
---|
709 | # installation of libav |
---|
710 | install( |
---|
711 | DIRECTORY libav64bit/ |
---|
712 | DESTINATION "${QSTOPMOTION_GENERALS_INSTALL_DIR}/libav" |
---|
713 | ) |
---|
714 | |
---|
715 | ELSE(CMAKE_CL_64) |
---|
716 | # Windows 32bit |
---|
717 | |
---|
718 | # installation of Qt runtime |
---|
719 | IF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
720 | install( |
---|
721 | DIRECTORY qt5runtime32bit/release/ |
---|
722 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
723 | ) |
---|
724 | ELSE(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
725 | install( |
---|
726 | DIRECTORY qt5runtime32bit/debug/ |
---|
727 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
728 | ) |
---|
729 | ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release") |
---|
730 | |
---|
731 | # installation of ffmpeg |
---|
732 | install( |
---|
733 | DIRECTORY ffmpeg32bit/ |
---|
734 | DESTINATION "${QSTOPMOTION_GENERALS_INSTALL_DIR}/ffmpeg" |
---|
735 | ) |
---|
736 | |
---|
737 | # installation of libav |
---|
738 | install( |
---|
739 | DIRECTORY libav32bit/ |
---|
740 | DESTINATION "${QSTOPMOTION_GENERALS_INSTALL_DIR}/libav" |
---|
741 | ) |
---|
742 | |
---|
743 | ENDIF(CMAKE_CL_64) |
---|
744 | |
---|
745 | ENDIF(WIN32) |
---|
746 | |
---|
747 | ############################################################################### |
---|
748 | ############################################################################### |
---|
749 | # |
---|
750 | # Packaging |
---|
751 | # |
---|
752 | ############################################################################### |
---|
753 | ############################################################################### |
---|
754 | |
---|
755 | ############################################################################### |
---|
756 | # General packaging settings |
---|
757 | ############################################################################### |
---|
758 | |
---|
759 | SET( |
---|
760 | CPACK_PACKAGE_NAME |
---|
761 | "qstopmotion" |
---|
762 | ) |
---|
763 | SET( |
---|
764 | CPACK_PACKAGE_DESCRIPTION_SUMMARY |
---|
765 | "Create stop motion animations" |
---|
766 | ) |
---|
767 | SET( |
---|
768 | CPACK_PACKAGE_VENDOR |
---|
769 | "Ralf Lange, qstopmotion.org" |
---|
770 | ) |
---|
771 | SET( |
---|
772 | CPACK_PACKAGE_CONTACT |
---|
773 | "Ralf Lange <ralf.lange@qstopmotion.org>" |
---|
774 | ) |
---|
775 | SET( |
---|
776 | CPACK_PACKAGE_DESCRIPTION_FILE |
---|
777 | "${CMAKE_CURRENT_SOURCE_DIR}/README.txt" |
---|
778 | ) |
---|
779 | SET( |
---|
780 | CPACK_RESOURCE_FILE_LICENSE |
---|
781 | "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" |
---|
782 | ) |
---|
783 | SET( |
---|
784 | CPACK_PACKAGE_ICON |
---|
785 | "${CMAKE_CURRENT_SOURCE_DIR}\\\\graphics\\\\qstopmotion_logo_installer.bmp" |
---|
786 | ) |
---|
787 | SET( |
---|
788 | CPACK_PACKAGE_INSTALL_DIRECTORY |
---|
789 | "qStopMotion ${QSTOPMOTION_VERSION_MAJOR}.${QSTOPMOTION_VERSION_MINOR}.${QSTOPMOTION_VERSION_PATCH}" |
---|
790 | ) |
---|
791 | SET( |
---|
792 | CPACK_PACKAGE_EXECUTABLES |
---|
793 | "qstopmotion" |
---|
794 | "qStopMotion" |
---|
795 | ) |
---|
796 | SET( |
---|
797 | CPACK_STRIP_FILES |
---|
798 | "qstopmotion" |
---|
799 | ) |
---|
800 | SET( |
---|
801 | CPACK_SOURCE_STRIP_FILES |
---|
802 | "" |
---|
803 | ) |
---|
804 | SET( |
---|
805 | CPACK_PACKAGE_VERSION_MAJOR |
---|
806 | "${QSTOPMOTION_VERSION_MAJOR}" |
---|
807 | ) |
---|
808 | SET( |
---|
809 | CPACK_PACKAGE_VERSION_MINOR |
---|
810 | "${QSTOPMOTION_VERSION_MINOR}" |
---|
811 | ) |
---|
812 | SET( |
---|
813 | CPACK_PACKAGE_VERSION_PATCH |
---|
814 | "${QSTOPMOTION_VERSION_PATCH}" |
---|
815 | ) |
---|
816 | SET( |
---|
817 | CPACK_TOPLEVEL_TAG |
---|
818 | "/user" |
---|
819 | ) |
---|
820 | # CPACK_PACKAGE_VERSION - generated from major, minor, patch |
---|
821 | |
---|
822 | IF(UNIX AND NOT APPLE) |
---|
823 | # Try to find architecture |
---|
824 | execute_process (COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE) |
---|
825 | string (STRIP "${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_ARCHITECTURE) |
---|
826 | # Try to find distro name and distro-specific arch |
---|
827 | execute_process (COMMAND lsb_release -is OUTPUT_VARIABLE LSB_ID) |
---|
828 | execute_process (COMMAND lsb_release -rs OUTPUT_VARIABLE LSB_RELEASE) |
---|
829 | string (STRIP "${LSB_ID}" LSB_ID) |
---|
830 | string (STRIP "${LSB_RELEASE}" LSB_RELEASE) |
---|
831 | SET (LSB_DISTRIB "${LSB_ID}${LSB_RELEASE}") |
---|
832 | IF (NOT LSB_DISTRIB) |
---|
833 | SET( |
---|
834 | LSB_DISTRIB |
---|
835 | "unix" |
---|
836 | ) |
---|
837 | ENDIF (NOT LSB_DISTRIB) |
---|
838 | SET( |
---|
839 | CPACK_SYSTEM_NAME |
---|
840 | "${LSB_DISTRIB}-${CPACK_PACKAGE_ARCHITECTURE}" |
---|
841 | ) |
---|
842 | |
---|
843 | MESSAGE("UNAME Infos =========================================================") |
---|
844 | MESSAGE("UNAME_ARCHITECTURE: ${UNAME_ARCHITECTURE}") |
---|
845 | MESSAGE("UNAME_LINUX_VERSION: ${UNAME_LINUX_VERSION}") |
---|
846 | MESSAGE("LSB Infos ===========================================================") |
---|
847 | MESSAGE("LSB_ID: ${LSB_ID}") |
---|
848 | MESSAGE("LSB_RELEASE: ${LSB_RELEASE}") |
---|
849 | MESSAGE("LSB_DISTRIB: ${LSB_DISTRIB}") |
---|
850 | MESSAGE("Infos ===============================================================") |
---|
851 | MESSAGE("CPACK_SYSTEM_NAME: ${CPACK_SYSTEM_NAME}") |
---|
852 | MESSAGE("CPACK_PACKAGE_ARCHITECTURE: ${CPACK_PACKAGE_ARCHITECTURE}") |
---|
853 | MESSAGE("End Infos ===========================================================") |
---|
854 | |
---|
855 | ENDIF(UNIX AND NOT APPLE) |
---|
856 | |
---|
857 | ############################################################################### |
---|
858 | # Source Packages |
---|
859 | ############################################################################### |
---|
860 | |
---|
861 | IF(WIN32) |
---|
862 | # Exclude: |
---|
863 | # * Mercurial SMC files |
---|
864 | SET( |
---|
865 | CPACK_SOURCE_IGNORE_FILES |
---|
866 | "${CPACK_SOURCE_IGNORE_FILES}" |
---|
867 | "${PROJECT_SOURCE_DIR}/.hg/" |
---|
868 | "${PROJECT_SOURCE_DIR}/.hgignore" |
---|
869 | "${PROJECT_SOURCE_DIR}/.hgtags" |
---|
870 | "${PROJECT_SOURCE_DIR}/.hgtimestamp" |
---|
871 | ) |
---|
872 | ENDIF(WIN32) |
---|
873 | |
---|
874 | IF(UNIX AND NOT APPLE) |
---|
875 | # Exclude: |
---|
876 | # * Mercurial SMC files |
---|
877 | # * ffmpeg Windows binaries |
---|
878 | # * libav Windows binaries |
---|
879 | # * Qt Windows runtime |
---|
880 | SET( |
---|
881 | CPACK_SOURCE_IGNORE_FILES |
---|
882 | "${CPACK_SOURCE_IGNORE_FILES}" |
---|
883 | "${PROJECT_SOURCE_DIR}/.hg/" |
---|
884 | "${PROJECT_SOURCE_DIR}/.hgignore" |
---|
885 | "${PROJECT_SOURCE_DIR}/.hgtags" |
---|
886 | "${PROJECT_SOURCE_DIR}/.hgtimestamp" |
---|
887 | "${PROJECT_SOURCE_DIR}/ffmpeg32bit/" |
---|
888 | "${PROJECT_SOURCE_DIR}/ffmpeg64bit/" |
---|
889 | "${PROJECT_SOURCE_DIR}/libav32bit/" |
---|
890 | "${PROJECT_SOURCE_DIR}/libav64bit/" |
---|
891 | "${PROJECT_SOURCE_DIR}/qt4runtime/" |
---|
892 | "${PROJECT_SOURCE_DIR}/qt5runtime32bit/" |
---|
893 | "${PROJECT_SOURCE_DIR}/qt5runtime64bit/" |
---|
894 | ) |
---|
895 | ENDIF(UNIX AND NOT APPLE) |
---|
896 | |
---|
897 | ############################################################################### |
---|
898 | # NSIS - Windows only |
---|
899 | ############################################################################### |
---|
900 | |
---|
901 | # Installers for 32- vs. 64-bit CMake: |
---|
902 | # - Root install directory (displayed to end user at installer-run time) |
---|
903 | # - "NSIS package/display name" (text used in the installer GUI) |
---|
904 | # - Registry key used to store info about the installation |
---|
905 | IF(CMAKE_CL_64) |
---|
906 | # 64-bit Windows |
---|
907 | SET( |
---|
908 | CPACK_NSIS_INSTALL_ROOT |
---|
909 | "$PROGRAMFILES64" |
---|
910 | ) |
---|
911 | SET( |
---|
912 | CPACK_NSIS_PACKAGE_NAME |
---|
913 | "${CPACK_PACKAGE_INSTALL_DIRECTORY} (Win64)" |
---|
914 | ) |
---|
915 | SET( |
---|
916 | CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
---|
917 | "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)" |
---|
918 | ) |
---|
919 | ELSE(CMAKE_CL_64) |
---|
920 | # 32-bit Windows |
---|
921 | SET( |
---|
922 | CPACK_NSIS_INSTALL_ROOT |
---|
923 | "$PROGRAMFILES" |
---|
924 | ) |
---|
925 | SET( |
---|
926 | CPACK_NSIS_PACKAGE_NAME |
---|
927 | "${CPACK_PACKAGE_INSTALL_DIRECTORY}" |
---|
928 | ) |
---|
929 | SET( |
---|
930 | CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
---|
931 | "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}" |
---|
932 | ) |
---|
933 | ENDIF(CMAKE_CL_64) |
---|
934 | |
---|
935 | MESSAGE("CPACK_NSIS_INSTALL_ROOT: ${CPACK_NSIS_INSTALL_ROOT}") |
---|
936 | MESSAGE("CPACK_NSIS_PACKAGE_NAME: ${CPACK_NSIS_PACKAGE_NAME}") |
---|
937 | MESSAGE("CPACK_PACKAGE_INSTALL_REGISTRY_KEY: ${CPACK_PACKAGE_INSTALL_REGISTRY_KEY}") |
---|
938 | |
---|
939 | # Installing Microsoft run time libraries in the same directory as the executables |
---|
940 | SET( |
---|
941 | CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP |
---|
942 | true |
---|
943 | ) |
---|
944 | INCLUDE(InstallRequiredSystemLibraries) |
---|
945 | INSTALL( |
---|
946 | PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} |
---|
947 | DESTINATION ${QSTOPMOTION_BIN_INSTALL_DIR} |
---|
948 | ) |
---|
949 | |
---|
950 | # There is a bug in NSI that does not handle full unix paths properly. Make |
---|
951 | # sure there is at least one set of four (4) backlasshes. |
---|
952 | |
---|
953 | # Set the icons for the installer and the uninstaller |
---|
954 | SET( |
---|
955 | CPACK_NSIS_MUI_ICON |
---|
956 | "${CMAKE_CURRENT_SOURCE_DIR}/graphics/qstopmotion.ico" |
---|
957 | ) |
---|
958 | SET( |
---|
959 | CPACK_NSIS_MUI_UNIICON |
---|
960 | "${CMAKE_CURRENT_SOURCE_DIR}/graphics/qstopmotion.ico" |
---|
961 | ) |
---|
962 | # Set the project name on the first page |
---|
963 | # Use CPACK_PACKAGE_INSTALL_DIRECTORY |
---|
964 | # Set the bitmap for the second and following pages |
---|
965 | # Use CPACK_PACKAGE_ICON |
---|
966 | # Set the licence text for the second page |
---|
967 | # Use CPACK_RESOURCE_FILE_LICENSE |
---|
968 | # Enable modify path environment variable on third page |
---|
969 | SET( |
---|
970 | CPACK_NSIS_MODIFY_PATH |
---|
971 | ON |
---|
972 | ) |
---|
973 | # Set the executable name for the desktop icon on third page |
---|
974 | SET( |
---|
975 | CPACK_CREATE_DESKTOP_LINKS |
---|
976 | qstopmotion |
---|
977 | ) |
---|
978 | # Create shortcuts in the start menu |
---|
979 | # Use CPACK_PACKAGE_EXECUTABLES |
---|
980 | SET(CPACK_NSIS_MENU_LINKS |
---|
981 | "manual/index.html" "qStopMotion Help" |
---|
982 | "http://www.qstopmotion.org" "qStopMotion Web Site" |
---|
983 | ) |
---|
984 | |
---|
985 | # SET(CPACK_NSIS_INSTALLED_ICON_NAME "qstopmotion.exe") |
---|
986 | # SET(CPACK_NSIS_DISPLAY_NAME "qStopMotion") |
---|
987 | # SET(CPACK_NSIS_PACKAGE_NAME "qStopMotion") |
---|
988 | # SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.qstopmotion.org") |
---|
989 | # SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.longsoft.de") |
---|
990 | SET( |
---|
991 | CPACK_NSIS_CONTACT |
---|
992 | ${CPACK_PACKAGE_VENDOR} |
---|
993 | ) |
---|
994 | |
---|
995 | # Run the application on the finish page |
---|
996 | # SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "qstopmotion.exe" |
---|
997 | |
---|
998 | |
---|
999 | ############################################################################### |
---|
1000 | # Activate packaging functionality |
---|
1001 | ############################################################################### |
---|
1002 | |
---|
1003 | INCLUDE(CPack) |
---|
1004 | |
---|
1005 | ############################################################################### |
---|
1006 | # "this is the end" |
---|
1007 | ############################################################################### |
---|