Sun, 27 Mar 2022 11:59:15 +0200
Improve the CMakeLists.txt. Cleanup unused variables. Removed som debug messages.
1 | 1 | # CMakeLists.txt is part of bmsapp |
2 | # | |
3 | ||
4 | PROJECT(bmsapp) | |
5 | CMAKE_MINIMUM_REQUIRED( VERSION 3.6 ) | |
6 | SET(bmsapp_EXECUTABLE "bmsapp") | |
7 | MESSAGE( STATUS "Building bmsapp" ) | |
8 | ||
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
9 | # ===== Set application version ===== |
1 | 10 | |
11 | SET( bmsapp_VERSION_MAJOR 0 ) | |
12 | SET( bmsapp_VERSION_MINOR 1 ) | |
86 | 13 | SET( bmsapp_VERSION_PATCH 1 ) |
1 | 14 | |
15 | # Compile flags | |
16 | ||
31
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
17 | option(UPDATE_TRANSLATIONS "Enable rescanning sources to update .ts files" OFF) |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
18 | |
1 | 19 | # Automatically run moc on source files when necessary |
20 | set(CMAKE_AUTOMOC ON) | |
3 | 21 | set(CMAKE_AUTOUIC ON) |
22 | set(CMAKE_AUTORCC ON) | |
1 | 23 | |
24 | SET( CMAKE_CXX_FLAGS_RELEASE "-Wall -ansi -pedantic -Wno-long-long -O2 -pipe" ) | |
25 | SET( CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -pipe" ) | |
26 | ||
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
27 | # ===== Directories ===== |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
28 | |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
29 | IF( NOT EXEC_PREFIX ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
30 | SET( EXEC_PREFIX ${CMAKE_INSTALL_PREFIX} ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
31 | ENDIF() |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
32 | |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
33 | SET( DATAROOTDIR "${EXEC_PREFIX}/share" ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
34 | SET( BINDIR "${EXEC_PREFIX}/bin" ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
35 | IF( NOT DOCDIR ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
36 | SET( DOCDIR "${DATAROOTDIR}/doc/${CMAKE_PROJECT_NAME}" ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
37 | ENDIF() |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
38 | |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
39 | SET( DATAPATH "${DATAROOTDIR}/${CMAKE_PROJECT_NAME}" ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
40 | SET( TARGETPATH ${BINDIR} ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
41 | SET( DOCPATH ${DOCDIR} ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
42 | |
1 | 43 | |
44 | SET(ROOTDIR "${CMAKE_CURRENT_SOURCE_DIR}") | |
45 | SET(SRCDIR "${ROOTDIR}/src") | |
3 | 46 | SET(UIDIR "${ROOTDIR}/ui") |
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
47 | SET(DATADIR "${ROOTDIR}/data") |
31
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
48 | SET(TRANSLATIONSDIR "${ROOTDIR}/translations") |
1 | 49 | |
50 | INCLUDE_DIRECTORIES(${SRCDIR}) | |
51 | INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/src") # In case of out-of-source build. | |
52 | ||
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
53 | # ===== Find Qt5 ===== |
1 | 54 | |
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
55 | # Minimum versio 5.13 for debug messages. |
52
ff7b3a41c9b5
After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents:
49
diff
changeset
|
56 | find_package(Qt5 5.13 REQUIRED COMPONENTS Core Widgets Network Sql LinguistTools PrintSupport) |
1 | 57 | |
3 | 58 | # PrintSupport Xml LinguistTools |
1 | 59 | |
60 | # Some extra files for the "make clean" target. | |
61 | SET_PROPERTY( | |
62 | DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | |
63 | PROPERTY ADDITIONAL_MAKE_CLEAN_FILES | |
64 | cmake_install.cmake | |
65 | compile_commands.json | |
66 | CMakeCache.txt | |
67 | ) | |
68 | ||
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
69 | # ===== Setup the config.h ===== |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
70 | |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
71 | SET( CONFIGDATADIR "${DATAPATH}/" ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
72 | SET( CONFIGDOCDIR "${DOCPATH}/" ) |
1 | 73 | |
74 | # Tell cmake where the configure file is and where | |
75 | # to put the output. All variables in config.in written as "${VAR}$ | |
76 | # will be replaced by VAR as determined by cmake in config.h. | |
77 | # Outputs only in the build directory. | |
78 | CONFIGURE_FILE( src/config.in src/config.h ) | |
79 | ||
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
80 | # ===== All sources ===== |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
81 | |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
82 | set( SRCS |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
83 | ${SRCDIR}/main.cpp |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
84 | ${SRCDIR}/bmsapp.cpp |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
77
diff
changeset
|
85 | ${SRCDIR}/RecipesTree.cpp |
4 | 86 | ${SRCDIR}/AboutDialog.cpp |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
87 | ${SRCDIR}/InventorySuppliers.cpp |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
88 | ${SRCDIR}/EditSupplier.cpp |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
18
diff
changeset
|
89 | ${SRCDIR}/InventoryFermentables.cpp |
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
90 | ${SRCDIR}/EditFermentable.cpp |
24 | 91 | ${SRCDIR}/InventoryHops.cpp |
92 | ${SRCDIR}/EditHop.cpp | |
25
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
93 | ${SRCDIR}/InventoryYeasts.cpp |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
94 | ${SRCDIR}/EditYeast.cpp |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
95 | ${SRCDIR}/InventoryMiscs.cpp |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
96 | ${SRCDIR}/EditMisc.cpp |
29
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
97 | ${SRCDIR}/InventoryWaters.cpp |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
98 | ${SRCDIR}/EditWater.cpp |
30
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
99 | ${SRCDIR}/InventoryEquipments.cpp |
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
100 | ${SRCDIR}/EditEquipment.cpp |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
31
diff
changeset
|
101 | ${SRCDIR}/ProfileWaters.cpp |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
31
diff
changeset
|
102 | ${SRCDIR}/EditProfileWater.cpp |
49
29cf6e350063
Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
103 | ${SRCDIR}/ProfileMashs.cpp |
29cf6e350063
Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
104 | ${SRCDIR}/EditProfileMash.cpp |
56
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
105 | ${SRCDIR}/ProfileStyles.cpp |
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
106 | ${SRCDIR}/EditProfileStyle.cpp |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
107 | ${SRCDIR}/ProfileFerments.cpp |
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
108 | ${SRCDIR}/EditProfileFerment.cpp |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
14
diff
changeset
|
109 | ${SRCDIR}/Setup.cpp |
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
110 | ${SRCDIR}/Utils.cpp |
52
ff7b3a41c9b5
After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents:
49
diff
changeset
|
111 | ${SRCDIR}/PrinterDialog.cpp |
3 | 112 | ${SRCDIR}/MainWindow.cpp |
113 | ${SRCDIR}/database/database.cpp | |
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
114 | ${SRCDIR}/nulldateedit.cpp |
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
115 | ) |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
116 | |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
117 | set( HDRS |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
118 | ${SRCDIR}/bmsapp.h |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
77
diff
changeset
|
119 | ${SRCDIR}/RecipesTree.h |
4 | 120 | ${SRCDIR}/AboutDialog.h |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
121 | ${SRCDIR}/InventorySuppliers.h |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
122 | ${SRCDIR}/EditSupplier.h |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
18
diff
changeset
|
123 | ${SRCDIR}/InventoryFermentables.h |
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
124 | ${SRCDIR}/EditFermentable.h |
24 | 125 | ${SRCDIR}/InventoryHops.h |
126 | ${SRCDIR}/EditHop.h | |
25
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
127 | ${SRCDIR}/InventoryYeasts.h |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
128 | ${SRCDIR}/EditYeast.h |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
129 | ${SRCDIR}/InventoryMiscs.h |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
130 | ${SRCDIR}/EditMisc.h |
29
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
131 | ${SRCDIR}/InventoryWaters.h |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
132 | ${SRCDIR}/EditWater.h |
30
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
133 | ${SRCDIR}/InventoryEquipments.h |
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
134 | ${SRCDIR}/EditEquipment.h |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
31
diff
changeset
|
135 | ${SRCDIR}/ProfileWaters.h |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
31
diff
changeset
|
136 | ${SRCDIR}/EditProfileWater.h |
49
29cf6e350063
Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
137 | ${SRCDIR}/ProfileMashs.h |
29cf6e350063
Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
138 | ${SRCDIR}/EditProfileMash.h |
56
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
139 | ${SRCDIR}/ProfileStyles.h |
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
140 | ${SRCDIR}/EditProfileStyle.h |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
141 | ${SRCDIR}/ProfileFerments.h |
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
142 | ${SRCDIR}/EditProfileFerment.h |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
14
diff
changeset
|
143 | ${SRCDIR}/Setup.h |
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
144 | ${SRCDIR}/Utils.h |
52
ff7b3a41c9b5
After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents:
49
diff
changeset
|
145 | ${SRCDIR}/PrinterDialog.h |
3 | 146 | ${SRCDIR}/MainWindow.h |
147 | ${SRCDIR}/database/database.h | |
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
148 | ${SRCDIR}/nulldateedit.h |
3 | 149 | ) |
150 | ||
151 | set( UIS | |
4 | 152 | ${UIDIR}/AboutDialog.ui |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
153 | ${UIDIR}/EditSupplier.ui |
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
154 | ${UIDIR}/EditFermentable.ui |
23
1ac3fb2569c1
Added ui files for hops, yeasts and misc inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
20
diff
changeset
|
155 | ${UIDIR}/EditHop.ui |
1ac3fb2569c1
Added ui files for hops, yeasts and misc inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
20
diff
changeset
|
156 | ${UIDIR}/EditYeast.ui |
1ac3fb2569c1
Added ui files for hops, yeasts and misc inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
20
diff
changeset
|
157 | ${UIDIR}/EditMisc.ui |
30
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
158 | ${UIDIR}/EditWater.ui |
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
159 | ${UIDIR}/EditEquipment.ui |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
31
diff
changeset
|
160 | ${UIDIR}/EditProfileWater.ui |
49
29cf6e350063
Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
161 | ${UIDIR}/EditProfileMash.ui |
56
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
162 | ${UIDIR}/EditProfileStyle.ui |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
163 | ${UIDIR}/EditProfileFerment.ui |
3 | 164 | ${UIDIR}/MainWindow.ui |
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
165 | ) |
1 | 166 | |
31
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
167 | |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
168 | set( TS_FILES |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
169 | ${TRANSLATIONSDIR}/bmsapp_en.ts # English |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
170 | ${TRANSLATIONSDIR}/bmsapp_nl.ts # Dutch |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
171 | ) |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
172 | |
1 | 173 | set( SOURCE_FILES |
2
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
174 | ${SRCS} |
a1e435907f3a
Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents:
1
diff
changeset
|
175 | ${HDRS} |
3 | 176 | ${UIS} |
177 | resources/icons.qrc | |
14
8a304c898a75
Added QDarkStyle stylesheet and images. Updated About window. Some minor layout improvements.
Michiel Broek <mbroek@mbse.eu>
parents:
10
diff
changeset
|
178 | resources/qdarkstyle/theme/style.qrc |
1 | 179 | ) |
180 | ||
181 | # ===== Build the application ===== | |
182 | ||
31
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
183 | # Run with cmake -DUPDATE_TRANSLATIONS=ON .. |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
184 | # or cmake -DUPDATE_TRANSLATIONS=OFF .. |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
185 | |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
186 | if(UPDATE_TRANSLATIONS) |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
187 | message("** parse sources for new translations") |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
188 | qt5_create_translation(QM_FILES ${SOURCE_FILES} ${TS_FILES}) |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
189 | else() |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
190 | message("** update qm files") |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
191 | qt5_add_translation(QM_FILES ${TS_FILES}) |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
192 | endif() |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
193 | |
84
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
194 | SET( bmsapp_DESKTOP |
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
195 | ${ROOTDIR}/bmsapp.desktop |
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
196 | ) |
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
197 | |
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
198 | |
31
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
199 | add_executable(${bmsapp_EXECUTABLE} ${SOURCE_FILES} ${QM_FILES}) |
52
ff7b3a41c9b5
After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents:
49
diff
changeset
|
200 | target_link_libraries(${bmsapp_EXECUTABLE} Qt5::Core Qt5::Widgets Qt5::Network Qt5::Sql Qt5::PrintSupport) |
1 | 201 | |
31
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
202 | # `make translations' |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
203 | add_custom_target(translations DEPENDS ${QM_FILES}) |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
204 | |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
205 | |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
206 | # ===== Install the application ===== |
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
207 | |
84
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
208 | install(TARGETS ${bmsapp_EXECUTABLE} |
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
209 | RUNTIME DESTINATION bin |
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
210 | ) |
31
ab17a56a47dd
Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
211 | |
84
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
212 | INSTALL( FILES ${bmsapp_DESKTOP} |
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
213 | DESTINATION "${DATAROOTDIR}/applications" |
2c503bf10a4f
Added install option and a desktop file.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
214 | ) |