File: CMakeLists.txt

package info (click to toggle)
kdevelop 4%3A24.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 71,888 kB
  • sloc: cpp: 290,869; python: 3,626; javascript: 3,518; sh: 1,316; ansic: 703; xml: 401; php: 95; lisp: 66; makefile: 31; sed: 12
file content (138 lines) | stat: -rw-r--r-- 3,458 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
add_definitions(-DTRANSLATION_DOMAIN=\"kdevcmake\")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/parser)

if(BUILD_TESTING)
    add_subdirectory(tests)
endif()
add_subdirectory(icons)

declare_qt_logging_category(cmake_LOG_SRCS
    TYPE PLUGIN
    IDENTIFIER CMAKE
    CATEGORY_BASENAME "cmake"
)

declare_qt_logging_category(cmake_testing_LOG_SRCS
    TYPE PLUGIN
    HEADER "debug_testing.h"
    IDENTIFIER CMAKE_TESTING
    CATEGORY_BASENAME "cmake.testing"
    DESCRIPTION "cmake testing"
)

set( cmakecommon_SRCS
  parser/cmListFileLexer.c
  parser/cmakecachereader.cpp
  parser/cmakelistsparser.cpp
  parser/cmakeduchaintypes.cpp
  cmakeutils.cpp
  cmakeextraargumentshistory.cpp
  cmakebuilddirchooser.cpp
  cmakeserver.cpp
  cmakefileapi.cpp
  cmakeprojectdata.cpp
  ${cmake_LOG_SRCS}
)
set_source_files_properties(parser/cmListFileLexer.c PROPERTIES COMPILE_FLAGS "-DYY_NO_INPUT -DYY_NO_UNPUT")

set( cmakecommon_UI
  cmakebuilddirchooser.ui
)

set( cmakemanager_SRCS
  testing/ctestutils.cpp
  testing/ctestfindjob.cpp
  testing/ctestrunjob.cpp
  testing/ctestsuite.cpp
  testing/qttestdelegate.cpp
  cmakeimportjsonjob.cpp
  cmakeserverimportjob.cpp
  cmakefileapiimportjob.cpp
  cmakenavigationwidget.cpp
  cmakemanager.cpp
  cmakemodelitems.cpp
  duchain/cmakeparsejob.cpp
  duchain/usebuilder.cpp
  duchain/declarationbuilder.cpp
  duchain/contextbuilder.cpp
  cmakecodecompletionmodel.cpp
  ${cmake_LOG_SRCS}
  ${cmake_testing_LOG_SRCS}
)

set( cmakesettings_SRCS
  settings/cmakepreferences.cpp
  settings/cmakecachemodel.cpp
  settings/cmakecachedelegate.cpp
  settings/cmakecachemodel.cpp
)
ki18n_wrap_ui(cmakesettings_SRCS settings/cmakebuildsettings.ui)

set( cmakedoc_SRCS
  cmakedocumentation.cpp
  cmakehelpdocumentation.cpp
  cmakecommandscontents.cpp
)

if(MSVC)
    add_definitions(-DYY_NO_UNISTD_H)
endif()

# Note: This library doesn't follow API/ABI/BC rules and shouldn't have a SOVERSION
#       Its only purpose is to support the plugin without needing to add all source files
#       to the plugin target

kconfig_add_kcfg_files( cmakecommon_SRCS cmakebuilderconfig.kcfgc )
ki18n_wrap_ui( cmakecommon_SRCS ${cmakecommon_UI} )
kdevelop_add_private_library(KDevCMakeCommon SOURCES ${cmakecommon_SRCS})
target_link_libraries(KDevCMakeCommon
    PUBLIC
        kdevmakefileresolver
        KDev::Interfaces
        KDev::Project
        KDev::Util
        KDev::Language
        KF6::TextEditor
        KF6::KIOWidgets
)

add_library( kdevcmakemanagernosettings STATIC ${cmakemanager_SRCS})
target_compile_definitions(kdevcmakemanagernosettings PRIVATE CMAKEMANAGER_NO_SETTINGS)
target_link_libraries(kdevcmakemanagernosettings
    KDevCMakeCommon
    KDev::Util
    KDev::Interfaces
    KDev::Project
    KDev::Language
    KDev::Sublime
    KDev::OutputView
    KF6::KIOWidgets
    KF6::TextEditor
    Qt::Concurrent
)

kdevplatform_add_plugin(KDevCMakeManager SOURCES ${cmakemanager_SRCS} ${cmakesettings_SRCS})
target_link_libraries(KDevCMakeManager
    KDevCMakeCommon
    KDev::Util
    KDev::Interfaces
    KDev::Project
    KDev::Language
    KDev::Shell
    KDev::OutputView
    KF6::KIOWidgets
    KF6::TextEditor
    Qt::Concurrent
)

kdevplatform_add_plugin(KDevCMakeDocumentation SOURCES ${cmakedoc_SRCS})
target_link_libraries(KDevCMakeDocumentation
    KDevCMakeCommon
    KDev::Interfaces
    KDev::Project
    KDev::Language
    KDev::Documentation
    KDev::Sublime
    KF6::ItemModels
    KF6::TextEditor
)