-
Notifications
You must be signed in to change notification settings - Fork 158
/
CMakeLists.txt
487 lines (438 loc) · 19.1 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
cmake_minimum_required(VERSION 3.14)
project(limereport)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" "${CMAKE_MODULE_PATH}")
include(GenerateVersionHeader)
set(DEFAULT_ITEM_PADDING 0)
option(ENABLE_ZINT "Enable libzint build for barcode support" OFF)
option(LIMEREPORT_STATIC "Build LimeReport as static library" OFF)
option(LIMEREPORT_DEMO "Build LimeReport demos" OFF)
option(ENABLE_DIALOG_DESIGNER "Enable dialog designer" OFF)
option(HAVE_UI_LOADER "Enable ui loader" OFF)
option(USE_QT6 "Use Qt6" OFF)
if (ENABLE_DIALOG_DESIGNER AND NOT HAVE_UI_LOADER)
message(FATAL_ERROR "You need to enable HAVE_UI_LOADER")
endif()
if(USE_QT6)
find_package(QT NAMES Qt6)
else()
find_package(QT NAMES Qt5)
endif(USE_QT6)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport REQUIRED)
if(HAVE_UI_LOADER)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS UiTools REQUIRED)
endif()
if(ENABLE_DIALOG_DESIGNER)
if(USE_QT6)
if(ENABLE_DIALOG_DESIGNER)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Designer DesignerComponentsPrivate REQUIRED)
endif()
else()
if(ENABLE_DIALOG_DESIGNER)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Designer DesignerComponents REQUIRED)
endif()
endif(USE_QT6)
endif()
# Old Qt does not provide QT_VERSION_MAJOR
if (NOT QT_VERSION_MAJOR)
string(SUBSTRING ${QT_VERSION} 0 1 QT_VERSION_MAJOR)
endif()
message(STATUS "Qt version: ${QT_VERSION_MAJOR}")
if (Qt${QT_VERSION_MAJOR}Widgets_FOUND)
message(STATUS "QtGui found")
endif()
if (Qt${QT_VERSION_MAJOR}Widgets_FOUND)
message(STATUS "QtWidgets found")
endif()
add_subdirectory(3rdparty)
if (LIMEREPORT_DEMO)
add_subdirectory(console)
add_subdirectory(designer)
add_subdirectory(demo_r1)
add_subdirectory(demo_r2)
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
set ( LIMEREPORT_SOURCES
${PROJECT_NAME}/bands/lrdataband.cpp
${PROJECT_NAME}/bands/lrgroupbands.cpp
${PROJECT_NAME}/bands/lrpagefooter.cpp
${PROJECT_NAME}/bands/lrpageheader.cpp
${PROJECT_NAME}/bands/lrreportfooter.cpp
${PROJECT_NAME}/bands/lrreportheader.cpp
${PROJECT_NAME}/bands/lrsubdetailband.cpp
${PROJECT_NAME}/bands/lrtearoffband.cpp
${PROJECT_NAME}/databrowser/lrconnectiondialog.cpp
${PROJECT_NAME}/databrowser/lrdatabrowser.cpp
${PROJECT_NAME}/databrowser/lrdatabrowsertree.cpp
${PROJECT_NAME}/databrowser/lrsqleditdialog.cpp
${PROJECT_NAME}/databrowser/lrvariabledialog.cpp
${PROJECT_NAME}/exporters/lrpdfexporter.cpp
${PROJECT_NAME}/items/charts/lrhorizontalbarchart.cpp
${PROJECT_NAME}/items/charts/lrlineschart.cpp
${PROJECT_NAME}/items/charts/lrgridlineschart.cpp
${PROJECT_NAME}/items/charts/lrpiechart.cpp
${PROJECT_NAME}/items/charts/lrverticalbarchart.cpp
${PROJECT_NAME}/items/editors/lrfonteditorwidget.cpp
${PROJECT_NAME}/items/editors/lritemeditorwidget.cpp
${PROJECT_NAME}/items/editors/lritemsaligneditorwidget.cpp
${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.cpp
${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.cpp
${PROJECT_NAME}/items/lrabstractlayout.cpp
${PROJECT_NAME}/items/lralignpropitem.cpp
${PROJECT_NAME}/items/lrborderframeeditor.cpp
${PROJECT_NAME}/items/lrbordereditor.cpp
${PROJECT_NAME}/items/lrchartitem.cpp
${PROJECT_NAME}/items/lrchartaxiseditor.cpp
${PROJECT_NAME}/items/lrchartitemeditor.cpp
${PROJECT_NAME}/items/lrhorizontallayout.cpp
${PROJECT_NAME}/items/lrimageitem.cpp
${PROJECT_NAME}/items/lrimageitemeditor.cpp
${PROJECT_NAME}/items/lrlayoutmarker.cpp
${PROJECT_NAME}/items/lrpageeditor.cpp
${PROJECT_NAME}/items/lrshapeitem.cpp
${PROJECT_NAME}/items/lrsubitemparentpropitem.cpp
${PROJECT_NAME}/items/lrsvgitem.cpp
${PROJECT_NAME}/items/lrtextitem.cpp
${PROJECT_NAME}/items/lrtextitemeditor.cpp
${PROJECT_NAME}/items/lrverticallayout.cpp
${PROJECT_NAME}/lraboutdialog.cpp
${PROJECT_NAME}/lraxisdata.cpp
${PROJECT_NAME}/lrbanddesignintf.cpp
${PROJECT_NAME}/lrbandsmanager.cpp
${PROJECT_NAME}/lrbasedesignintf.cpp
${PROJECT_NAME}/lrcolorindicator.cpp
${PROJECT_NAME}/lrdatadesignintf.cpp
${PROJECT_NAME}/lrdatasourcemanager.cpp
${PROJECT_NAME}/lrglobal.cpp
${PROJECT_NAME}/lrgraphicsviewzoom.cpp
${PROJECT_NAME}/lrgroupfunctions.cpp
${PROJECT_NAME}/lritemdesignintf.cpp
${PROJECT_NAME}/lritemscontainerdesignitf.cpp
${PROJECT_NAME}/lrpagedesignintf.cpp
${PROJECT_NAME}/lrpageitemdesignintf.cpp
${PROJECT_NAME}/lrpreparedpages.cpp
${PROJECT_NAME}/lrpreviewreportwidget.cpp
${PROJECT_NAME}/lrpreviewreportwindow.cpp
${PROJECT_NAME}/lrreportdesignwidget.cpp
${PROJECT_NAME}/lrreportdesignwindow.cpp
${PROJECT_NAME}/lrreportengine.cpp
${PROJECT_NAME}/lrreportrender.cpp
${PROJECT_NAME}/lrreporttranslation.cpp
${PROJECT_NAME}/lrscriptenginemanager.cpp
${PROJECT_NAME}/lrsettingdialog.cpp
${PROJECT_NAME}/lrsimplecrypt.cpp
${PROJECT_NAME}/lrvariablesholder.cpp
${PROJECT_NAME}/objectinspector/editors/lrbuttonlineeditor.cpp
${PROJECT_NAME}/objectinspector/editors/lrcheckboxeditor.cpp
${PROJECT_NAME}/objectinspector/editors/lrcoloreditor.cpp
${PROJECT_NAME}/objectinspector/editors/lrcomboboxeditor.cpp
${PROJECT_NAME}/objectinspector/editors/lrfonteditor.cpp
${PROJECT_NAME}/objectinspector/editors/lrimageeditor.cpp
${PROJECT_NAME}/objectinspector/editors/lrsvgeditor.cpp
${PROJECT_NAME}/objectinspector/editors/lrtextitempropertyeditor.cpp
${PROJECT_NAME}/objectinspector/lrbasedesignobjectmodel.cpp
${PROJECT_NAME}/objectinspector/lrobjectinspectorwidget.cpp
${PROJECT_NAME}/objectinspector/lrobjectitemmodel.cpp
${PROJECT_NAME}/objectinspector/lrobjectpropitem.cpp
${PROJECT_NAME}/objectinspector/lrpropertydelegate.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrboolpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrcolorpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrcontentpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrdatasourcepropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrenumpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrflagspropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrfontpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrgroupfieldpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrimagepropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrintpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrmarginpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrqrealpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrrectproptem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrseriespropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrstringpropitem.cpp
${PROJECT_NAME}/objectinspector/propertyItems/lrsvgpropitem.cpp
${PROJECT_NAME}/objectsbrowser/lrobjectbrowser.cpp
${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.cpp
${PROJECT_NAME}/scripteditor/lrcodeeditor.cpp
${PROJECT_NAME}/scripteditor/lrscripteditor.cpp
${PROJECT_NAME}/scripteditor/lrscripthighlighter.cpp
${PROJECT_NAME}/scripteditor/lrcompletermodel.cpp
${PROJECT_NAME}/serializators/lrxmlbasetypesserializators.cpp
${PROJECT_NAME}/serializators/lrxmlqrectserializator.cpp
${PROJECT_NAME}/serializators/lrxmlreader.cpp
${PROJECT_NAME}/serializators/lrxmlwriter.cpp
${PROJECT_NAME}/translationeditor/languageselectdialog.cpp
${PROJECT_NAME}/translationeditor/translationeditor.cpp
${PROJECT_NAME}/bands/lrdataband.h
${PROJECT_NAME}/bands/lrgroupbands.h
${PROJECT_NAME}/bands/lrpagefooter.h
${PROJECT_NAME}/bands/lrpageheader.h
${PROJECT_NAME}/bands/lrreportfooter.h
${PROJECT_NAME}/bands/lrreportheader.h
${PROJECT_NAME}/bands/lrsubdetailband.h
${PROJECT_NAME}/bands/lrtearoffband.h
${PROJECT_NAME}/base/lrattribsabstractfactory.h
${PROJECT_NAME}/base/lrsimpleabstractfactory.h
${PROJECT_NAME}/base/lrsingleton.h
${PROJECT_NAME}/databrowser/lrconnectiondialog.h
${PROJECT_NAME}/databrowser/lrdatabrowser.h
${PROJECT_NAME}/databrowser/lrdatabrowsertree.h
${PROJECT_NAME}/databrowser/lrsqleditdialog.h
${PROJECT_NAME}/databrowser/lrvariabledialog.h
${PROJECT_NAME}/exporters/lrpdfexporter.h
${PROJECT_NAME}/items/charts/lrhorizontalbarchart.h
${PROJECT_NAME}/items/charts/lrlineschart.h
${PROJECT_NAME}/items/charts/lrgridlineschart.h
${PROJECT_NAME}/items/charts/lrpiechart.h
${PROJECT_NAME}/items/charts/lrverticalbarchart.h
${PROJECT_NAME}/items/editors/lrfonteditorwidget.h
${PROJECT_NAME}/items/editors/lritemeditorwidget.h
${PROJECT_NAME}/items/editors/lritemsaligneditorwidget.h
${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.h
${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.h
${PROJECT_NAME}/items/lrabstractlayout.h
${PROJECT_NAME}/items/lralignpropitem.h
${PROJECT_NAME}/items/lrborderframeeditor.h
${PROJECT_NAME}/items/lrbordereditor.h
${PROJECT_NAME}/items/lrchartitem.h
${PROJECT_NAME}/items/lrchartaxiseditor.h
${PROJECT_NAME}/items/lrchartitemeditor.h
${PROJECT_NAME}/items/lreditableimageitemintf.h
${PROJECT_NAME}/items/lrhorizontallayout.h
${PROJECT_NAME}/items/lrimageitem.h
${PROJECT_NAME}/items/lrimageitemeditor.h
${PROJECT_NAME}/items/lrlayoutmarker.h
${PROJECT_NAME}/items/lrpageeditor.h
${PROJECT_NAME}/items/lrshapeitem.h
${PROJECT_NAME}/items/lrsubitemparentpropitem.h
${PROJECT_NAME}/items/lrsvgitem.h
${PROJECT_NAME}/items/lrtextitem.h
${PROJECT_NAME}/items/lrtextitemeditor.h
${PROJECT_NAME}/items/lrverticallayout.h
${PROJECT_NAME}/lraboutdialog.h
${PROJECT_NAME}/lraxisdata.h
${PROJECT_NAME}/lrbanddesignintf.h
${PROJECT_NAME}/lrbandsmanager.h
${PROJECT_NAME}/lrbasedesignintf.h
${PROJECT_NAME}/lrcollection.h
${PROJECT_NAME}/lrcolorindicator.h
${PROJECT_NAME}/lrdatadesignintf.h
${PROJECT_NAME}/lrdatasourcemanager.h
${PROJECT_NAME}/lrdesignelementsfactory.h
${PROJECT_NAME}/lrdesignerplugininterface.h
${PROJECT_NAME}/lrexporterintf.h
${PROJECT_NAME}/lrexportersfactory.h
${PROJECT_NAME}/lrgraphicsviewzoom.h
${PROJECT_NAME}/lrgroupfunctions.h
${PROJECT_NAME}/lritemdesignintf.h
${PROJECT_NAME}/lritemscontainerdesignitf.h
${PROJECT_NAME}/lrpagedesignintf.h
${PROJECT_NAME}/lrpageinitintf.h
${PROJECT_NAME}/lrpageitemdesignintf.h
${PROJECT_NAME}/lrpreparedpages.h
${PROJECT_NAME}/lrpreviewreportwidget_p.h
${PROJECT_NAME}/lrpreviewreportwindow.h
${PROJECT_NAME}/lrreportdesignwidget.h
${PROJECT_NAME}/lrreportdesignwindow.h
${PROJECT_NAME}/lrreportengine_p.h
${PROJECT_NAME}/lrreportrender.h
${PROJECT_NAME}/lrreporttranslation.h
${PROJECT_NAME}/lrscriptenginemanager.h
${PROJECT_NAME}/lrsettingdialog.h
${PROJECT_NAME}/lrsimplecrypt.h
${PROJECT_NAME}/lrvariablesholder.h
${PROJECT_NAME}/objectinspector/editors/lrbuttonlineeditor.h
${PROJECT_NAME}/objectinspector/editors/lrcheckboxeditor.h
${PROJECT_NAME}/objectinspector/editors/lrcoloreditor.h
${PROJECT_NAME}/objectinspector/editors/lrcomboboxeditor.h
${PROJECT_NAME}/objectinspector/editors/lrfonteditor.h
${PROJECT_NAME}/objectinspector/editors/lrimageeditor.h
${PROJECT_NAME}/objectinspector/editors/lrsvgeditor.h
${PROJECT_NAME}/objectinspector/editors/lrtextitempropertyeditor.h
${PROJECT_NAME}/objectinspector/lrbasedesignobjectmodel.h
${PROJECT_NAME}/objectinspector/lrobjectinspectorwidget.h
${PROJECT_NAME}/objectinspector/lrobjectitemmodel.h
${PROJECT_NAME}/objectinspector/lrobjectpropitem.h
${PROJECT_NAME}/objectinspector/lrpropertydelegate.h
${PROJECT_NAME}/objectinspector/propertyItems/lrboolpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrcolorpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrcontentpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrdatasourcepropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrenumpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrflagspropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrfontpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrgroupfieldpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrimagepropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrintpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrmarginpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrqrealpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrrectproptem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrseriespropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrstringpropitem.h
${PROJECT_NAME}/objectinspector/propertyItems/lrsvgpropitem.h
${PROJECT_NAME}/objectsbrowser/lrobjectbrowser.h
${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.h
${PROJECT_NAME}/scripteditor/lrcodeeditor.h
${PROJECT_NAME}/scripteditor/lrscripteditor.h
${PROJECT_NAME}/scripteditor/lrscripthighlighter.h
${PROJECT_NAME}/scripteditor/lrcompletermodel.h
${PROJECT_NAME}/serializators/lrserializatorintf.h
${PROJECT_NAME}/serializators/lrstorageintf.h
${PROJECT_NAME}/serializators/lrxmlbasetypesserializators.h
${PROJECT_NAME}/serializators/lrxmlqrectserializator.h
${PROJECT_NAME}/serializators/lrxmlreader.h
${PROJECT_NAME}/serializators/lrxmlserializatorsfactory.h
${PROJECT_NAME}/serializators/lrxmlwriter.h
${PROJECT_NAME}/translationeditor/languageselectdialog.h
${PROJECT_NAME}/translationeditor/translationeditor.h
${PROJECT_NAME}/databrowser/lrconnectiondialog.ui
${PROJECT_NAME}/databrowser/lrdatabrowser.ui
${PROJECT_NAME}/databrowser/lrsqleditdialog.ui
${PROJECT_NAME}/databrowser/lrvariabledialog.ui
${PROJECT_NAME}/dialogdesigner/templates/Dialog.ui
${PROJECT_NAME}/items/lrborderframeeditor.ui
${PROJECT_NAME}/items/lrbordereditor.ui
${PROJECT_NAME}/items/lrchartitemeditor.ui
${PROJECT_NAME}/items/lrchartaxiseditor.ui
${PROJECT_NAME}/items/lrimageitemeditor.ui
${PROJECT_NAME}/items/lrpageeditor.ui
${PROJECT_NAME}/items/lrtextitemeditor.ui
${PROJECT_NAME}/lraboutdialog.ui
${PROJECT_NAME}/lrpreviewreportwidget.ui
${PROJECT_NAME}/lrpreviewreportwindow.ui
${PROJECT_NAME}/lrsettingdialog.ui
${PROJECT_NAME}/objectinspector/editors/ltextitempropertyeditor.ui
${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.ui
${PROJECT_NAME}/scripteditor/lrscripteditor.ui
${PROJECT_NAME}/translationeditor/languageselectdialog.ui
${PROJECT_NAME}/translationeditor/translationeditor.ui
${PROJECT_NAME}/databrowser/lrdatabrowser.qrc
${PROJECT_NAME}/items/items.qrc
${PROJECT_NAME}/objectinspector/lobjectinspector.qrc
${PROJECT_NAME}/report.qrc
${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.qrc
${PROJECT_NAME}/translationeditor/translationeditor.qrc
)
if(ENABLE_DIALOG_DESIGNER)
set(DIALOG_DESIGNER_SOURCES
${PROJECT_NAME}/dialogdesigner/lrdialogdesigner.h
${PROJECT_NAME}/dialogdesigner/3rdparty/qtcreator/namespace_global.h
${PROJECT_NAME}/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/formresizer.h
${PROJECT_NAME}/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/sizehandlerect.h
${PROJECT_NAME}/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/widgethost.h
${PROJECT_NAME}/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/widgethostconstants.h
${PROJECT_NAME}/dialogdesigner/lrdialogdesigner.cpp
${PROJECT_NAME}/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/formresizer.cpp
${PROJECT_NAME}/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/sizehandlerect.cpp
${PROJECT_NAME}/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/widgethost.cpp
${PROJECT_NAME}/dialogdesigner/templates/Dialog.ui
${PROJECT_NAME}/dialogdesigner/dialogdesigner.qrc)
message(STATUS "DesignerComponents found")
list( APPEND LIMEREPORT_SOURCES ${DIALOG_DESIGNER_SOURCES} )
endif()
if (ENABLE_ZINT)
list(APPEND LIMEREPORT_SOURCES ${PROJECT_NAME}/items/lrbarcodeitem.cpp)
list(APPEND LIMEREPORT_SOURCES ${PROJECT_NAME}/items/lrbarcodeitem.h)
endif(ENABLE_ZINT)
if (LIMEREPORT_STATIC)
list(APPEND LIMEREPORT_SOURCES ${PROJECT_NAME}/lrfactoryinitializer.cpp)
list(APPEND LIMEREPORT_SOURCES ${PROJECT_NAME}/lrfactoryinitializer.h)
endif(LIMEREPORT_STATIC)
set(EXTRA_FILES
${PROJECT_NAME}/lrglobal.h
${PROJECT_NAME}/lrdatasourcemanagerintf.h
${PROJECT_NAME}/lrdatasourceintf.h
${PROJECT_NAME}/lrreportengine.h
${PROJECT_NAME}/lrscriptenginemanagerintf.h
${PROJECT_NAME}/lrcallbackdatasourceintf.h
${PROJECT_NAME}/lrpreviewreportwidget.h
${PROJECT_NAME}/lrreportdesignwindowintrerface.h
${PROJECT_NAME}/lrpreparedpagesintf.h
)
set(GLOBAL_HEADERS
${PROJECT_NAME}/LimeReport
${PROJECT_NAME}/LRCallbackDS
${PROJECT_NAME}/LRDataManager
${PROJECT_NAME}/LRScriptManager
${CMAKE_BINARY_DIR}/limereport/version.h
)
set(PROJECT_NAME ${PROJECT_NAME}-qt${QT_VERSION_MAJOR})
if (LIMEREPORT_STATIC)
message(STATUS "STATIC LIBRARY")
add_library(${PROJECT_NAME} STATIC ${EXTRA_FILES} ${LIMEREPORT_SOURCES})
target_compile_definitions( ${PROJECT_NAME} PUBLIC -DHAVE_STATIC_BUILD)
else()
add_library(${PROJECT_NAME} SHARED ${EXTRA_FILES} ${LIMEREPORT_SOURCES})
target_compile_definitions( ${PROJECT_NAME} PRIVATE -DLIMEREPORT_EXPORTS)
target_compile_definitions( ${PROJECT_NAME} INTERFACE -DLIMEREPORT_IMPORTS)
endif()
if(HAVE_UI_LOADER)
target_compile_definitions( ${PROJECT_NAME} PRIVATE -DHAVE_UI_LOADER)
target_link_libraries( ${PROJECT_NAME} PUBLIC
Qt${QT_VERSION_MAJOR}::UiTools)
endif()
target_link_libraries( ${PROJECT_NAME} PUBLIC
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Qml
Qt${QT_VERSION_MAJOR}::Xml
Qt${QT_VERSION_MAJOR}::Sql
Qt${QT_VERSION_MAJOR}::PrintSupport
Qt${QT_VERSION_MAJOR}::Svg)
if(ENABLE_DIALOG_DESIGNER)
target_compile_definitions(${PROJECT_NAME} PUBLIC -DHAVE_QTDESIGNER_INTEGRATION)
if(${QT_VERSION_MAJOR} STREQUAL 5)
target_link_libraries( ${PROJECT_NAME} PUBLIC
Qt${QT_VERSION_MAJOR}::Designer
Qt${QT_VERSION_MAJOR}::DesignerComponents)
endif()
if(${QT_VERSION_MAJOR} STREQUAL 6)
target_link_libraries( ${PROJECT_NAME} PUBLIC
Qt${QT_VERSION_MAJOR}::Designer
Qt${QT_VERSION_MAJOR}::DesignerComponentsPrivate)
endif()
target_include_directories( ${PROJECT_NAME} PRIVATE
limereport/dialogdesigner/3rdparty/qtcreator
limereport/dialogdesigner/3rdparty/designer
limereport/dialogdesigner/3rdparty/qtcreator/designerintegrationv2)
target_include_directories( ${PROJECT_NAME} PRIVATE
${CMAKE_PREFIX_PATH}/include/QtDesigner/${QT_VERSION}/QtDesigner/private)
endif(ENABLE_DIALOG_DESIGNER)
if(ENABLE_ZINT)
target_link_libraries( ${PROJECT_NAME} PRIVATE QZint)
endif(ENABLE_ZINT)
target_compile_definitions( ${PROJECT_NAME} PRIVATE -DDEFAULT_ITEM_PADDING=${DEFAULT_ITEM_PADDING} -DHAVE_QT${QT_VERSION_MAJOR} -DHAVE_REPORT_DESIGNER -DUSE_QJSENGINE -D_CRT_SECURE_NO_WARNINGS)
target_include_directories( ${PROJECT_NAME} PRIVATE
limereport/
limereport/base
limereport/bands
limereport/databrowser
limereport/items/editors
limereport/items
limereport/objectinspector
limereport/scriptbrowser
limereport/serializators
limereport/scripteditor )
target_include_directories( ${PROJECT_NAME} PUBLIC
${CMAKE_BINARY_DIR}/limereport )
target_include_directories( ${PROJECT_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/include)
list (APPEND GLOBAL_HEADERS ${EXTRA_FILES})
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${GLOBAL_HEADERS}")
install(TARGETS
${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/limereport)