summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
blob: d62546c6efbc46149e40b6aa88ab4e6a7e006416 (plain)
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

include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${TDE_LIB_DIR}
)

tde_import( kate )

add_custom_command(
    OUTPUT  dotparse.cpp dotparse.hpp
    COMMAND ${BISON_EXECUTABLE}
    ARGS -y --output dotparse.cpp --defines=dotparse.hpp ${CMAKE_CURRENT_SOURCE_DIR}/dotparse.ypp
    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dotparse.ypp
)

add_custom_target(
    dotparse.bison
    DEPENDS
        ${CMAKE_CURRENT_BINARY_DIR}/dotparse.cpp
        ${CMAKE_CURRENT_BINARY_DIR}/dotparse.hpp
)

add_custom_command(
    OUTPUT  dotscan.cpp
    COMMAND ${FLEX_EXECUTABLE}
    ARGS ${CMAKE_CURRENT_SOURCE_DIR}/dotscan.lpp
    COMMAND ${CMAKE_COMMAND}
    ARGS -E rename lex.yy.c dotscan.cpp
    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dotscan.lpp
)

add_custom_target(
    dotscan.lex
    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dotscan.cpp
)

##### kscope (executable)

tde_add_executable( kscope AUTOMOC

  SOURCES
        autocompletionlayout.ui bookmarkslayout.ui
        calltreelayout.ui cscopemsglayout.ui
        fileviewlayout.ui graphpreflayout.ui
        makelayout.ui newprojectlayout.ui
        openprojectlayout.ui prefcolorlayout.ui
        preffontlayout.ui preffrontendlayout.ui
        prefoptlayout.ui projectfileslayout.ui
        queryviewlayout.ui querywidgetlayout.ui
        scanprogresslayout.ui searchresultslayout.ui
        symbollayout.ui welcomedlg.ui
        bookmarksdlg.cpp calltreedlg.cpp
        calltreemanager.cpp configfrontend.cpp
        cscopefrontend.cpp cscopemsgdlg.cpp
        ctagsfrontend.cpp ctagslist.cpp
        dirscanner.cpp dotfrontend.cpp
        editormanager.cpp
        editorpage.cpp editortabs.cpp
        encoder.cpp filelist.cpp
        fileview.cpp frontend.cpp
        graphedge.cpp graphnode.cpp
        graphprefdlg.cpp graphwidget.cpp
        historypage.cpp historyview.cpp
        kscope.cpp kscopeactions.cpp
        kscopeconfig.cpp kscopepixmaps.cpp
        main.cpp makedlg.cpp makefrontend.cpp
        newprojectdlg.cpp openprojectdlg.cpp
        prefcolor.cpp preferencesdlg.cpp
        preffont.cpp preffrontend.cpp
        prefopt.cpp progressdlg.cpp
        project.cpp projectbase.cpp
        projectfilesdlg.cpp projectmanager.cpp
        querypage.cpp querypagebase.cpp
        queryresultsmenu.cpp queryview.cpp
        queryviewdlg.cpp queryviewdriver.cpp
        querywidget.cpp scanprogressdlg.cpp
        searchlist.cpp searchresultsdlg.cpp
        symbolcompletion.cpp symboldlg.cpp
        tabwidget.cpp treewidget.cpp
        ${CMAKE_CURRENT_BINARY_DIR}/dotparse.cpp
        ${CMAKE_CURRENT_BINARY_DIR}/dotscan.cpp
  LINK
     tdeui-shared
     tdeio-shared
     tdecore-shared
     tdeparts-shared
     kateinterfaces-shared
     katepartinterfaces-shared

  DESTINATION ${BIN_INSTALL_DIR}
  DEPENDENCIES dotparse.bison dotscan.lex
)


##### icons

tde_install_icons( ${PROJECT_NAME} )


##### other data

tde_create_translated_desktop( ${PROJECT_NAME}.desktop )

install(
    FILES kscopeui.rc kscope_config
    DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
)

install(
    FILES file_ro.png file_rw.png file_save.png query_locked.png
          query_unlocked.png tab_list.png call_graph.png called_tree.png
          calling_tree.png bookmark.png
    DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/pics
)