-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
149 lines (130 loc) · 4.93 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
cmake_minimum_required (VERSION 2.6)
# set project's name
set (PROJECT easypaint)
message(STATUS "System: " ${CMAKE_HOST_SYSTEM_NAME} " " ${CMAKE_HOST_SYSTEM_VERSION})
message(STATUS "Processor: " ${CMAKE_HOST_SYSTEM_PROCESSOR})
# add version define
set(EASYPAINT_VERSION 0.1.1)
#------- headers --------
set (HEADERS
sources/mainwindow.h
sources/easypaintenums.h
sources/imagearea.h
sources/datasingleton.h
sources/additionaltools.h
sources/effects/abstracteffect.h
sources/effects/negativeeffect.h
sources/effects/grayeffect.h
sources/effects/binarizationeffect.h
sources/effects/customeffect.h
sources/effects/effectwithsettings.h
sources/effects/gammaeffect.h
sources/effects/gaussianblureffect.h
sources/effects/sharpeneffect.h
sources/undocommand.h
sources/widgets/toolbar.h
sources/widgets/colorchooser.h
sources/widgets/palettebar.h
sources/widgets/palettebutton.h
sources/widgets/shortcutedit.h
sources/widgets/abstracteffectsettings.h
sources/widgets/customfiltersettings.h
sources/widgets/sharpenfiltersettings.h
sources/widgets/gaussianblurfiltersettings.h
sources/widgets/imagepreview.h
sources/dialogs/resizedialog.h
sources/dialogs/settingsdialog.h
sources/dialogs/textdialog.h
sources/dialogs/effectsettingsdialog.h
sources/instruments/abstractinstrument.h
sources/instruments/abstractselection.h
sources/instruments/selectioninstrument.h
sources/instruments/pencilinstrument.h
sources/instruments/lineinstrument.h
sources/instruments/eraserinstrument.h
sources/instruments/rectangleinstrument.h
sources/instruments/ellipseinstrument.h
sources/instruments/fillinstrument.h
sources/instruments/sprayinstrument.h
sources/instruments/magnifierinstrument.h
sources/instruments/colorpickerinstrument.h
sources/instruments/curvelineinstrument.h
sources/instruments/textinstrument.h)
#------- sources --------
set (SOURCES
sources/main.cpp
sources/mainwindow.cpp
sources/imagearea.cpp
sources/datasingleton.cpp
sources/additionaltools.cpp
sources/effects/abstracteffect.cpp
sources/effects/negativeeffect.cpp
sources/effects/grayeffect.cpp
sources/effects/binarizationeffect.cpp
sources/effects/effectwithsettings.cpp
sources/effects/gammaeffect.cpp
sources/undocommand.cpp
sources/widgets/toolbar.cpp
sources/widgets/colorchooser.cpp
sources/widgets/palettebar.cpp
sources/widgets/palettebutton.cpp
sources/widgets/shortcutedit.cpp
sources/widgets/customfiltersettings.cpp
sources/widgets/sharpenfiltersettings.cpp
sources/widgets/gaussianblurfiltersettings.cpp
sources/widgets/imagepreview.cpp
sources/dialogs/resizedialog.cpp
sources/dialogs/settingsdialog.cpp
sources/dialogs/textdialog.cpp
sources/dialogs/effectsettingsdialog.cpp
sources/instruments/abstractinstrument.cpp
sources/instruments/abstractselection.cpp
sources/instruments/selectioninstrument.cpp
sources/instruments/pencilinstrument.cpp
sources/instruments/lineinstrument.cpp
sources/instruments/eraserinstrument.cpp
sources/instruments/rectangleinstrument.cpp
sources/instruments/ellipseinstrument.cpp
sources/instruments/fillinstrument.cpp
sources/instruments/sprayinstrument.cpp
sources/instruments/magnifierinstrument.cpp
sources/instruments/colorpickerinstrument.cpp
sources/instruments/curvelineinstrument.cpp
sources/instruments/textinstrument.cpp)
#------- resources -------
set (RESOURCE_PATH
sources)
set (RESOURCES
${RESOURCE_PATH}/resources.qrc)
#------- languages -------
if(NOT NO_TRANSLATIONS)
set (TRANSLATIONS
sources/translations/easypaint_ru_RU.ts
sources/translations/easypaint_cs_CZ.ts
sources/translations/easypaint_fr_FR.ts)
endif(NOT NO_TRANSLATIONS)
project (${PROJECT})
include_directories (./)
find_package (Qt4 REQUIRED)
include (${QT_USE_FILE})
qt4_add_resources (QRC_SOURCES ${RESOURCES})
qt4_wrap_cpp (MOC_SOURCES ${HEADERS})
qt4_add_translation( TRANSLATIONS_QM ${TRANSLATIONS} )
add_definitions (-Wall)
source_group ("Header Files" FILES ${HEADERS})
source_group ("Source Files" FILES ${SOURCES})
source_group ("Generated Files" FILES ${MOC_SOURCES})
source_group ("Resource Files" FILES ${QRC_SOURCES})
#------- build executable from sources ----------
add_executable (${PROJECT} ${HEADERS} ${SOURCES} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS_QM})
target_link_libraries (${PROJECT} ${QT_LIBRARIES})
#------- installing ----------
if(UNIX AND NOT APPLE)
# installing
INSTALL(TARGETS easypaint RUNTIME DESTINATION bin)
# install desktop files
INSTALL(FILES "sources/media/easypaint.desktop" DESTINATION share/applications)
# install pixmap
INSTALL(FILES "sources/media/logo/easypaint_64.png" DESTINATION share/pixmaps)
INSTALL(FILES ${TRANSLATIONS_QM} DESTINATION share/easypaint/translations)
endif(UNIX AND NOT APPLE)