diff options
Diffstat (limited to 'kapptemplate')
-rw-r--r-- | kapptemplate/CMakeLists.txt | 31 | ||||
-rw-r--r-- | kapptemplate/admin/CMakeLists.txt | 12 | ||||
-rw-r--r-- | kapptemplate/appframework/CMakeLists.txt | 18 | ||||
-rw-r--r-- | kapptemplate/appframework/no-exe/CMakeLists.txt | 14 | ||||
-rw-r--r-- | kapptemplate/existing/CMakeLists.txt | 14 | ||||
-rw-r--r-- | kapptemplate/kapp/CMakeLists.txt | 20 | ||||
-rw-r--r-- | kapptemplate/kapp/no-exe/CMakeLists.txt | 15 | ||||
-rw-r--r-- | kapptemplate/kapptemplate.cmake | 136 | ||||
-rw-r--r-- | kapptemplate/kpartapp/CMakeLists.txt | 20 | ||||
-rw-r--r-- | kapptemplate/kpartapp/no-exe/CMakeLists.txt | 15 | ||||
-rw-r--r-- | kapptemplate/kpartplugin/CMakeLists.txt | 17 | ||||
-rw-r--r-- | kapptemplate/kpartplugin/no-exe/CMakeLists.txt | 14 |
12 files changed, 326 insertions, 0 deletions
diff --git a/kapptemplate/CMakeLists.txt b/kapptemplate/CMakeLists.txt new file mode 100644 index 00000000..399917a9 --- /dev/null +++ b/kapptemplate/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/admin/CMakeLists.txt b/kapptemplate/admin/CMakeLists.txt new file mode 100644 index 00000000..8b0806d2 --- /dev/null +++ b/kapptemplate/admin/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/appframework/CMakeLists.txt b/kapptemplate/appframework/CMakeLists.txt new file mode 100644 index 00000000..fc7a9d1f --- /dev/null +++ b/kapptemplate/appframework/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/appframework/no-exe/CMakeLists.txt b/kapptemplate/appframework/no-exe/CMakeLists.txt new file mode 100644 index 00000000..9402ba13 --- /dev/null +++ b/kapptemplate/appframework/no-exe/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/existing/CMakeLists.txt b/kapptemplate/existing/CMakeLists.txt new file mode 100644 index 00000000..1c29f809 --- /dev/null +++ b/kapptemplate/existing/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/kapp/CMakeLists.txt b/kapptemplate/kapp/CMakeLists.txt new file mode 100644 index 00000000..9b9f60fd --- /dev/null +++ b/kapptemplate/kapp/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/kapp/no-exe/CMakeLists.txt b/kapptemplate/kapp/no-exe/CMakeLists.txt new file mode 100644 index 00000000..ea0e80d9 --- /dev/null +++ b/kapptemplate/kapp/no-exe/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/kapptemplate.cmake b/kapptemplate/kapptemplate.cmake new file mode 100644 index 00000000..834fbaa4 --- /dev/null +++ b/kapptemplate/kapptemplate.cmake @@ -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 diff --git a/kapptemplate/kpartapp/CMakeLists.txt b/kapptemplate/kpartapp/CMakeLists.txt new file mode 100644 index 00000000..b7c4b434 --- /dev/null +++ b/kapptemplate/kpartapp/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/kpartapp/no-exe/CMakeLists.txt b/kapptemplate/kpartapp/no-exe/CMakeLists.txt new file mode 100644 index 00000000..4df124e2 --- /dev/null +++ b/kapptemplate/kpartapp/no-exe/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/kpartplugin/CMakeLists.txt b/kapptemplate/kpartplugin/CMakeLists.txt new file mode 100644 index 00000000..5c44ad10 --- /dev/null +++ b/kapptemplate/kpartplugin/CMakeLists.txt @@ -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 ) diff --git a/kapptemplate/kpartplugin/no-exe/CMakeLists.txt b/kapptemplate/kpartplugin/no-exe/CMakeLists.txt new file mode 100644 index 00000000..ea044ae9 --- /dev/null +++ b/kapptemplate/kpartplugin/no-exe/CMakeLists.txt @@ -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 ) |