CMakeLists.txt

Sun, 06 Mar 2022 15:31:40 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 06 Mar 2022 15:31:40 +0100
changeset 48
ddd1171ecda5
parent 31
ab17a56a47dd
child 49
29cf6e350063
permissions
-rw-r--r--

Added profile water table and editor.

1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 # CMakeLists.txt is part of bmsapp
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 #
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 PROJECT(bmsapp)
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 CMAKE_MINIMUM_REQUIRED( VERSION 3.6 )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 SET(bmsapp_EXECUTABLE "bmsapp")
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 MESSAGE( STATUS "Building bmsapp" )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
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
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 SET( bmsapp_VERSION_MAJOR 0 )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 SET( bmsapp_VERSION_MINOR 1 )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 SET( bmsapp_VERSION_PATCH 0 )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 # Compile flags
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16
31
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
17 OPTION(DO_RELEASE_BUILD "If on, will do a release build. Otherwise, debug build." OFF)
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
18 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
19
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 # Automatically run moc on source files when necessary
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 set(CMAKE_AUTOMOC ON)
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
22 set(CMAKE_AUTOUIC ON)
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
23 set(CMAKE_AUTORCC ON)
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 SET( CMAKE_CXX_FLAGS_RELEASE "-Wall -ansi -pedantic -Wno-long-long -O2 -pipe" )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 SET( CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -pipe" )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 #====================================================Set build type=====================================================
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 # We might always to tell the compiler to include debugging information (eg via the -g option on gcc). It makes the
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 # binaries slightly bigger on Linux, but helps greatly in analysing core dumps etc. (In closed-source projects people
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 # sometimes turn it off for release builds to make it harder to reverse engineer the software, but obviously that's not
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 # an issue for us.)
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 #
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 # However, setting CMAKE_BUILD_TYPE to "Debug", also changes other things, such as the default location for config
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 # files, which we don't want on a release build, so we would probably need to set compiler flags directly.
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 #
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 # .:TBD:. Investigate whether setting CMAKE_BUILD_TYPE to "RelWithDebInfo" does what we want.
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 #
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 #IF( ${DO_RELEASE_BUILD} )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 # SET(CMAKE_BUILD_TYPE "Release")
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 #ELSE()
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 # SET(CMAKE_BUILD_TYPE "Debug")
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43 #ENDIF()
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44
2
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
45 # ===== Directories =====
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
46
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
47 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
48 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
49 ENDIF()
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
50
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
51 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
52 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
53 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
54 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
55 ENDIF()
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
56
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
57 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
58 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
59 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
60
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
61
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
62 SET(ROOTDIR "${CMAKE_CURRENT_SOURCE_DIR}")
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
63 SET(SRCDIR "${ROOTDIR}/src")
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
64 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
65 SET(DATADIR "${ROOTDIR}/data")
31
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
66 SET(TRANSLATIONSDIR "${ROOTDIR}/translations")
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
67
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
68 INCLUDE_DIRECTORIES(${SRCDIR})
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
69 INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/src") # In case of out-of-source build.
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
70
2
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
71 # ===== Find Qt5 =====
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
72
2
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
73 # Minimum versio 5.13 for debug messages.
31
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
74 find_package(Qt5 5.13 REQUIRED COMPONENTS Core Widgets Network Sql LinguistTools)
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
75
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
76 # PrintSupport Xml LinguistTools
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
77
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
78 # Some extra files for the "make clean" target.
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 SET_PROPERTY(
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
80 DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
81 PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
82 cmake_install.cmake
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
83 compile_commands.json
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
84 CMakeCache.txt
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
85 )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
86
2
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
87 # ===== 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
88
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
89 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
90 SET( CONFIGDOCDIR "${DOCPATH}/" )
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
91
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
92 # Tell cmake where the configure file is and where
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
93 # to put the output. All variables in config.in written as "${VAR}$
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
94 # will be replaced by VAR as determined by cmake in config.h.
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
95 # Outputs only in the build directory.
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
96 CONFIGURE_FILE( src/config.in src/config.h )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
97
2
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
98 # ===== 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
99
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
100 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
101 ${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
102 ${SRCDIR}/bmsapp.cpp
4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
103 ${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
104 ${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
105 ${SRCDIR}/EditSupplier.cpp
19
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 18
diff changeset
106 ${SRCDIR}/InventoryFermentables.cpp
20
fcbbddcc22c1 Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
107 ${SRCDIR}/EditFermentable.cpp
24
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
108 ${SRCDIR}/InventoryHops.cpp
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
109 ${SRCDIR}/EditHop.cpp
25
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
110 ${SRCDIR}/InventoryYeasts.cpp
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
111 ${SRCDIR}/EditYeast.cpp
28
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
112 ${SRCDIR}/InventoryMiscs.cpp
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
113 ${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
114 ${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
115 ${SRCDIR}/EditWater.cpp
30
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
116 ${SRCDIR}/InventoryEquipments.cpp
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
117 ${SRCDIR}/EditEquipment.cpp
48
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
118 ${SRCDIR}/ProfileWaters.cpp
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
119 ${SRCDIR}/EditProfileWater.cpp
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 14
diff changeset
120 ${SRCDIR}/Setup.cpp
20
fcbbddcc22c1 Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
121 ${SRCDIR}/Utils.cpp
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
122 ${SRCDIR}/MainWindow.cpp
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
123 ${SRCDIR}/database/database.cpp
20
fcbbddcc22c1 Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
124 ${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
125 )
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
126
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
127 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
128 ${SRCDIR}/bmsapp.h
4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
129 ${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
130 ${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
131 ${SRCDIR}/EditSupplier.h
19
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 18
diff changeset
132 ${SRCDIR}/InventoryFermentables.h
20
fcbbddcc22c1 Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
133 ${SRCDIR}/EditFermentable.h
24
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
134 ${SRCDIR}/InventoryHops.h
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
135 ${SRCDIR}/EditHop.h
25
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
136 ${SRCDIR}/InventoryYeasts.h
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
137 ${SRCDIR}/EditYeast.h
28
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
138 ${SRCDIR}/InventoryMiscs.h
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
139 ${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
140 ${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
141 ${SRCDIR}/EditWater.h
30
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
142 ${SRCDIR}/InventoryEquipments.h
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
143 ${SRCDIR}/EditEquipment.h
48
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
144 ${SRCDIR}/ProfileWaters.h
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
145 ${SRCDIR}/EditProfileWater.h
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 14
diff changeset
146 ${SRCDIR}/Setup.h
20
fcbbddcc22c1 Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
147 ${SRCDIR}/Utils.h
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
148 ${SRCDIR}/MainWindow.h
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
149 ${SRCDIR}/database/database.h
20
fcbbddcc22c1 Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
150 ${SRCDIR}/nulldateedit.h
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
151 )
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
152
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
153 set( UIS
4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
154 ${UIDIR}/AboutDialog.ui
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
155 ${UIDIR}/InventorySuppliers.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
156 ${UIDIR}/EditSupplier.ui
19
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 18
diff changeset
157 ${UIDIR}/InventoryFermentables.ui
20
fcbbddcc22c1 Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
158 ${UIDIR}/EditFermentable.ui
23
1ac3fb2569c1 Added ui files for hops, yeasts and misc inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
159 ${UIDIR}/InventoryHops.ui
1ac3fb2569c1 Added ui files for hops, yeasts and misc inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
160 ${UIDIR}/EditHop.ui
1ac3fb2569c1 Added ui files for hops, yeasts and misc inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
161 ${UIDIR}/InventoryYeasts.ui
1ac3fb2569c1 Added ui files for hops, yeasts and misc inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
162 ${UIDIR}/EditYeast.ui
1ac3fb2569c1 Added ui files for hops, yeasts and misc inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
163 ${UIDIR}/InventoryMiscs.ui
1ac3fb2569c1 Added ui files for hops, yeasts and misc inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 20
diff changeset
164 ${UIDIR}/EditMisc.ui
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
165 ${UIDIR}/InventoryWaters.ui
30
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
166 ${UIDIR}/EditWater.ui
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
167 ${UIDIR}/InventoryEquipments.ui
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
168 ${UIDIR}/EditEquipment.ui
48
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
169 ${UIDIR}/ProfileWaters.ui
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
170 ${UIDIR}/EditProfileWater.ui
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 14
diff changeset
171 ${UIDIR}/Setup.ui
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
172 ${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
173 )
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
174
31
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
175
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
176 set( TS_FILES
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
177 ${TRANSLATIONSDIR}/bmsapp_en.ts # English
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
178 ${TRANSLATIONSDIR}/bmsapp_nl.ts # Dutch
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
179 )
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
180
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
181 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
182 ${SRCS}
a1e435907f3a Added commandline parameters. Added initial app functions. Added user configuration read/write/create.
Michiel Broek <mbroek@mbse.eu>
parents: 1
diff changeset
183 ${HDRS}
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
184 ${UIS}
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
185 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
186 resources/qdarkstyle/theme/style.qrc
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
187 )
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
188
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
189 # ===== Build the application =====
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
190
31
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
191 # Run with cmake -DUPDATE_TRANSLATIONS=ON ..
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
192 # or cmake -DUPDATE_TRANSLATIONS=OFF ..
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
193
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
194 if(UPDATE_TRANSLATIONS)
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
195 message("** parse sources for new translations")
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
196 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
197 else()
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
198 message("** update qm files")
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
199 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
200 endif()
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
201
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
202 add_executable(${bmsapp_EXECUTABLE} ${SOURCE_FILES} ${QM_FILES})
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents: 2
diff changeset
203 target_link_libraries(${bmsapp_EXECUTABLE} Qt5::Core Qt5::Widgets Qt5::Network Qt5::Sql)
1
d38df7b58026 Initial build and cmake setup
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
204
31
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
205 # `make translations'
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
206 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
207
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
208
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
209 # ===== Install the application =====
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
210
ab17a56a47dd Setup translation system and started the Dutch translation
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
211

mercurial