diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4090b95 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,79 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 2.8 ) + + +#### general package setup + +project( kscope ) +set( VERSION R14.1.0 ) + + +#### include essential cmake modules + +include( FindPkgConfig ) +include( CheckFunctionExists ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckIncludeFileCXX ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) + + +#### include our cmake modules + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### global compiler settings + +add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST ) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) + + +##### directories + +add_subdirectory( src ) +#tde_conditional_add_subdirectory( BUILD_DOC doc ) +#tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..50718fc --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,32 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +# required stuff +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) + + +##### check for yacc (bison) + +find_program( BISON_EXECUTABLE bison ) +find_program( FLEX_EXECUTABLE NAMES flex lex ) diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..61ede3a --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,8 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ 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 +