Warning, /libraries/kreport/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # Options 0002 simple_option(KREPORT_SCRIPTING "Scripting support using JavaScript language" ON) 0003 0004 if(KREPORT_SCRIPTING) 0005 find_package(Qt5Qml REQUIRED) 0006 set(SCRIPTING_LIBS Qt5::Qml) 0007 endif() 0008 0009 set(kreport_LIB_SRCS 0010 common/kreport_debug.cpp 0011 common/kreportplugin_debug.cpp 0012 common/KReportItemBase.cpp 0013 common/KReportAsyncItemBase.cpp 0014 common/KReportSectionData.cpp 0015 common/KReportLabelSizeInfo.cpp 0016 common/KReportDocument.cpp 0017 common/KReportDetailSectionData.cpp 0018 common/KReportPluginInterface.cpp 0019 common/KReportItemLine.cpp 0020 common/KReportRenderObjects.cpp 0021 common/KReportPluginManager.cpp 0022 common/KReportPluginMetaData.cpp 0023 common/KReportDataSource.cpp 0024 common/KReportUtils.cpp 0025 common/KReportPageSize.cpp 0026 common/KReportUnit.cpp 0027 common/KReportDesign.cpp 0028 common/KReportDesign_p.cpp 0029 common/KReportLineStyle.cpp 0030 common/KReportElement.cpp 0031 ${PROJECT_BINARY_DIR}/src/KReportElement_sdc.cpp 0032 common/KReportSection.cpp 0033 0034 renderer/KReportPrintRenderer_p.cpp 0035 renderer/KReportPreRenderer.cpp 0036 renderer/KReportAsyncItemManager_p.cpp 0037 renderer/KReportScreenRenderer_p.cpp 0038 renderer/KReportHTMLTableRenderer_p.cpp 0039 renderer/KReportHTMLCSSRenderer_p.cpp 0040 #TODO renderer/KReportKSpreadRenderer.cpp 0041 #TODO renderer/KReportODTRenderer.cpp 0042 #TODO renderer/KOdtFrameReportRenderer.cpp 0043 renderer/KReportRendererBase.cpp 0044 renderer/KReportPage.cpp 0045 renderer/KReportView.cpp 0046 renderer/KReportOneRecordDataSource_p.cpp 0047 0048 wrtembed/KReportDetailGroupSectionDialog.cpp 0049 wrtembed/KReportDesignerItemBase.cpp 0050 wrtembed/KReportDesignerItemRectBase.cpp 0051 wrtembed/KReportDesignerItemLine.cpp 0052 wrtembed/KReportDesignerSection.cpp 0053 wrtembed/KReportDesignerSectionDetailGroup.cpp 0054 wrtembed/KReportDesignerSectionDetail.cpp 0055 wrtembed/KReportDesignerSectionScene.cpp 0056 wrtembed/KReportDesignerSectionView.cpp 0057 wrtembed/KReportDesigner.cpp 0058 wrtembed/KReportPropertiesButton.cpp 0059 wrtembed/KReportSectionEditor.cpp 0060 wrtembed/KReportRuler_p.cpp 0061 wrtembed/KReportZoomHandler_p.cpp 0062 wrtembed/KReportZoomMode_p.cpp 0063 0064 items/label/KReportItemLabel.cpp 0065 items/label/KReportDesignerItemLabel.cpp 0066 items/label/KReportLabelPlugin.cpp 0067 items/label/KReportBoundedTextItem.cpp 0068 items/label/KReportLabelElement.cpp 0069 items/label/label.json 0070 0071 items/check/KReportItemCheck.cpp 0072 items/check/KReportDesignerItemCheckBox.cpp 0073 items/check/KReportCheckBoxPlugin.cpp 0074 items/check/check.json 0075 0076 items/field/KReportItemField.cpp 0077 items/field/KReportDesignerItemField.cpp 0078 items/field/KReportFieldPlugin.cpp 0079 items/field/field.json 0080 0081 items/image/KReportItemImage.cpp 0082 items/image/KReportDesignerItemImage.cpp 0083 items/image/KReportImagePlugin.cpp 0084 items/image/image.json 0085 0086 items/text/KReportItemText.cpp 0087 items/text/KReportDesignerItemText.cpp 0088 items/text/KReportTextPlugin.cpp 0089 items/text/text.json 0090 0091 # non-source: 0092 Mainpage.dox 0093 Messages.sh 0094 ) 0095 0096 set(kreport_INCLUDE_DIRS 0097 ${CMAKE_CURRENT_SOURCE_DIR}/common 0098 ${CMAKE_CURRENT_SOURCE_DIR}/wrtembed 0099 ${CMAKE_CURRENT_SOURCE_DIR}/renderer 0100 ) 0101 0102 set(kreport_TARGET_INCLUDE_DIRS 0103 common renderer wrtembed 0104 ) 0105 0106 if(KREPORT_SCRIPTING) 0107 list(APPEND kreport_LIB_SRCS 0108 renderer/scripting/KReportGroupTracker.cpp 0109 renderer/scripting/KReportScriptHandler.cpp 0110 renderer/scripting/KReportScriptConstants.cpp 0111 renderer/scripting/KReportScriptDebug.cpp 0112 renderer/scripting/KReportScriptDraw.cpp 0113 renderer/scripting/KReportScriptReport.cpp 0114 renderer/scripting/KReportScriptSection.cpp 0115 renderer/scripting/KReportScriptLine.cpp 0116 0117 #renderer/odtframe/KoOdtFrameReportDocument.cpp 0118 #renderer/odtframe/KoOdtFrameReportCheckBox.cpp 0119 #renderer/odtframe/KoOdtFrameReportImage.cpp 0120 #renderer/odtframe/KoOdtFrameReportTextBox.cpp 0121 #renderer/odtframe/KoOdtFrameReportLine.cpp 0122 #renderer/odtframe/KoOdtFrameReportPicture.cpp 0123 #renderer/odtframe/KoOdtFrameReportPrimitive.cpp 0124 0125 #renderer/ods/KoSimpleOdsDocument.cpp 0126 #renderer/ods/KoSimpleOdsSheet.cpp 0127 #renderer/ods/KoSimpleOdsCell.cpp 0128 0129 items/label/KReportScriptLabel.cpp 0130 items/check/KReportScriptCheck.cpp 0131 items/field/KReportScriptField.cpp 0132 items/image/KReportScriptImage.cpp 0133 items/text/KReportScriptText.cpp 0134 ) 0135 0136 list(APPEND kreport_INCLUDE_DIRS 0137 ${CMAKE_CURRENT_SOURCE_DIR}/renderer/scripting 0138 ) 0139 0140 list(APPEND kreport_TARGET_INCLUDE_DIRS 0141 renderer/scripting 0142 ) 0143 endif() 0144 0145 qt5_wrap_ui(kreport_LIB_SRCS 0146 wrtembed/KReportDetailGroupSectionDialog.ui 0147 wrtembed/KReportSectionEditor.ui 0148 ) 0149 0150 ecm_create_qm_loader(kreport_LIB_SRCS kreport_qt) 0151 0152 add_library(KReport SHARED ${kreport_LIB_SRCS}) 0153 set_coinstallable_lib_version(KReport) 0154 0155 add_library(KReportUtilsPrivate STATIC 0156 common/KReportUtils_p.cpp 0157 ) 0158 0159 kdb_create_shared_data_classes( 0160 kreport_GENERATED_SHARED_DATA_CLASS_HEADERS # output variable with list of headers 0161 NO_PREFIX # subdirectory in which the headers should be generated 0162 common/KReportLineStyle.shared.h 0163 common/KReportElement.shared.h 0164 common/KReportSection.shared.h 0165 items/label/KReportLabelElement.shared.h 0166 ) 0167 0168 kdb_remove_extensions( 0169 kreport_GENERATED_SHARED_DATA_CLASS_BASENAMES 0170 ${kreport_GENERATED_SHARED_DATA_CLASS_HEADERS} 0171 ) 0172 0173 generate_export_header(KReport) 0174 0175 target_include_directories(KReport 0176 PUBLIC "$<BUILD_INTERFACE:${kreport_INCLUDE_DIRS}>" 0177 INTERFACE "$<INSTALL_INTERFACE:${KREPORT_INCLUDE_INSTALL_DIR}>" 0178 PRIVATE ${kreport_TARGET_INCLUDE_DIRS} 0179 ) 0180 0181 target_link_libraries(KReport 0182 PUBLIC 0183 Qt5::PrintSupport 0184 Qt5::Xml 0185 KF5::CoreAddons 0186 KPropertyWidgets 0187 PRIVATE 0188 ${SCRIPTING_LIBS} 0189 KReportUtilsPrivate 0190 ) 0191 0192 target_link_libraries(KReportUtilsPrivate 0193 PUBLIC 0194 Qt5::Widgets 0195 KF5::ConfigGui 0196 KF5::WidgetsAddons 0197 PRIVATE 0198 Qt5::PrintSupport 0199 ) 0200 0201 ecm_setup_version(${PROJECT_VERSION} 0202 VARIABLE_PREFIX KREPORT 0203 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kreport_version.h" 0204 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KReportConfigVersion.cmake" 0205 ) 0206 0207 install(TARGETS KReport 0208 EXPORT KReportTargets 0209 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) 0210 0211 # Create a Config.cmake and a ConfigVersion.cmake file and install them 0212 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/${KREPORT_BASE_NAME}") 0213 0214 # A place for KReport plugins 0215 set(KREPORT_PLUGIN_INSTALL_DIR ${KDE_INSTALL_PLUGINDIR}/${PROJECT_NAME_LOWER}${PROJECT_STABLE_VERSION_MAJOR}) 0216 0217 configure_package_config_file( 0218 "${CMAKE_CURRENT_SOURCE_DIR}/KReportConfig.cmake.in" 0219 "${CMAKE_CURRENT_BINARY_DIR}/KReportConfig.cmake" 0220 INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0221 ) 0222 0223 install(FILES 0224 "${CMAKE_CURRENT_BINARY_DIR}/KReportConfig.cmake" 0225 "${CMAKE_CURRENT_BINARY_DIR}/KReportConfigVersion.cmake" 0226 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0227 COMPONENT Devel) 0228 0229 install(EXPORT KReportTargets 0230 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0231 FILE KReportTargets.cmake) 0232 0233 ecm_generate_pri_file( 0234 BASE_NAME ${KREPORT_BASE_NAME} 0235 LIB_NAME ${KREPORT_BASE_NAME} 0236 DEPS "widgets" 0237 FILENAME_VAR PRI_FILENAME 0238 INCLUDE_INSTALL_DIR ${KREPORT_INCLUDE_INSTALL_DIR} 0239 ) 0240 0241 install(FILES ${PRI_FILENAME} 0242 DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) 0243 0244 install(FILES kreport_elementplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) 0245 0246 ecm_generate_headers(kreport_FORWARDING_HEADERS 0247 REQUIRED_HEADERS kreport_HEADERS 0248 ORIGINAL CAMELCASE 0249 RELATIVE common 0250 HEADER_NAMES 0251 KReportPageSize 0252 KReportDataSource 0253 KReportItemBase 0254 KReportItemLine 0255 KReportPluginMetaData 0256 KReportPluginManager 0257 KReportPluginInterface 0258 KReportUnit 0259 KReportUtils 0260 KReportDesign 0261 KReportDocument 0262 KReportSectionData 0263 KReportRenderObjects 0264 KReportAsyncItemBase 0265 ) 0266 0267 ecm_generate_headers(kreport_FORWARDING_HEADERS 0268 REQUIRED_HEADERS kreport_HEADERS 0269 ORIGINAL CAMELCASE 0270 RELATIVE renderer 0271 HEADER_NAMES 0272 KReportPage 0273 KReportRendererBase 0274 KReportPreRenderer 0275 KReportView 0276 ) 0277 0278 if(KREPORT_SCRIPTING) 0279 ecm_generate_headers(kreport_FORWARDING_HEADERS 0280 REQUIRED_HEADERS kreport_HEADERS 0281 ORIGINAL CAMELCASE 0282 RELATIVE renderer/scripting 0283 HEADER_NAMES 0284 KReportGroupTracker 0285 KReportScriptConstants 0286 KReportScriptDraw 0287 KReportScriptHandler 0288 KReportScriptSource 0289 ) 0290 endif() 0291 0292 ecm_generate_headers(kreport_FORWARDING_HEADERS 0293 REQUIRED_HEADERS kreport_HEADERS 0294 ORIGINAL CAMELCASE 0295 RELATIVE wrtembed 0296 HEADER_NAMES 0297 KReportDesignerSectionDetail 0298 KReportDesignerSection 0299 KReportDesignerItemBase 0300 KReportDesignerSectionDetailGroup 0301 KReportDesignerItemRectBase 0302 KReportDesigner 0303 ) 0304 0305 ecm_generate_headers(kreport_FORWARDING_HEADERS_FROM_BUILDDIR 0306 REQUIRED_HEADERS kreport_HEADERS_FROM_BUILDDIR 0307 ORIGINAL CAMELCASE 0308 SOURCE_DIR ${PROJECT_BINARY_DIR}/src 0309 HEADER_NAMES 0310 ${kreport_GENERATED_SHARED_DATA_CLASS_BASENAMES} 0311 ) 0312 0313 list(APPEND kreport_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/kreport_version.h) 0314 0315 install( 0316 FILES 0317 ${kreport_HEADERS} 0318 ${kreport_HEADERS_FROM_BUILDDIR} 0319 ${kreport_FORWARDING_HEADERS} 0320 ${kreport_FORWARDING_HEADERS_FROM_BUILDDIR} 0321 ${PROJECT_BINARY_DIR}/src/kreport_export.h 0322 ${PROJECT_BINARY_DIR}/src/config-kreport.h 0323 DESTINATION ${KREPORT_INCLUDE_INSTALL_DIR} 0324 COMPONENT Devel 0325 ) 0326 0327 if(BUILD_QCH) 0328 ecm_add_qch( 0329 KReport_QCH 0330 NAME KReport 0331 BASE_NAME ${KREPORT_BASE_NAME} 0332 VERSION ${PROJECT_VERSION} 0333 ORG_DOMAIN org.kde.${KREPORT_BASE_NAME} 0334 SOURCES 0335 Mainpage.dox 0336 ${kreport_HEADERS} 0337 ${kreport_HEADERS_FROM_BUILDDIR} 0338 LINK_QCHS 0339 Qt5Core_QCH 0340 Qt5Xml_QCH 0341 Qt5Gui_QCH 0342 Qt5Widgets_QCH 0343 Qt5PrintSupport_QCH 0344 KF5CoreAddons_QCH 0345 KPropertyCore_QCH 0346 KPropertyWidgets_QCH 0347 INCLUDE_DIRS 0348 ${CMAKE_CURRENT_BINARY_DIR} 0349 ${kreport_INCLUDE_DIRS} 0350 BLANK_MACROS 0351 KREPORT_EXPORT 0352 KREPORT_DEPRECATED 0353 TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0354 QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0355 COMPONENT Devel 0356 ) 0357 set(kreport_qch_targets KReport_QCH) 0358 endif() 0359 0360 ecm_install_qch_export( 0361 TARGETS ${kreport_qch_targets} 0362 FILE KReportQCHTargets.cmake 0363 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0364 COMPONENT Devel 0365 ) 0366 0367 add_subdirectory(plugins) 0368 add_subdirectory(pics) 0369 0370 enable_testing() 0371 0372 configure_file(config-kreport.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kreport.h)