Warning, /kdevelop/kdev-css/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.0)
0002 project(css)
0003 
0004 set(VERSION_MAJOR 4)
0005 set(VERSION_MINOR 90)
0006 set(VERSION_PATCH 90)
0007 
0008 set(CMAKE_CXX_STANDARD 17)
0009 set(CMAKE_CXX_STANDARD_REQUIRED YES)
0010 
0011 find_package (ECM "5.14.0" REQUIRED NO_MODULE)
0012 message(STATUS "${CMAKE_MODULE_PATH}")
0013 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0014 message(STATUS "${CMAKE_MODULE_PATH}")
0015 
0016 include(KDECompilerSettings NO_POLICY_SCOPE)
0017 include(ECMAddTests)
0018 include(ECMQtDeclareLoggingCategory)
0019 include(KDEInstallDirs)
0020 include(KDECMakeSettings)
0021 include(GenerateExportHeader)
0022 include(FeatureSummary)
0023 
0024 set(QT_MIN_VERSION "5.5.0")
0025 find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets Test)
0026 set(KF5_DEP_VERSION "5.15.0")
0027 find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS
0028     I18n
0029     TextEditor
0030 )
0031 set(KDEVPLATFORM_DEP_VERSION "5.2.80")
0032 find_package(KDevPlatform ${KDEVPLATFORM_DEP_VERSION} CONFIG)
0033 set_package_properties(KDevPlatform PROPERTIES
0034     TYPE REQUIRED
0035 )
0036 
0037 configure_file(
0038   "${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake"
0039   "${CMAKE_CURRENT_BINARY_DIR}/version.h"
0040   @ONLY
0041 )
0042 
0043 find_package(KDevelop-PG-Qt CONFIG)
0044 set_package_properties(KDevelop-PG-Qt PROPERTIES
0045     TYPE REQUIRED
0046 )
0047 
0048 find_package(FLEX)
0049 set_package_properties(FLEX PROPERTIES
0050     TYPE REQUIRED
0051 )
0052 
0053 add_definitions(-DTRANSLATION_DOMAIN=\"kdevcss\")
0054 
0055 include_directories(
0056     ${CMAKE_CURRENT_BINARY_DIR} # debug.h
0057     ${CMAKE_CURRENT_BINARY_DIR}/parser
0058     ${FLEX_INCLUDE_DIRS}
0059     ${KDEVPGQT_INCLUDE_DIR}
0060 )
0061 
0062 ecm_qt_declare_logging_category(kdevcss_LOG_SRCS
0063     HEADER debug.h
0064     IDENTIFIER KDEV_CSS
0065     CATEGORY_NAME "kdevelop.languages.css"
0066 )
0067 
0068 add_subdirectory(parser)
0069 
0070 set(kdevcss_PART_SRCS
0071     csslanguagesupport.cpp
0072     completion/model.cpp
0073     completion/contentassistdata.cpp
0074     parsejob.cpp
0075     duchain/builders/contextbuilder.cpp
0076     duchain/builders/declarationbuilder.cpp
0077     navigation/fieldnavigationcontext.cpp
0078     navigation/navigationwidget.cpp
0079     navigation/valuenavigationcontext.cpp
0080     navigation/colornavigationcontext.cpp
0081     ${kdevcss_LOG_SRCS}
0082 )
0083 
0084 qt5_add_resources(kdevcss_PART_SRCS kdevcssresources.qrc)
0085 
0086 kdevplatform_add_plugin(kdevcsssupport JSON kdevcsssupport.json
0087     SOURCES ${kdevcss_PART_SRCS})
0088 target_link_libraries(kdevcsssupport
0089     kdev4cssparser
0090 
0091     KDev::Interfaces
0092     KDev::Language
0093 
0094     KF5::I18n
0095     KF5::TextEditor
0096 )
0097 
0098 # kdebugsettings file
0099 install(FILES kdevcsssupport.categories DESTINATION ${KDE_INSTALL_CONFDIR})
0100 
0101 ### next target
0102 set(completionmodeltest_SRCS
0103     completion/test/modeltest.cpp
0104     completion/model.cpp
0105     completion/contentassistdata.cpp
0106     ##TODO: put this into a shared lib
0107     duchain/tests/duchaintestbase.cpp
0108     duchain/builders/contextbuilder.cpp
0109     duchain/builders/declarationbuilder.cpp
0110     ${kdevcss_LOG_SRCS}
0111 )
0112 
0113 qt5_add_resources(completionmodeltest_SRCS kdevcssresources.qrc)
0114 
0115 ecm_add_test(${completionmodeltest_SRCS}
0116     TEST_NAME completionmodeltest
0117     LINK_LIBRARIES
0118         Qt5::Test
0119         kdev4cssparser
0120         KDev::Interfaces KDev::Language KDev::Tests
0121         KF5::I18n KF5::TextEditor
0122 )
0123 
0124 ### next target
0125 set(duchaintest_SRCS
0126     duchain/tests/duchain.cpp
0127     duchain/tests/duchaintestbase.cpp
0128     duchain/builders/contextbuilder.cpp
0129     duchain/builders/declarationbuilder.cpp
0130     ${kdevcss_LOG_SRCS}
0131 )
0132 ecm_add_test(${duchaintest_SRCS}
0133     TEST_NAME duchaintest
0134     LINK_LIBRARIES
0135         kdev4cssparser
0136         Qt5::Test
0137         KDev::Interfaces KDev::Language KDev::Tests
0138         KF5::I18n KF5::TextEditor
0139 )
0140 
0141 ### next target
0142 set(parsejobtest_SRCS
0143     duchain/tests/parsejobtest.cpp
0144 )
0145 ecm_add_test(${parsejobtest_SRCS}
0146     TEST_NAME parsejobtest
0147     LINK_LIBRARIES
0148         Qt5::Test
0149         KDev::Interfaces KDev::Language KDev::Tests
0150         KF5::I18n KF5::TextEditor
0151 )
0152 
0153 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)