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