Conversion to the cmake building system.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
gregory guy 3 years ago committed by Slávek Banko
parent fb461bbd2b
commit 8e16b376dc
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668
  1. 79
      CMakeLists.txt
  2. 32
      ConfigureChecks.cmake
  3. 8
      config.h.cmake
  4. 123
      src/CMakeLists.txt
  5. 17
      src/makelayout.ui
  6. 14
      src/newprojectlayout.ui
  7. 10
      src/openprojectlayout.ui
  8. 16
      src/preffrontendlayout.ui
  9. 8
      src/symbollayout.ui
  10. 6
      src/welcomedlg.ui

@ -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 )

@ -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 )

@ -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@

@ -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
)

@ -233,13 +233,12 @@
<slot access="protected">slotMake()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>ktextbrowser.h</includehint>
<includehint>queryview.h</includehint>
</includehints>
<includes>
<include location="global" impldecl="in implementation">kpushbutton.h</include>
<include location="global" impldecl="in implementation">kcombobox.h</include>
<include location="global" impldecl="in implementation">klineedit.h</include>
<include location="global" impldecl="in implementation">kurlrequester.h</include>
<include location="global" impldecl="in implementation">ktextbrowser.h</include>
<include location="local" impldecl="in implementation">queryview.h</include>
</includes>
</UI>

@ -767,12 +767,10 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<slot access="protected">slotAvailTypesChanged(const TQString&amp;)</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
</includehints>
<includes>
<include location="global" impldecl="in implementation">kpushbutton.h</include>
<include location="global" impldecl="in implementation">kcombobox.h</include>
<include location="global" impldecl="in implementation">klineedit.h</include>
<include location="global" impldecl="in implementation">kurlrequester.h</include>
</includes>
</UI>

@ -194,9 +194,9 @@
<slot access="protected">slotProjectSelected(const TQString&amp;)</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
</includehints>
<includes>
<include location="global" impldecl="in implementation">kpushbutton.h</include>
<include location="global" impldecl="in implementation">klineedit.h</include>
<include location="global" impldecl="in implementation">kurlrequester.h</include>
</includes>
</UI>

@ -179,15 +179,9 @@
<tabstops>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
</includehints>
<includes>
<include location="global" impldecl="in implementation">kpushbutton.h</include>
<include location="global" impldecl="in implementation">kurlrequester.h</include>
<include location="global" impldecl="in implementation">klineedit.h</include>
</includes>
</UI>

@ -290,8 +290,8 @@
<tabstop>m_pContainRadio</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>
</includehints>
<includes>
<include location="global" impldecl="in implementation">kcombobox.h</include>
<include location="global" impldecl="in implementation">klineedit.h</include>
</includes>
</UI>

@ -120,7 +120,7 @@ Enjoy!
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>ktextbrowser.h</includehint>
</includehints>
<includes>
<include location="global" impldecl="in implementation">ktextbrowser.h</include>
</includes>
</UI>

Loading…
Cancel
Save