Warning, /graphics/kdiagram/src/KGantt/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 set( KGANTTLIB_VERSION "3.0.1" ) 0002 0003 ecm_setup_version(${KGANTTLIB_VERSION} 0004 VARIABLE_PREFIX KGANTT 0005 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kgantt_version.h" 0006 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KGantt6ConfigVersion.cmake" 0007 SOVERSION 3 0008 ) 0009 0010 if(BUILD_TESTING) 0011 if(Qt6Test_FOUND) 0012 add_subdirectory(test) 0013 endif() 0014 endif() 0015 0016 # TODO: remove this, code should be built the same with and without unit tests 0017 # those KGantt unit tests which are enabled in the sources should be moved into own files 0018 if(NOT BUILD_TESTING) 0019 add_definitions(-DKDAB_NO_UNIT_TESTS) 0020 endif() 0021 0022 set( kgantt_LIB_SRCS 0023 kganttglobal.cpp 0024 kganttprintingcontext.cpp 0025 kganttview.cpp 0026 kganttstyleoptionganttitem.cpp 0027 kganttgraphicsview.cpp 0028 kganttabstractrowcontroller.cpp 0029 kgantttreeviewrowcontroller.cpp 0030 kganttlistviewrowcontroller.cpp 0031 kganttgraphicsscene.cpp 0032 kganttgraphicsitem.cpp 0033 kganttconstraint.cpp 0034 kganttconstraintproxy.cpp 0035 kganttconstraintgraphicsitem.cpp 0036 kganttitemdelegate.cpp 0037 kganttforwardingproxymodel.cpp 0038 kganttsummaryhandlingproxymodel.cpp 0039 kganttproxymodel.cpp 0040 kganttconstraintmodel.cpp 0041 kganttabstractgrid.cpp 0042 kganttdatetimegrid.cpp 0043 kganttlegend.cpp 0044 kganttdatetimetimeline.cpp 0045 kganttdatetimetimelinedialog.cpp 0046 kganttpenstylecombobox.cpp 0047 unittest/test.cpp 0048 unittest/testregistry.cpp 0049 ) 0050 0051 qt_wrap_ui(kgantt_LIB_SRCS 0052 kganttdatetimetimelinedialog.ui 0053 ) 0054 0055 ecm_create_qm_loader(kgantt_LIB_SRCS kgantt6_qt) 0056 0057 add_library( KGantt6 ${kgantt_LIB_SRCS} ) 0058 0059 generate_export_header( KGantt6 BASE_NAME KGantt ) 0060 0061 target_include_directories(KGantt6 0062 INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/KGantt6>" 0063 ) 0064 0065 target_link_libraries( KGantt6 0066 PUBLIC 0067 Qt::Widgets 0068 PRIVATE 0069 Qt::PrintSupport 0070 ) 0071 0072 set_target_properties( KGantt6 PROPERTIES 0073 VERSION ${KGANTT_VERSION} 0074 SOVERSION ${KGANTT_SOVERSION} 0075 EXPORT_NAME "KGantt6" 0076 ) 0077 0078 install( TARGETS KGantt6 0079 EXPORT KGantt6Targets 0080 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) 0081 0082 ecm_generate_headers(kgantt_LIB_HEADERS 0083 HEADER_NAMES 0084 KGanttGlobal 0085 KGanttPrintingContext 0086 KGanttView 0087 KGanttStyleOptionGanttItem 0088 KGanttGraphicsView 0089 KGanttAbstractRowController 0090 KGanttTreeViewRowController 0091 KGanttListViewRowController 0092 KGanttGraphicsScene 0093 KGanttGraphicsItem 0094 KGanttConstraint 0095 KGanttConstraintProxy 0096 KGanttConstraintGraphicsItem 0097 KGanttItemDelegate 0098 KGanttForwardingProxyModel 0099 KGanttSummaryHandlingProxyModel 0100 KGanttProxyModel 0101 KGanttConstraintModel 0102 KGanttAbstractGrid 0103 KGanttDateTimeGrid 0104 KGanttLegend 0105 KGanttDateTimeTimeLine 0106 KGanttDateTimeTimeLineDialog 0107 KGanttPenStyleComboBox 0108 0109 REQUIRED_HEADERS kgantt_LIB_HEADERS 0110 ) 0111 0112 install(FILES 0113 ${CMAKE_CURRENT_BINARY_DIR}/kgantt_export.h 0114 ${kgantt_LIB_HEADERS} 0115 kganttabstractgrid_p.h 0116 DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KGantt6 0117 COMPONENT Devel) 0118 0119 install(FILES 0120 ${CMAKE_CURRENT_BINARY_DIR}/kgantt_version.h 0121 DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KGantt6 COMPONENT Devel) 0122 0123 if(BUILD_QCH) 0124 ecm_add_qch( 0125 KGantt6_QCH 0126 NAME KGantt6 0127 VERSION ${KGANTTLIB_VERSION} 0128 ORG_DOMAIN org.kde 0129 SOURCES 0130 Mainpage.dox 0131 ${kgantt_LIB_HEADERS} 0132 ${kgantt_LIB_SRCS} 0133 LINK_QCHS 0134 Qt6Core_QCH 0135 Qt6Widgets_QCH 0136 BLANK_MACROS 0137 KGANTT_EXPORT 0138 KGANTT_DEPRECATED 0139 TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0140 QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0141 COMPONENT Devel 0142 ) 0143 endif() 0144 0145 # create a Config.cmake and a ConfigVersion.cmake file and install them 0146 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KGantt6") 0147 0148 if (BUILD_QCH) 0149 ecm_install_qch_export( 0150 TARGETS KGantt6_QCH 0151 FILE KGantt6QchTargets.cmake 0152 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0153 COMPONENT Devel 0154 ) 0155 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KGantt6QchTargets.cmake\")") 0156 endif() 0157 0158 configure_package_config_file( 0159 "${CMAKE_CURRENT_SOURCE_DIR}/KGantt6Config.cmake.in" 0160 "${CMAKE_CURRENT_BINARY_DIR}/KGantt6Config.cmake" 0161 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0162 ) 0163 0164 install(FILES 0165 "${CMAKE_CURRENT_BINARY_DIR}/KGantt6Config.cmake" 0166 "${CMAKE_CURRENT_BINARY_DIR}/KGantt6ConfigVersion.cmake" 0167 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0168 COMPONENT Devel) 0169 0170 install(EXPORT KGantt6Targets 0171 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0172 FILE KGantt6Targets.cmake) 0173 0174 ecm_generate_pri_file( 0175 VERSION ${KGANTTLIB_VERSION} 0176 BASE_NAME KGantt6 0177 LIB_NAME KGantt6 0178 DEPS "widgets printsupport" 0179 FILENAME_VAR PRI_FILENAME 0180 INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR}/KGantt 0181 ) 0182 0183 install(FILES ${PRI_FILENAME} 0184 DESTINATION ${ECM_MKSPECS_INSTALL_DIR})