[kdesdk] added cmake support for "cervisia" and "kapptemplate"

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1228533 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
samelian 14 years ago
parent db22462503
commit 0939625983

@ -0,0 +1,83 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
cmake_minimum_required( VERSION 2.8 )
##### general package setup #####################
project( kdesdk )
set( PACKAGE kdesdk )
set( VERSION "3.5.13" )
##### include essential cmake modules ###########
include( FindPkgConfig )
include( CheckIncludeFile )
include( CheckTypeSize )
include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
include( CheckLibraryExists )
##### 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_ARTS "Enable aRts support" OFF )
##### user requested modules ####################
option( BUILD_ALL "Build all" OFF )
option( BUILD_CERVISIA "Build cervisia" ${BUILD_ALL} )
option( BUILD_KAPPTEMPLATE "Build kapptemplate" ${BUILD_ALL} )
##### configure checks ##########################
include( ConfigureChecks.cmake )
###### global compiler settings #################
add_definitions(
-DHAVE_CONFIG_H
)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
##### activate dependencies #####################
##### kdesdk directories ########################
tde_conditional_add_subdirectory( BUILD_CERVISIA cervisia )
tde_conditional_add_subdirectory( BUILD_KAPPTEMPLATE kapptemplate )
##### write configure files #####################
configure_file( config.h.cmake config.h @ONLY )

@ -0,0 +1,14 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
# required stuff
find_package( TQt )
find_package( TDE )

@ -0,0 +1,96 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
add_subdirectory( cvsservice )
add_subdirectory( pics )
add_definitions( -D_BSD_SOURCE )
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/cervisia/cvsservice
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
)
##### other data ################################
tde_install_icons( )
install( FILES
cervisia.desktop
DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES
cervisiapart.kcfg
DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES
cervisiaui.rc
DESTINATION ${DATA_INSTALL_DIR}/cervisiapart )
install( FILES
cervisiashellui.rc eventsrc
DESTINATION ${DATA_INSTALL_DIR}/cervisia )
install( FILES
cervisia.upd
DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
install( PROGRAMS
move_repositories.pl change_colors.pl
cervisia-normalize_cvsroot.pl cervisia-change_repos_list.pl
DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
##### cervisia (static) #########################
tde_add_library( cervisia STATIC_PIC AUTOMOC
SOURCES
annotatedlg.cpp diffdlg.cpp patchoptiondlg.cpp logdlg.cpp
progressdlg.cpp progressdlg.skel resolvedlg.cpp resolvedlg_p.cpp
annotateview.cpp diffview.cpp loglist.cpp logplainview.cpp
logtree.cpp annotatectl.cpp loginfo.cpp misc.cpp qttableview.cpp
tooltip.cpp cervisiasettings.kcfgc settingsdlg.cpp
settingsdlg_advanced.ui
DEPENDENCIES cvsservice-shared
)
##### libcervisiapart (module) ##################
tde_add_kpart( libcervisiapart AUTOMOC
SOURCES
updateview.cpp protocolview.cpp protocolview.skel watchdlg.cpp
changelogdlg.cpp historydlg.cpp repositorydlg.cpp commitdlg.cpp
checkoutdlg.cpp updatedlg.cpp tagdlg.cpp mergedlg.cpp cvsdir.cpp
repositories.cpp cervisiapart.cpp addrepositorydlg.cpp
addremovedlg.cpp watchersdlg.cpp updateview_items.cpp
updateview_visitors.cpp entry.cpp entry_status.cpp stringmatcher.cpp
cvsinitdlg.cpp ignorelistbase.cpp dirignorelist.cpp
globalignorelist.cpp editwithmenu.cpp logmessageedit.cpp
LINK cervisia-static cvsservice-shared kutils-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### cervisia (kdeinit) ########################
tde_add_kdeinit_executable( cervisia AUTOMOC
SOURCES
main.cpp cervisiashell.cpp
LINK cervisia-static cvsservice-shared kutils-shared
)

@ -0,0 +1,67 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
)
##### headers ###################################
install( FILES
${CMAKE_CURRENT_BINARY_DIR}/cvsservice_stub.h
${CMAKE_CURRENT_BINARY_DIR}/cvsjob_stub.h
${CMAKE_CURRENT_BINARY_DIR}/repository_stub.h
DESTINATION ${INCLUDE_INSTALL_DIR} )
##### other data ################################
install( FILES
cvsservice.desktop
DESTINATION ${SERVICES_INSTALL_DIR} )
##### cvsservice (shared) #######################
tde_add_library( cvsservice SHARED AUTOMOC
SOURCES
cvsservice.stub cvsjob.stub repository.stub
VERSION 0.1.0
LINK kdecore-shared
DESTINATION ${LIB_INSTALL_DIR}
)
##### cvsservice (kdeinit) ######################
tde_add_kdeinit_executable( cvsservice AUTOMOC
SOURCES
main.cpp cvsservice.cpp cvsjob.cpp cvsservice.skel cvsservice.stub
cvsjob.skel cvsjob.stub repository.cpp repository.skel
repository.stub sshagent.cpp cvsserviceutils.cpp cvsloginjob.cpp
cvsloginjob.skel cvsloginjob.stub
LINK kio-shared
)
##### cvsaskpass (kdeinit) ######################
tde_add_kdeinit_executable( cvsaskpass AUTOMOC
SOURCES cvsaskpass.cpp
LINK kdeui-shared
)

@ -0,0 +1,12 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_install_icons( )

@ -0,0 +1,31 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
add_subdirectory( admin )
add_subdirectory( appframework )
add_subdirectory( existing )
add_subdirectory( kapp )
add_subdirectory( kpartapp )
add_subdirectory( kpartplugin )
file( READ VERSION VERSION LIMIT_COUNT 1 )
configure_file( kapptemplate.cmake kapptemplate @ONLY )
install( PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/kapptemplate
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/bin )
install( FILES
kapptemplate.common kapptemplate.module
kpartplugin.module kpartapp.module existing.module
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/include )

@ -0,0 +1,12 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
tde_install_empty_directory( ${DATA_INSTALL_DIR}/kapptemplate/admin )

@ -0,0 +1,18 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
add_subdirectory( no-exe )
install( FILES
AUTHORS INSTALL COPYING NEWS app.lsm app.spec configure.in.in.in
README base-Makefile.am ChangeLog VERSION base-Makefile.cvs
po-Makefile.am
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/appframework )

@ -0,0 +1,14 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
install( FILES
COPYING INSTALL
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/appframework/no-exe )

@ -0,0 +1,14 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
install( FILES
app-Makefile.am app-desktop
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/existing )

@ -0,0 +1,20 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
add_subdirectory( no-exe )
install( FILES
app_client.cpp appview.h index.docbook app-Makefile.am
appiface.h doc-Makefile.am lo16-app-app.png app-configure.in.in
apppref.cpp doc-app-Makefile.am lo32-app-app.png app.cpp apppref.h
hi16-app-app.png main.cpp app-desktop appui.rc hi32-app-app.png
app.h appview.cpp hi48-app-app.png pics-Makefile.am
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/kapp )

@ -0,0 +1,15 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
install( FILES
hi32-app-app.png lo16-app-app.png hi16-app-app.png hi48-app-app.png
lo32-app-app.png
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/kapp/no-exe )

@ -0,0 +1,136 @@
#!/usr/bin/env bash
INSTALLED_SHARE_DIR=@DATA_INSTALL_DIR@/kapptemplate
KAPPTEMPLATEVERSION=@VERSION@
###########################################################################
#
# Function: LoadDefaults
#
# This will load in all the default values stored in the user's
# .kapptemplaterc file
#
# INPUT : $KAPPTEMPLATEVERSION, $INSTALLED_SHARE_DIR
# OUTPUT: $ECHO, $KAPPTEMPLATERC, $DEFAULT_AUTHOR, $DEFAULT_EMAIL,
# $DEFAULT_ROOT, $SHARE_DIR, $BIN_DIR, $MKDIR, $BASENAME
#
###########################################################################
function LoadDefaults
{
# horrid hack to try and figure out what shell we are using
# basically, if we can find /usr/ucb/echo, then we are almost for sure
# NOT on a Linux system and probably 'echo "\c" works. if we don't
# find it, we'll assume that the shell is really bash.
if [ -f "/usr/ucb/echo" ];
then
ECHO="echo";
else
ECHO="echo -e";
fi
# If $MAKE hasn't been set yet, try to figure out how we reach GNU make
# ourselves.
if [ ! "$MAKE" ];
then
if [ -f "/usr/bin/gmake" ] || [ -f "/usr/local/bin/gmake" ];
then
MAKE="gmake";
else
MAKE="make";
fi
fi
$ECHO "KAppTemplate v${KAPPTEMPLATEVERSION} (C) 2003 Kurt Granroth <granroth@kde.org>";
$ECHO;
if [ ! "$KAPPTEMPLATERC" ];
then
KAPPTEMPLATERC=$HOME/.kapptemplaterc
fi
if [ -f $KAPPTEMPLATERC ];
then
. $KAPPTEMPLATERC
else
GetInitialDefaults
fi
if [ ! "$DEFAULT_AUTHOR" ];
then
DEFAULT_AUTHOR="Your Name";
fi
if [ ! "$DEFAULT_EMAIL" ];
then
DEFAULT_EMAIL="`whoami`@$HOST";
fi
if [ ! "$DEFAULT_ROOT" ];
then
DEFAULT_ROOT="$HOME/src";
fi
SHARE_DIR=$INSTALLED_SHARE_DIR;
INCLUDE_DIR="$SHARE_DIR/include";
if [ -f "$SHARE_DIR/bin/mkinstalldirs" ];
then
MKDIR=$SHARE_DIR/bin/mkinstalldirs
else
MKDIR=mkdir
fi
# Finally, get the name of the running program
BASENAME=`echo $0 | sed 's@^.*/@@g'`;
}
# We start by loading the 'common' file containing all useful
# functions
if [ -f $INSTALLED_SHARE_DIR/include/kapptemplate.common ];
then
. $INSTALLED_SHARE_DIR/include/kapptemplate.common
else
$ECHO "Could not find common file 'kapptemplate.common'";
$ECHO;
exit 1;
fi
# Then, we load all the default environment variables and perform
# any necessary initialization
LoadDefaults
# Parse the command line
CMDLINE=$@;
ParseCommandLine
# Do a sanity check and build the various module lists
BuildModuleLists
if [ ! "$WHICH_ONE" ] && [ "$ALL_DEFAULTS" ];
then
WHICH_ONE=1;
fi
if [ ! "$WHICH_ONE" ];
then
# Find out how to use kapptemplate this time
$ECHO "Please select the type of framework you wish to generate";
$ECHO "1. Full featured KDE application [default]";
$ECHO "2. Full featured KPart application";
$ECHO "3. KPart plugin";
$ECHO "4. Convert existing source to automake/autoconf framework";
$ECHO "Choose [1-4]: \c";
read WHICH_ONE;
$ECHO;
fi;
# Start the proper module
case $WHICH_ONE in
2)
. $INCLUDE_DIR/kpartapp.module;;
3)
. $INCLUDE_DIR/kpartplugin.module;;
4)
. $INCLUDE_DIR/existing.module;;
*)
. $INCLUDE_DIR/kapptemplate.module;;
esac

@ -0,0 +1,20 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
add_subdirectory( no-exe )
install( FILES
app_part.cpp doc-app-Makefile.am lo32-app-app.png app-Makefile.am
app_part-desktop hi16-app-app.png main.cpp app-configure.in.in
app_part.h hi32-app-app.png app.cpp app_part.rc hi48-app-app.png
app-desktop app_shell.rc index.docbook app.h doc-Makefile.am
lo16-app-app.png
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/kpartapp )

@ -0,0 +1,15 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
install( FILES
hi32-app-app.png lo16-app-app.png hi16-app-app.png hi48-app-app.png
lo32-app-app.png
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/kpartapp/no-exe )

@ -0,0 +1,17 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
add_subdirectory( no-exe )
install( FILES
plugin-Makefile.am plugin_app.cpp plugin_app.h plugin_app.rc
hi16-action-plugin.png hi22-action-plugin.png
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/kpartplugin )

@ -0,0 +1,14 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
install( FILES
hi16-action-plugin.png hi22-action-plugin.png
DESTINATION ${DATA_INSTALL_DIR}/kapptemplate/kpartplugin/no-exe )
Loading…
Cancel
Save