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