From 970528b7299b0bd73b663e0b73eca25abb382c76 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Thu, 23 Apr 2020 11:23:38 +0200 Subject: Conversion to the cmake building system. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gregory guy Signed-off-by: Slávek Banko (cherry picked from commit 8e16b376dc531edfdf7b7d8dc13d3d9a15d81c0c) --- src/CMakeLists.txt | 123 ++++++++++++++++++++++++++++++++++++++++++++++ src/makelayout.ui | 17 +++---- src/newprojectlayout.ui | 14 +++--- src/openprojectlayout.ui | 10 ++-- src/preffrontendlayout.ui | 16 ++---- src/symbollayout.ui | 8 +-- src/welcomedlg.ui | 6 +-- 7 files changed, 154 insertions(+), 40 deletions(-) create mode 100644 src/CMakeLists.txt (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..12efd27 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,123 @@ + +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_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.cc + COMMAND ${FLEX_EXECUTABLE} + ARGS ${CMAKE_CURRENT_SOURCE_DIR}/dotscan.lpp + COMMAND ${CMAKE_COMMAND} + ARGS -E rename lex.yy.c dotscan.cc + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dotscan.lpp +) + +add_custom_target( + dotscan.lex + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dotscan.cc +) + +##### 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.cc + 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( kscope ) + + +##### other data + +install( + FILES kscopeui.rc kscope_config + DESTINATION ${DATA_INSTALL_DIR}/kscope +) + +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}/kscope/pics +) + +install( FILES kscope.desktop + DESTINATION ${APPS_INSTALL_DIR}/Development +) diff --git a/src/makelayout.ui b/src/makelayout.ui index d36dae1..eb3dcfd 100644 --- a/src/makelayout.ui +++ b/src/makelayout.ui @@ -233,13 +233,12 @@ slotMake() - - kcombobox.h - klineedit.h - kurlrequester.h - klineedit.h - kpushbutton.h - ktextbrowser.h - queryview.h - + + kpushbutton.h + kcombobox.h + klineedit.h + kurlrequester.h + ktextbrowser.h + queryview.h + diff --git a/src/newprojectlayout.ui b/src/newprojectlayout.ui index 4374e3c..830579f 100644 --- a/src/newprojectlayout.ui +++ b/src/newprojectlayout.ui @@ -767,12 +767,10 @@ path for all source files, but is not required.</blockquote> slotAvailTypesChanged(const TQString&) - - kurlrequester.h - klineedit.h - kpushbutton.h - kurlrequester.h - klineedit.h - kpushbutton.h - + + kpushbutton.h + kcombobox.h + klineedit.h + kurlrequester.h + diff --git a/src/openprojectlayout.ui b/src/openprojectlayout.ui index a1c24b4..a346e15 100644 --- a/src/openprojectlayout.ui +++ b/src/openprojectlayout.ui @@ -194,9 +194,9 @@ slotProjectSelected(const TQString&) - - kurlrequester.h - klineedit.h - kpushbutton.h - + + kpushbutton.h + klineedit.h + kurlrequester.h + diff --git a/src/preffrontendlayout.ui b/src/preffrontendlayout.ui index 71afeed..0487089 100644 --- a/src/preffrontendlayout.ui +++ b/src/preffrontendlayout.ui @@ -179,15 +179,9 @@ - - kurlrequester.h - klineedit.h - kpushbutton.h - kurlrequester.h - klineedit.h - kpushbutton.h - kurlrequester.h - klineedit.h - kpushbutton.h - + + kpushbutton.h + kurlrequester.h + klineedit.h + diff --git a/src/symbollayout.ui b/src/symbollayout.ui index 4ffe188..a0bf353 100644 --- a/src/symbollayout.ui +++ b/src/symbollayout.ui @@ -290,8 +290,8 @@ m_pContainRadio - - kcombobox.h - klineedit.h - + + kcombobox.h + klineedit.h + diff --git a/src/welcomedlg.ui b/src/welcomedlg.ui index dde3cdd..09398be 100644 --- a/src/welcomedlg.ui +++ b/src/welcomedlg.ui @@ -120,7 +120,7 @@ Enjoy! - - ktextbrowser.h - + + ktextbrowser.h + -- cgit v1.2.1