Warning, /graphics/kdiagram/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 2.8.12) 0002 0003 project( kdiagram ) 0004 0005 set(KF5_MIN_VERSION "5.60.0") 0006 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) 0007 0008 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) 0009 0010 include(KDEInstallDirs) 0011 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0012 include(KDECMakeSettings) 0013 0014 include(FeatureSummary) 0015 include(GenerateExportHeader) 0016 0017 include(ECMGenerateHeaders) 0018 include(ECMSetupVersion) 0019 include(ECMPackageConfigHelpers) 0020 include(ECMGeneratePriFile) 0021 include(ECMPoQmTools) 0022 include(ECMAddTests) 0023 set(QT_REQUIRED_VERSION "5.12.0") 0024 0025 include(CMakeDependentOption) 0026 0027 set(HAS_ECMAddQch TRUE) 0028 include(ECMAddQch) 0029 0030 cmake_dependent_option(BUILD_QCH 0031 "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF 0032 "HAS_ECMAddQch" OFF 0033 ) 0034 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") 0035 0036 find_package(Qt5 ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE 0037 COMPONENTS 0038 PrintSupport 0039 Svg 0040 Widgets 0041 ) 0042 if(BUILD_TESTING) 0043 find_package(Qt5Test QUIET) 0044 if (NOT Qt5Test_FOUND) 0045 message(STATUS "Qt5Test not found, unit tests will not be built.") 0046 endif() 0047 endif() 0048 0049 find_package(Qt5Sql QUIET) 0050 if (NOT Qt5Sql_FOUND) 0051 message(STATUS "Qt5Sql not found, examples with SQL will not be built.") 0052 endif() 0053 0054 # We want users of kdiagram libs to be able to use the lib without interference with Qt-specific keywords, e.g. "signals" that collides with Boost's Signals 0055 add_definitions( 0056 -DQT_NO_KEYWORDS 0057 -Demit= 0058 ) 0059 add_definitions( 0060 -DQT_NO_STL 0061 -DQT_FATAL_ASSERT 0062 -DUSE_EXCEPTIONS 0063 ) 0064 0065 # TODO: port from .pro 0066 # NOMINMAX avoids conflicting definitions of min and max 0067 # _USE_MATH_DEFINES makes M_PI defined 0068 # win32 { 0069 # !win32-g++ { 0070 # DEFINES += NOMINMAX _USE_MATH_DEFINES 0071 # QMAKE_CXXFLAGS += /GR /EHsc /wd4251 0072 # } 0073 # } 0074 0075 # TODO: port g++.pri to cmake and check what is still needed 0076 0077 0078 ecm_install_po_files_as_qm(poqm) 0079 0080 add_subdirectory( src ) 0081 0082 if(BUILD_TESTING) 0083 add_subdirectory( examples ) 0084 add_subdirectory( tests ) 0085 0086 if(Qt5Test_FOUND) 0087 add_subdirectory( qtests ) 0088 endif() 0089 endif() 0090 0091 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)