Browse Source
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbfx@1091549 283d02a7-25f6-0310-bc7c-ecb5cbfe19dav3.5.13-sru
commit
ceea23677c
281 changed files with 39056 additions and 0 deletions
@ -0,0 +1,274 @@
|
||||
PROJECT(kbfx) |
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2 FATAL_ERROR) |
||||
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmakemodules) |
||||
SET(CMAKE_COLOR_MAKEFILE ON CACHE STRING "Enable/Disable color output during build." FORCE) |
||||
#SET(CMAKE_VERBOSE_MAKEFILE OFF CACHE STRING "Enable/Disable cmake debug output during build." FORCE) |
||||
|
||||
# Optimization flags |
||||
# SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3") |
||||
# SET(CMAKE_C_FLAGS_DISTRIBUTION "-O3") |
||||
|
||||
# Global variable CMAKE_BUILD_TYPE |
||||
# None (CMAKE_C_FLAGS or CMAKE_CXX_FLAGS used) |
||||
# Debug (CMAKE_C_FLAGS_DEBUG or CMAKE_CXX_FLAGS_DEBUG) |
||||
# Release (CMAKE_C_FLAGS_RELEASE or CMAKE_CXX_FLAGS_RELEASE) |
||||
# RelWithDebInfo (CMAKE_C_FLAGS_RELWITHDEBINFO or CMAKE_CXX_FLAGS_RELWITHDEBINFO |
||||
# MinSizeRel (CMAKE_C_FLAGS_MINSIZEREL or CMAKE_CXX_FLAGS_MINSIZEREL) |
||||
IF (NOT CMAKE_BUILD_TYPE) |
||||
SET(CMAKE_BUILD_TYPE RelWithDebInfo |
||||
CACHE |
||||
STRING "Specify build type: None Debug Release RelWithDebInfo MinSizeRel." |
||||
FORCE) |
||||
ENDIF (NOT CMAKE_BUILD_TYPE) |
||||
|
||||
OPTION(USE_STRIGI "Enable use of Strigi search support (disabled)" OFF) |
||||
OPTION(USE_MENUDRAKE "Use 'menudrake' instead of 'kmenuedit' in Mandriva (auto)" ON) |
||||
OPTION(USE_KDE4 "Compile for KDE4 (disabled)" OFF) |
||||
|
||||
SET(BIN_SEARCH_PATHES |
||||
$ENV{HOME}/bin |
||||
$ENV{HOME}/usr/bin |
||||
$ENV{KDEDIR}/bin |
||||
${CMAKE_INSTALL_PREFIX}/bin |
||||
/opt/kde/bin |
||||
/opt/kde3/bin |
||||
/opt/kde4/bin |
||||
/usr/kde/3.5/bin |
||||
/usr/bin |
||||
/usr/local/bin |
||||
/opt/bin |
||||
) |
||||
SET(INCLUDE_SEARCH_PATHES |
||||
$ENV{HOME}/include |
||||
$ENV{HOME}/usr/include |
||||
$ENV{KDEDIR}/include |
||||
/opt/kde/include |
||||
/opt/kde3/include |
||||
/opt/kde4/include |
||||
/usr/kde/3.5/include |
||||
/usr/include |
||||
/usr/local/include |
||||
/opt/include |
||||
${CMAKE_SYSTEM_INCLUDE_PATH} |
||||
) |
||||
SET(LIB_SEARCH_PATHES |
||||
$ENV{HOME}/lib |
||||
$ENV{HOME}/usr/lib |
||||
$ENV{KDEDIR}/lib |
||||
/opt/kde/lib |
||||
/opt/kde3/lib |
||||
/opt/kde4/lib |
||||
/usr/kde/3.5/lib |
||||
/usr/lib |
||||
/usr/local/lib |
||||
/opt/lib |
||||
) |
||||
|
||||
# Setting versions |
||||
|
||||
# For versions that are stable set to 1, else to 0 |
||||
SET(APPLICATION_STABLE 1) |
||||
|
||||
SET(LIB_MAJOR 4) |
||||
SET(LIB_MINOR 9) |
||||
SET(LIB_RELEASE 3) |
||||
SET(LIB_SUB_RELEASE 1) |
||||
SET(APPLICATION_INTERNAL_VERSION "20070516") |
||||
SET(APPLICATION_DATE "2007-05-16") |
||||
|
||||
SET(APPLICATION_NAME "${PROJECT_NAME}") |
||||
SET(APPLICATION_MAIN_VERSION "0.${LIB_MAJOR}.${LIB_MINOR}.${LIB_RELEASE}") |
||||
|
||||
IF (APPLICATION_STABLE) |
||||
SET(APPLICATION_STABLE_RELEASE ".${LIB_SUB_RELEASE}") |
||||
SET(APPLICATION_VERSION "${APPLICATION_MAIN_VERSION}.${LIB_SUB_RELEASE}") |
||||
SET(GENTOO_VERSION "${APPLICATION_MAIN_VERSION}.${LIB_SUB_RELEASE}") |
||||
ELSE (APPLICATION_APPLICATION_STABLE "") |
||||
SET(STABLE_RELEASE) |
||||
SET(APPLICATION_VERSION "${APPLICATION_MAIN_VERSION}-${LIB_SUB_RELEASE}") |
||||
SET(GENTOO_VERSION "${APPLICATION_MAIN_VERSION}_pre${LIB_SUB_RELEASE}") |
||||
ENDIF (APPLICATION_STABLE) |
||||
|
||||
SET(VERSION ${APPLICATION_VERSION}) |
||||
|
||||
SET(STRIGI_VERSION "0.3.11") |
||||
SET(GENTOO_KEYWORDS "x86 ~ppc ~amd64") |
||||
|
||||
# Prepare docbook part |
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/en/index.docbook.in ${CMAKE_BINARY_DIR}/doc/en/index.docbook @ONLY) |
||||
|
||||
IF (USE_STRIGI) |
||||
FIND_PACKAGE(Strigi REQUIRED) |
||||
INCLUDE_DIRECTORIES(${STRIGI_INCLUDE_DIR}) |
||||
MESSAGE(STATUS "Strigi support is: ON!") |
||||
ELSE (USE_STRIGI) |
||||
MESSAGE(STATUS "Strigi support is: OFF!") |
||||
ENDIF (USE_STRIGI) |
||||
|
||||
|
||||
FIND_PROGRAM(HAVE_MANDRAKE menudrake) |
||||
IF (HAVE_MANDRAKE AND USE_MENUDRAKE) |
||||
SET(MANDRAKE "1") |
||||
MESSAGE(STATUS "Will use 'menudrake' instead of 'kmenuedit'!") |
||||
ELSE (HAVE_MANDRAKE AND USE_MENUDRAKE) |
||||
SET(MANDRAKE "") |
||||
MESSAGE(STATUS "Will use 'kmenuedit'!") |
||||
ENDIF (HAVE_MANDRAKE AND USE_MENUDRAKE) |
||||
|
||||
IF (NOT USE_KDE4) |
||||
MESSAGE(STATUS "Building for KDE3") |
||||
INCLUDE(TestCXXAcceptsFlag) |
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG |
||||
"${CMAKE_CXX_FLAGS_DEBUG} -DTESTING_RC=\"\\\"\${CMAKE_SOURCE_DIR}/configdialog/kbfxconfigappui.rc\\\"\"") |
||||
|
||||
CHECK_CXX_ACCEPTS_FLAG("-fexceptions" CXX_EXCEPTION) |
||||
CHECK_CXX_ACCEPTS_FLAG("-fstack-protector" CXX_PROTECTOR) |
||||
|
||||
FIND_PACKAGE(KDE3 REQUIRED) |
||||
|
||||
INCLUDE(FindKdeLibs) |
||||
INCLUDE(MacroEnsureVersion) |
||||
|
||||
# Dummy macros for compatibility |
||||
MACRO(KDE4_AUTOMOC _dummy) |
||||
ENDMACRO(KDE4_AUTOMOC) |
||||
|
||||
MACRO(KDE4_ADD_LIBRARY _dummy _dummy1 _dummy2) |
||||
ENDMACRO(KDE4_ADD_LIBRARY) |
||||
|
||||
MACRO(KDE4_INSTALL_LIBTOOL_FILE _dummy _dummy1) |
||||
ENDMACRO(KDE4_INSTALL_LIBTOOL_FILE) |
||||
|
||||
MACRO(KDE4_ADD_UI3_FILES _dummy _dummy1) |
||||
ENDMACRO(KDE4_ADD_UI3_FILES) |
||||
|
||||
MACRO(KDE4_ADD_DCOP_SKELS _dummy _dummy1) |
||||
ENDMACRO(KDE4_ADD_DCOP_SKELS) |
||||
|
||||
MACRO(KDE4_ADD_EXECUTABLE _dummy _dummy1) |
||||
ENDMACRO(KDE4_ADD_EXECUTABLE) |
||||
|
||||
MACRO(KDE4_INSTALL_ICONS _dummy) |
||||
ENDMACRO(KDE4_INSTALL_ICONS) |
||||
ELSE (NOT USE_KDE4) |
||||
MESSAGE(STATUS "Building for KDE4") |
||||
FIND_PACKAGE(KDE4 REQUIRED) |
||||
ADD_DEFINITIONS(${KDE4_DEFINITIONS} ${QT_DEFINITIONS}) |
||||
SET(INCLUDE_SEARCH_PATHES |
||||
${INCLUDE_SEARCH_PATHES} |
||||
${KDE4_INCLUDES} |
||||
) |
||||
SET(LIB_SEARCH_PATHES |
||||
${LIB_SEARCH_PATHES} |
||||
${KDE4_LIB_DIR} |
||||
) |
||||
ENDIF (NOT USE_KDE4) |
||||
|
||||
INCLUDE_DIRECTORIES( |
||||
${CMAKE_BINARY_DIR} |
||||
${CMAKE_BINARY_DIR}/kbfxlib/data |
||||
${CMAKE_BINARY_DIR}/kbfxlib/common |
||||
${CMAKE_BINARY_DIR}/src |
||||
${CMAKE_BINARY_DIR}/configdialog |
||||
${CMAKE_BINARY_DIR}/plugins/common |
||||
${CMAKE_SOURCE_DIR} |
||||
${CMAKE_SOURCE_DIR}/kbfxlib/data |
||||
${CMAKE_SOURCE_DIR}/kbfxlib/common |
||||
${CMAKE_SOURCE_DIR}/src |
||||
${CMAKE_SOURCE_DIR}/configdialog |
||||
${CMAKE_SOURCE_DIR}/plugins/common |
||||
${KDE3_INCLUDE_DIR}/kbfx |
||||
${KDE3_INCLUDE_DIR}/kbfx/plugins |
||||
${INCLUDE_SEARCH_PATHES} |
||||
) |
||||
|
||||
IF (NOT USE_KDE4) |
||||
IF (CXX_EXCEPTION) |
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") |
||||
ENDIF (CXX_EXCEPTION) |
||||
IF (CXX_PROTECTOR) |
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") |
||||
ENDIF (CXX_PROTECTOR) |
||||
|
||||
ADD_DEFINITIONS(${KDE3_DEFINITIONS} ${QT_DEFINITIONS}) |
||||
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) |
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) |
||||
|
||||
IF(KDE3_KDECONFIG_EXECUTABLE) |
||||
EXECUTE_PROCESS(COMMAND ${KDE3_KDECONFIG_EXECUTABLE} "--version" OUTPUT_VARIABLE output) |
||||
STRING(REGEX MATCH "KDE: [0-9]+\\.[0-9]+\\.[0-9]+" KDEVERSION "${output}") |
||||
STRING(REGEX REPLACE "^KDE: " "" KDEVERSION "${KDEVERSION}") |
||||
ENDIF(KDE3_KDECONFIG_EXECUTABLE) |
||||
SET(KDE_MIN_VERSION "3.5.0") |
||||
MACRO_ENSURE_VERSION(${KDE_MIN_VERSION} ${KDEVERSION} VERSION_OK) |
||||
IF(NOT VERSION_OK) |
||||
MESSAGE(FATAL_ERROR "You need at least KDE Version of 3.5.0 in order to compile KBFX.\n Please upgrade your KDE or install the development files of KDE.") |
||||
ENDIF(NOT VERSION_OK) |
||||
ENDIF (NOT USE_KDE4) |
||||
|
||||
SET(KBFX_LIB_INSTALL_DIR ${LIB_INSTALL_DIR}) |
||||
|
||||
ADD_SUBDIRECTORY(kbfxlib/data) |
||||
ADD_SUBDIRECTORY(kbfxlib/common) |
||||
ADD_SUBDIRECTORY(src) |
||||
ADD_SUBDIRECTORY(configdialog) |
||||
ADD_SUBDIRECTORY(skin/vector) |
||||
ADD_SUBDIRECTORY(skin/raster/default) |
||||
ADD_SUBDIRECTORY(skin/raster/2panels) |
||||
ADD_SUBDIRECTORY(images) |
||||
ADD_SUBDIRECTORY(doc) |
||||
ADD_SUBDIRECTORY(doc/en) |
||||
ADD_SUBDIRECTORY(doc/common) |
||||
ADD_SUBDIRECTORY(po) |
||||
ADD_SUBDIRECTORY(plugins/common) |
||||
ADD_SUBDIRECTORY(plugins/applications) |
||||
ADD_SUBDIRECTORY(plugins/settings) |
||||
ADD_SUBDIRECTORY(plugins/plasmoids) |
||||
ADD_SUBDIRECTORY(plugins/recentstuff) |
||||
IF (USE_STRIGI) |
||||
ADD_SUBDIRECTORY(plugins/strigi) |
||||
ENDIF (USE_STRIGI) |
||||
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/config.h @ONLY) |
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/kbfx.spec.in ${CMAKE_BINARY_DIR}/kbfx.spec @ONLY) |
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/kbfx.ebuild.in ${CMAKE_BINARY_DIR}/kbfx-${GENTOO_VERSION}.ebuild @ONLY) |
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/strigi.ebuild.in ${CMAKE_BINARY_DIR}/strigi-${STRIGI_VERSION}.ebuild @ONLY) |
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/kbfx-svn.ebuild.in ${CMAKE_BINARY_DIR}/kbfx-9999.ebuild @ONLY) |
||||
|
||||
SET(DIST_INCLUDE "kbfx-9999.ebuild kbfx.spec kbfx-${GENTOO_VERSION}.ebuild strigi-${STRIGI_VERSION}.ebuild") |
||||
SET(DIST_EXCLUDE "Helperstuff") |
||||
CONFIGURE_FILE( |
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules/makedist.sh.in" |
||||
"${CMAKE_CURRENT_BINARY_DIR}/makedist.sh" |
||||
IMMEDIATE |
||||
@ONLY) |
||||
ADD_CUSTOM_TARGET(dist |
||||
"${CMAKE_BINARY_DIR}/makedist.sh" |
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
||||
|
||||
IF (NOT USE_KDE4) |
||||
CONFIGURE_FILE( |
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules/cmake_uninstall.cmake.in" |
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" |
||||
IMMEDIATE @ONLY) |
||||
ADD_CUSTOM_TARGET(uninstall |
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") |
||||
ENDIF (NOT USE_KDE4) |
||||
|
||||
|
||||
FILE(GLOB _POFILES po/*.po) |
||||
FOREACH(_p ${_POFILES}) |
||||
SET(POFILES "${_p} ${POFILES}") |
||||
ENDFOREACH(_p) |
||||
|
||||
SET(MESSAGES_DIR ${CMAKE_SOURCE_DIR}) |
||||
CONFIGURE_FILE( |
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules/package_messages.sh.in" |
||||
"${CMAKE_CURRENT_BINARY_DIR}/package_messages.sh" |
||||
IMMEDIATE |
||||
@ONLY) |
||||
ADD_CUSTOM_TARGET(package-messages |
||||
"${CMAKE_CURRENT_BINARY_DIR}/package_messages.sh") |
||||
|
@ -0,0 +1,246 @@
|
||||
#! /bin/sh |
||||
|
||||
CMAKE_OPT_PREFIX_KDE3="-DCMAKE_INSTALL_PREFIX:PATH=`kde-config --prefix 2>/dev/null` " |
||||
CMAKE_OPT_PREFIX_KDE4="-DCMAKE_INSTALL_PREFIX:PATH=`kde4-config --prefix 2>/dev/null` " |
||||
CMAKE_OPT_PREFIX="" |
||||
MAKE_VERBOSE="" |
||||
USE_STRIGI_SEARCH="" |
||||
MENUDRAKE="" |
||||
KDE4="" |
||||
ACTION="install" |
||||
NOCHECK=0 |
||||
build_state="touch kbfx_build" |
||||
command_line_args=$@ |
||||
eval "which kbfxconfigapp > /dev/null 2>&1" && kbfx_installed="1" || kbfx_installed="0" |
||||
|
||||
color_ok="\\033[1;32m" |
||||
color_error="\\033[1;31m" |
||||
color_normal="\\033[0;39m" |
||||
color_warn="\\033[1;33m" |
||||
|
||||
|
||||
prog_action(){ |
||||
echo |
||||
echo -e "$color_ok $@ $color_normal" |
||||
} |
||||
|
||||
prog_err(){ |
||||
echo |
||||
echo -e "$color_error ERROR doing $@ $color_normal\n" |
||||
} |
||||
|
||||
confirm() { |
||||
printf "$color_warn %s (Y)es/(N)o? [%s]$color_normal " "$1" "$2" |
||||
unset user_input |
||||
answer="$2" |
||||
read user_input |
||||
if [ "$user_input" = "y" -o "$user_input" = "Y" -o "$user_input" = "YES" -o "$user_input" = "Yes" -o "$user_input" = "yes" ]; then |
||||
answer="Y" |
||||
fi |
||||
if [ "$user_input" = "n" -o "$user_input" = "N" -o "" = "NO" -o "$user_input" = "No" -o "$user_input" = "no" ]; then |
||||
answer="N" |
||||
fi |
||||
} |
||||
|
||||
parse_command_line() { |
||||
if [ "$#" -eq 0 ]; then |
||||
return 0 |
||||
fi |
||||
while [ "$1" != "${1##-}" ]; do |
||||
case $1 in |
||||
--verbose|-v) |
||||
MAKE_VERBOSE="VERBOSE=1" |
||||
shift 1 |
||||
;; |
||||
--prefix|-p) |
||||
if [ -n "$2" -a "$2" = "${2##-}" ]; then |
||||
t=0 |
||||
stop=0 |
||||
s="" |
||||
for p in $@ |
||||
do |
||||
t=$[t+1] |
||||
if [ $t -gt 1 -a "$p" = "${p##-}" -a $stop -eq 0 ]; then |
||||
s="$s$p " |
||||
fi |
||||
if [ $t -gt 1 -a "$p" != "${p##-}" ]; then |
||||
stop=$[t-1] |
||||
fi |
||||
done |
||||
if [ $stop -eq 0 ]; then |
||||
stop=$[t-1] |
||||
fi |
||||
if [ -n "$s" ]; then |
||||
s=${s%%[ ]} |
||||
CMAKE_OPT_PREFIX="-DCMAKE_INSTALL_PREFIX:PATH='$s' " |
||||
fi |
||||
shift $stop |
||||
else |
||||
shift 1 |
||||
return 1 |
||||
fi |
||||
;; |
||||
--strigi|-s) |
||||
USE_STRIGI_SEARCH="-DUSE_STRIGI:BOOL=TRUE" |
||||
shift 1 |
||||
;; |
||||
--menudrake-off|-m) |
||||
MENUDRAKE="-DUSE_MENUDRAKE:BOOL=FALSE" |
||||
shift 1 |
||||
;; |
||||
--kde4|-k) |
||||
KDE4="-DUSE_KDE4:BOOL=TRUE" |
||||
shift 1 |
||||
;; |
||||
--uninstall|-u) |
||||
ACTION="uninstall" |
||||
shift 1 |
||||
;; |
||||
--nocheck|-n) |
||||
NOCHECK=1 |
||||
shift 1 |
||||
;; |
||||
*) |
||||
if [ "$#" -ge 1 ]; then |
||||
return 1 |
||||
fi |
||||
return 0 |
||||
;; |
||||
esac |
||||
done |
||||
} |
||||
|
||||
show_usage(){ |
||||
echo |
||||
echo -e "$color_warn Usage: \n\t build.sh \t [(-v|--verbose) Be verbose when compiling (default: no)] \n\t\t\t [(-u|--uninstall) Uninstall KBFX (default: no)] \n\t\t\t [(-p|--prefix) Install prefix (default: KDE prefix)] \n\t\t\t [(-s|--strigi) Compile strigi search plugin (default: no)] \n\t\t\t [(-m|-menudrake-off) Don't use menudrake in Mandriva (default: auto)] \n\t\t\t [(-k|--kde4) Compile for KDE4 (default: no)] \n\t\t\t [(-n|--nocheck) Do not check for old KBFX versions (default: check)] $color_normal" |
||||
echo |
||||
} |
||||
|
||||
parse_command_line $command_line_args |
||||
if [ "$?" -eq 1 ]; then |
||||
prog_err "build.sh" |
||||
show_usage |
||||
exit 1 |
||||
fi |
||||
|
||||
show_usage |
||||
|
||||
if [ "$ACTION" = "install" ] |
||||
then { |
||||
if [ $kbfx_installed -eq 1 -a $NOCHECK -eq 0 ] ; then |
||||
echo |
||||
echo -e "$color_error \n\t You have KBFX installed in your \$PATH!\n\t In order to compile the new version you HAVE TO REMOVE the old KBFX first!\n $color_normal" |
||||
exit 1 |
||||
fi |
||||
|
||||
if [ -d build ] ; then |
||||
echo |
||||
echo -e "$color_warn Directory 'build' exists! Using it...$color_normal" |
||||
echo -e "$color_error If 'build.sh' fails, try removing the directory 'build' and run 'build.sh' again! $color_normal" |
||||
else |
||||
mkdir build |
||||
fi |
||||
cd build |
||||
|
||||
if [ "$CMAKE_OPT_PREFIX" = "" ] |
||||
then { |
||||
if [ "$KDE4" = "" ] |
||||
then { |
||||
CMAKE_OPT_PREFIX=$CMAKE_OPT_PREFIX_KDE3 |
||||
} |
||||
else { |
||||
CMAKE_OPT_PREFIX=$CMAKE_OPT_PREFIX_KDE4 |
||||
} |
||||
fi |
||||
} |
||||
fi |
||||
|
||||
CMAKE_OPT="$CMAKE_OPT_PREFIX $KDE4 $MENUDRAKE $USE_STRIGI_SEARCH" |
||||
|
||||
prog_action "Doing CMake configure..." |
||||
echo $CMAKE_OPT |
||||
eval "cmake ../ $CMAKE_OPT" |
||||
if [ $? -ne 0 ]; then |
||||
prog_err "CMake configure..." |
||||
exit 1 |
||||
fi |
||||
|
||||
prog_action "Doing make..." |
||||
make $MAKE_VERBOSE |
||||
if [ $? -ne 0 ]; then |
||||
prog_err "make..." |
||||
exit 1 |
||||
fi |
||||
|
||||
eval $build_state |
||||
prog_action "Success building KBFX...\n" |
||||
|
||||
confirm "Do you want to install KBFX?" "Y" |
||||
if [ "$answer" = "Y" ] |
||||
then |
||||
sucommand="make install" |
||||
after_su="touch kbfx_install_user" |
||||
if [ `whoami` != 'root' ] |
||||
then { |
||||
confirm "To install KBFX as 'root', answer 'Yes'. To install as '`whoami`', answer 'No'" "N" |
||||
if [ "$answer" = "Y" ] |
||||
then { |
||||
sucommand="su root -c 'make install'" |
||||
after_su="touch kbfx_install_root" |
||||
} |
||||
fi |
||||
} |
||||
fi |
||||
|
||||
prog_action "Doing 'make install'..." |
||||
eval $sucommand |
||||
if [ $? -ne 0 ]; then |
||||
prog_err "make install..." |
||||
exit 1 |
||||
fi |
||||
eval $after_su |
||||
echo |
||||
echo -e "$color_warn NOTE: If you have used a custom prefix for your install (-p or --prefix option for script), \n you should add '$s' to your \$KDEDIRS environment variable\n and '$s/lib' to your \$LD_LIBRARY_PATH environment variable!\n $color_normal" |
||||
fi |
||||
} |
||||
else { |
||||
if [ -d build ] |
||||
then |
||||
cd build |
||||
else |
||||
echo |
||||
echo -e "$color_error \n\t Directory 'build' DOES NOT exist!\n\t You HAVE NOT used 'build.sh' script for installing KBFX! \n\t Uninstall CAN NOT continue!\n $color_normal" |
||||
exit 1 |
||||
fi |
||||
|
||||
if [ -f kbfx_install_user ] |
||||
then |
||||
sucommand="make uninstall" |
||||
after_su="rm -f kbfx_install_user" |
||||
elif [ -f kbfx_install_root ] |
||||
then |
||||
sucommand="su root -c 'make uninstall'" |
||||
after_su="rm -f kbfx_install_root" |
||||
elif [ -f kbfx_build ] |
||||
then |
||||
echo |
||||
echo -e "$color_error \n\t KBFX IS NOT installed! \n\t Uninstall CAN NOT continue!\n $color_normal" |
||||
exit 1 |
||||
else |
||||
echo |
||||
echo -e "$color_error \n\t You HAVE NOT used 'build.sh' script for installing KBFX! \n\t Uninstall CAN NOT continue!\n $color_normal" |
||||
exit 1 |
||||
fi |
||||
|
||||
prog_action "Uninstalling..." |
||||
eval $sucommand |
||||
if [ $? -ne 0 ]; then |
||||
prog_err "uninstall..." |
||||
exit 1 |
||||
fi |
||||
eval $after_su |
||||
|
||||
} |
||||
fi |
||||
|
||||
prog_action "All actions ended successfully...\n" |
@ -0,0 +1,22 @@
|
||||
Redistribution and use in source and binary forms, with or without |
||||
modification, are permitted provided that the following conditions |
||||
are met: |
||||
|
||||
1. Redistributions of source code must retain the copyright |
||||
notice, this list of conditions and the following disclaimer. |
||||
2. Redistributions in binary form must reproduce the copyright |
||||
notice, this list of conditions and the following disclaimer in the |
||||
documentation and/or other materials provided with the distribution. |
||||
3. The name of the author may not be used to endorse or promote products |
||||
derived from this software without specific prior written permission. |
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
@ -0,0 +1,21 @@
|
||||
# - Check whether the CXX compiler supports a given flag. |
||||
# CHECK_CXX_COMPILER_FLAG(FLAG VARIABLE) |
||||
# |
||||
# FLAG - the compiler flag |
||||
# VARIABLE - variable to store the result |
||||
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> |
||||
# |
||||
# Redistribution and use is allowed according to the terms of the BSD license. |
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
||||
|
||||
|
||||
INCLUDE(CheckCXXSourceCompiles) |
||||
|
||||
MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT) |
||||
SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") |
||||
SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") |
||||
CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}) |
||||
SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") |
||||
ENDMACRO (CHECK_CXX_COMPILER_FLAG) |
||||
|
@ -0,0 +1,49 @@
|
||||
|
||||
# Copyright (c) 2006, Peter Kuemmel, <syntheticpp@yahoo.com> |
||||
# |
||||
# Redistribution and use is allowed according to the terms of the BSD license. |
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
||||
|
||||
|
||||
if (WIN32) |
||||
|
||||
# check if GNUWIN32_DIR is already set |
||||
# (e.g. by command line argument or the calling script) |
||||
if(NOT GNUWIN32_DIR) |
||||
# check for enviroment variable |
||||
file(TO_CMAKE_PATH "$ENV{GNUWIN32_DIR}" GNUWIN32_DIR) |
||||
if(NOT GNUWIN32_DIR) |
||||
# search in the default program install folder |
||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles) |
||||
find_file(GNUWIN32_DIR_tmp gnuwin32 win32libs |
||||
PATHS |
||||
"${_progFiles}" |
||||
"C:/" "D:/" "E:/" "F:/" "G:/" |
||||
) |
||||
set(GNUWIN32_DIR ${GNUWIN32_DIR_tmp}) |
||||
endif(NOT GNUWIN32_DIR) |
||||
endif(NOT GNUWIN32_DIR) |
||||
|
||||
if (GNUWIN32_DIR) |
||||
set(GNUWIN32_INCLUDE_DIR ${GNUWIN32_DIR}/include) |
||||
set(GNUWIN32_LIBRARY_DIR ${GNUWIN32_DIR}/lib) |
||||
set(GNUWIN32_BINARY_DIR ${GNUWIN32_DIR}/bin) |
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GNUWIN32_INCLUDE_DIR}) |
||||
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GNUWIN32_LIBRARY_DIR}) |
||||
set(GNUWIN32_FOUND TRUE) |
||||
else (GNUWIN32_DIR) |
||||
set(GNUWIN32_FOUND) |
||||
endif (GNUWIN32_DIR) |
||||
|
||||
if (GNUWIN32_FOUND) |
||||
if (NOT GNUWIN32_FIND_QUIETLY) |
||||
message(STATUS "Found GNUWIN32: ${GNUWIN32_DIR}") |
||||
endif (NOT GNUWIN32_FIND_QUIETLY) |
||||
else (GNUWIN32_FOUND) |
||||
if (GNUWIN32_FIND_REQUIRED) |
||||
message(FATAL_ERROR "Could NOT find GNUWIN32") |
||||
endif (GNUWIN32_FIND_REQUIRED) |
||||
endif (GNUWIN32_FOUND) |
||||
|
||||
endif (WIN32) |
||||
|
@ -0,0 +1,32 @@
|
||||
# - Try to find the KBFX package - |
||||
# If found the following will be defined |
||||
# |
||||
# KBFX_FOUND - KBFX package found on the system |
||||
# KBFX_INCLUDE_DIR - Directory of the KBFX package include files |
||||
# KBFX_LIBRARY - Where libkbfxplasma.so resides |
||||
# |
||||
|
||||
FIND_PATH(KBFX_INCLUDE_DIR kbfx/kbfxconfig.h |
||||
PATHS |
||||
${INCLUDE_SEARCH_PATHES} |
||||
) |
||||
|
||||
FIND_LIBRARY(KBFX_LIBRARY NAMES kbfxplasma |
||||
PATHS |
||||
${LIB_SEARCH_PATHES} |
||||
) |
||||
|
||||
IF(KBFX_INCLUDE_DIR AND KBFX_LIBRARY) |
||||
SET(KBFX_FOUND TRUE) |
||||
ENDIF(KBFX_INCLUDE_DIR AND KBFX_LIBRARY) |
||||
|
||||
IF(KBFX_FOUND) |
||||
IF(NOT KBFX_FIND_QUIETLY) |
||||
MESSAGE(STATUS "Found KBFX package: ${KBFX_LIBRARY}") |
||||
ENDIF(NOT KBFX_FIND_QUIETLY) |
||||
ELSE(KBFX_FOUND) |
||||
IF(KBFX_FIND_REQUIRED) |
||||
MESSAGE(FATAL_ERROR "Could not find KBFX package! Please download and install KBFX from http://www.kbfx.org") |
||||
ENDIF(KBFX_FIND_REQUIRED) |
||||
ENDIF(KBFX_FOUND) |
||||
|
@ -0,0 +1,40 @@
|
||||
# Find KDE4 and provide all necessary variables and macros to compile software for it. |
||||
# It looks for KDE 4 in the following directories in the given order: |
||||
# - CMAKE_INSTALL_PREFIX |
||||
# - KDEDIR |
||||
# - /opt/kde4 |
||||
# - /opt/kde |
||||
# |
||||
# Please look in FindKDE4Internal.cmake and KDE4Macros.cmake for more information. |
||||
# They are installed with the KDE 4 libraries in $KDEDIR/share/apps/cmake/modules/. |
||||
# |
||||
# Author: Alexander Neundorf <neundorf@kde.org> |
||||
# Modified by PhobosK <phobosk@mail.kbfx.org> |
||||
|
||||
# For KDE4 kde-config has been renamed to kde4-config |
||||
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config |
||||
PATHS |
||||
${BIN_SEARCH_PATHES} |
||||
NO_DEFAULT_PATH) |
||||
|
||||
IF (NOT KDE4_KDECONFIG_EXECUTABLE) |
||||
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config ) |
||||
ENDIF (NOT KDE4_KDECONFIG_EXECUTABLE) |
||||
|
||||
IF (KDE4_KDECONFIG_EXECUTABLE) |
||||
IF (KDE4_FIND_QUIETLY) |
||||
SET(_quiet QUIET) |
||||
ENDIF (KDE4_FIND_QUIETLY) |
||||
|
||||
IF (KDE4_FIND_REQUIRED) |
||||
SET(_req REQUIRED) |
||||
ENDIF (KDE4_FIND_REQUIRED) |
||||
|
||||
# use FindKDE4Internal.cmake to do the rest |
||||
FIND_PACKAGE(KDE4Internal ${_req} ${_quiet}) |
||||
ELSE (KDE4_KDECONFIG_EXECUTABLE) |
||||
IF (KDE4_FIND_REQUIRED) |
||||
MESSAGE(FATAL_ERROR "ERROR: Could not find KDE4 kde4-config") |
||||
ENDIF (KDE4_FIND_REQUIRED) |
||||
ENDIF (KDE4_KDECONFIG_EXECUTABLE) |
||||
|
@ -0,0 +1,839 @@
|
||||
# - Find the KDE4 include and library dirs, KDE preprocessors and define a some macros |
||||
# |
||||
# This module defines the following variables: |
||||
# |
||||
# KDE4_FOUND - set to TRUE if everything required for building KDE software has been found |
||||
# |
||||
# KDE4_DEFINITIONS - compiler definitions required for compiling KDE software |
||||
# KDE4_INCLUDE_DIR - the KDE 4 include directory |
||||
# KDE4_INCLUDES - all include directories required for KDE, i.e. |
||||
# KDE4_INCLUDE_DIR, but also the Qt4 include directories |
||||
# and other platform specific include directories |
||||
# KDE4_LIB_DIR - the directory where the KDE libraries are installed, |
||||
# intended to be used with LINK_DIRECTORIES() |
||||
# |
||||
# The following variables are defined for the various tools required to |
||||
# compile KDE software: |
||||
# |
||||
# KDE4_KCFGC_EXECUTABLE - the kconfig_compiler executable |
||||
# KDE4_MEINPROC_EXECUTABLE - the meinproc executable |
||||
# KDE4_MAKEKDEWIDGETS_EXECUTABLE - the makekdewidgets executable |
||||
# |
||||
# The following variables point to the location of the KDE libraries, |
||||
# but shouldn't be used directly: |
||||
# |
||||
# KDE4_KDECORE_LIBRARY - the kdecore library |
||||
# KDE4_KDEUI_LIBRARY - the kdeui library |
||||
# KDE4_KIO_LIBRARY - the kio library |
||||
# KDE4_KPARTS_LIBRARY - the kparts library |
||||
# KDE4_KUTILS_LIBRARY - the kutils library |
||||
# KDE4_KDE3SUPPORT_LIBRARY - the kde3support library |
||||
# KDE4_KXMLCORE_LIBRARY - the kxmlcore library |
||||
# KDE4_KHTML_LIBRARY - the khtml library |
||||
# KDE4_KJS_LIBRARY - the kjs library |
||||
# KDE4_KNEWSTUFF_LIBRARY - the knewstuff library |
||||
# KDE4_KDEPRINT_LIBRARY - the kdeprint library |
||||
# KDE4_KSPELL2_LIBRARY - the kspell2 library |
||||
# KDE4_KDNSSD_LIBRARY - the kdnssd library |
||||
# KDE4_PHONONCORE_LIBRARY - the phononcore library |
||||
# KDE4_PHONONUI_LIBRARY - the phononui library |
||||
# KDE4_KAUDIODEVICELIST_LIBRARY - the kaudiodevicelist library |
||||
# KDE4_KDEFX_LIBRARY - the kdefx library |
||||
# KDE4_THREADWEAVER_LIBRARY- the threadweaver library |
||||
# KDE4_SOLID_LIBRARY - the solid library |
||||
# KDE4_SOLIDIFACES_LIBRARY - the solidiface library |
||||
# KDE4_KNOTIFYCONFIG_LIBRARY- the knotifyconfig library |
||||
# KDE4_KROSSCORE_LIBRARY- the krosscore library |
||||
# KDE4_KTEXTEDITOR_LIBRARY - the ktexteditor library |
||||
# KDE4_KWALLETCLIENT_LIBRARY - the kwalletclient library |
||||
# |
||||
# Compared to the variables above, the following variables |
||||
# also contain all of the depending libraries, so the variables below |
||||
# should be used instead of the ones above: |
||||
# |
||||
# KDE4_KDECORE_LIBS - the kdecore library and all depending libraries |
||||
# KDE4_KDEUI_LIBS - the kdeui library and all depending libraries |
||||
# KDE4_KIO_LIBS - the kio library and all depending libraries |
||||
# KDE4_KPARTS_LIBS - the kparts library and all depending libraries |
||||
# KDE4_KUTILS_LIBS - the kutils library and all depending libraries |
||||
# KDE4_KDE3SUPPORT_LIBS - the kde3support library and all depending libraries |
||||
# KDE4_KXMLCORE_LIBS - the kxmlcore library and all depending libraries |
||||
# KDE4_KHTML_LIBS - the khtml library and all depending libraries |
||||
# KDE4_KJS_LIBS - the kjs library and all depending libraries |
||||
# KDE4_KNEWSTUFF_LIBS - the knewstuff library and all depending libraries |
||||
# KDE4_KDEPRINT_LIBS - the kdeprint library and all depending libraries |
||||
# KDE4_KSPELL2_LIBS - the kspell2 library and all depending libraries |
||||
# KDE4_KDNSSD_LIBS - the kdnssd library and all depending libraries |
||||
# KDE4_KDESU_LIBS - the kdesu library and all depending libraries |
||||
# KDE4_PHONONCORE_LIBS - the phononcore library and all depending librairies |
||||
# KDE4_PHONONUI_LIBRARIES - the phononui library and all depending librairies |
||||
# KDE4_KDEFX_LIBS - the kdefx library and all depending librairies |
||||
# KDE4_THREADWEAVER_LIBRARIES- the threadweaver library and all depending libraries |
||||
# KDE4_SOLID_LIBS - the solid library and all depending libraries |
||||
# KDE4_SOLIDIFACES_LIBS - the solid iface library and all depending libraries |
||||
# KDE4_KNOTIFYCONFIG_LIBS - the knotify config library and all depending libraries |
||||
# KDE4_KROSSCORE_LIBS - the kross core library and all depending libraries |
||||
# KDE4_KTEXTEDITOR_LIBS - the ktexteditor library and all depending libraries |
||||
# KDE4_KWALLETCLIENT_LIBS - the kwallet client library and all depending libraries |
||||
# |
||||
# This module defines a bunch of variables used as locations |
||||
# for install directories. They are all interpreted relative |
||||
# to CMAKE_INSTALL_PREFIX |
||||
# |
||||
# BIN_INSTALL_DIR - the directory where executables be installed (default is prefix/bin) |
||||
# SBIN_INSTALL_DIR - the directory where system executables will be installed (default is prefix/sbin) |
||||
# LIB_INSTALL_DIR - the directory where libraries will be installed (default is prefix/lib) |
||||
# CONFIG_INSTALL_DIR - the config file install dir |
||||
# DATA_INSTALL_DIR - the parent directory where applications can install their data |
||||
# HTML_INSTALL_DIR - the HTML install dir for documentation |
||||
# ICON_INSTALL_DIR - the icon install dir (default prefix/share/icons/) |
||||
# INFO_INSTALL_DIR - the kde info install dir (default prefix/info) |
||||
# KCFG_INSTALL_DIR - the install dir for kconfig files |
||||
# LOCALE_INSTALL_DIR - the install dir for translations |
||||
# MAN_INSTALL_DIR - the kde man page install dir (default prefix/man/) |
||||
# MIME_INSTALL_DIR - the install dir for the mimetype desktop files |
||||
# PLUGIN_INSTALL_DIR - the subdirectory relative to the install prefix where plugins will be installed (default is ${KDE4_LIB_INSTALL_DIR}/kde4) |
||||
# SERVICES_INSTALL_DIR - the install dir for service (desktop, protocol, ...) files |
||||
# SERVICETYPES_INSTALL_DIR - the install dir for servicestypes desktop files |
||||
# SOUND_INSTALL_DIR - the install dir for sound files |
||||
# TEMPLATES_INSTALL_DIR - the install dir for templates (Create new file...) |
||||
# WALLPAPER_INSTALL_DIR - the install dir for wallpapers |
||||
# KCONF_UPDATE_INSTALL_DIR - the kconf_update install dir |
||||
# XDG_APPS_DIR - the XDG apps dir |
||||
# XDG_DIRECTORY_DIR - the XDG directory |
||||
# DBUS_INTERFACES_DIR - the directory where dbus interfaces be installed (default is prefix/share/dbus-1/interfaces |
||||
# |
||||
# The following variables are provided, but are seem to be unused: |
||||
# LIBS_HTML_INSTALL_DIR /share/doc/HTML CACHE STRING "Is this still used ?") |
||||
# APPLNK_INSTALL_DIR /share/applnk CACHE STRING "Is this still used ?") |
||||
# |
||||
# The following user adjustable options are provided: |
||||
# |
||||
# KDE4_ENABLE_FINAL - enable KDE-style enable-final all-in-one-compilation |
||||
# KDE4_BUILD_TESTS - enable this to build the testcases |
||||
# KDE4_ENABLE_FPIE - enable it to use gcc Position Independent Executables feature |
||||
# |
||||
# It also adds the following macros (from KDE4Macros.cmake) |
||||
# KDE4_ADD_UI_FILES (SRCS_VAR file1.ui ... fileN.ui) |
||||
# Use this to add Qt designer ui files to your application/library. |
||||
# |
||||
# KDE4_ADD_UI3_FILES (SRCS_VAR file1.ui ... fileN.ui) |
||||
# Use this to add Qt designer ui files from Qt version 3 to your application/library. |
||||
# |
||||
# KDE4_ADD_KCFG_FILES (SRCS_VAR [GENERATE_MOC] file1.kcfgc ... fileN.kcfgc) |
||||
# Use this to add KDE config compiler files to your application/library. |
||||
# Use optional GENERATE_MOC to generate moc if you use signals in your kcfg files. |
||||
# |
||||
# KDE4_ADD_WIDGET_FILES (SRCS_VAR file1.widgets ... fileN.widgets) |
||||
# Use this to add widget description files for the makekdewidgets code generator |
||||
# for Qt Designer plugins. |
||||
# |
||||
# KDE4_AUTOMOC(file1 ... fileN) |
||||
# Call this if you want to have automatic moc file handling. |
||||
# This means if you include "foo.moc" in the source file foo.cpp |
||||
# a moc file for the header foo.h will be created automatically. |
||||
# You can set the property SKIP_AUTOMAKE using SET_SOURCE_FILES_PROPERTIES() |
||||
# to exclude some files in the list from being processed. |
||||
# If you don't want automoc, you can also use QT4_WRAP_CPP() or QT4_GENERATE_MOC() |
||||
# from FindQt4.cmake to have the moc files generated. This will be faster |
||||
# but require more manual work. |
||||
# |
||||
# KDE4_INSTALL_LIBTOOL_FILE ( subdir target ) |
||||
# This will create and install a simple libtool file for the |
||||
# given target. This might be required for other software. |
||||
# The libtool file will be install in subdir, relative to CMAKE_INSTALL_PREFIX . |
||||
# |
||||
# KDE4_CREATE_FINAL_FILES (filename_CXX filename_C file1 ... fileN) |
||||
# This macro is intended mainly for internal uses. |
||||
# It is used for enable-final. It will generate two source files, |
||||
# one for the C files and one for the C++ files. |
||||
# These files will have the names given in filename_CXX and filename_C. |
||||
# |
||||
# KDE4_ADD_PLUGIN ( name [WITH_PREFIX] file1 ... fileN ) |
||||
# Create a KDE plugin (KPart, kioslave, etc.) from the given source files. |
||||
# It supports KDE4_ENABLE_FINAL. |
||||
# If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't. |
||||
# It creates and installs an appropriate libtool la-file. |
||||
# |
||||
# KDE4_ADD_KDEINIT_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN) |
||||
# Create a KDE application in the form of a module loadable via kdeinit. |
||||
# A library named kdeinit_<name> will be created and a small executable which links to it. |
||||
# It supports KDE4_ENABLE_FINAL |
||||
# If the executable has to be run from the buildtree (e.g. unit tests and code generators |
||||
# used later on when compiling), set the option RUN_UNINSTALLED. |
||||
# If the executable doesn't have a GUI, use the option NOGUI. By default on OS X |
||||
# application bundles are created, with the NOGUI option no bundles but simple executables |
||||
# are created. Currently it doesn't have any effect on other platforms. |
||||
# |
||||
# KDE4_ADD_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN) |
||||
# Equivalent to ADD_EXECUTABLE(), but additionally adds support for KDE4_ENABLE_FINAL. |
||||
# If you don't need support for KDE4_ENABLE_FINAL, you can just use the |
||||
# normal ADD_EXECUTABLE(). |
||||
# If the executable has to be run from the buildtree (e.g. unit tests and code generators |
||||
# used later on when compiling), set the option RUN_UNINSTALLED. |
||||
# If the executable doesn't have a GUI, use the option NOGUI. By default on OS X |
||||
# application bundles are created, with the NOGUI option no bundles but simple executables |
||||
# are created. Currently it doesn't have any effect on other platforms. |
||||
# |
||||
# KDE4_ADD_LIBRARY (name [STATIC | SHARED | MODULE ] file1 ... fileN) |
||||
# Equivalent to ADD_LIBRARY(), but additionally it supports KDE4_ENABLE_FINAL |
||||
# and under Windows it adds a -DMAKE_<name>_LIB definition to the compilation. |
||||
# |
||||
# KDE4_INSTALL_ICONS( path theme) |
||||
# Installs all png and svgz files in the current directory to the icon |
||||
# directoy given in path, in the subdirectory for the given icon theme. |
||||
# |
||||
# KDE4_CREATE_HANDBOOK( docbookfile ) |
||||
# Create the handbook from the docbookfile (using meinproc) |
||||
# |
||||
# KDE4_INSTALL_HANDBOOK() |
||||
# Install the handbook documentation |
||||
# |
||||
# KDE4_CREATE_HTML_HANDBOOK( docbookfile ) |
||||
# Create HTML version of the handbook from the docbookfile (using meinproc) |
||||
# |
||||
# _KDE4_PLATFORM_INCLUDE_DIRS is used only internally |
||||
# _KDE4_PLATFORM_DEFINITIONS is used only internally |
||||
# |
||||
# |
||||
# Copyright (c) 2006, Alexander Neundorf <neundorf@kde.org> |
||||
# Copyright (c) 2006, Laurent Montel, <montel@kde.org> |
||||
# |
||||
# Redistribution and use is allowed according to the terms of the BSD license. |
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
||||
# |
||||
# Modified by PhobosK <phobosk@mail.kbfx.org> |
||||
|
||||
|
||||
INCLUDE (MacroEnsureVersion) |
||||
|
||||
cmake_minimum_required(VERSION 2.4.3 FATAL_ERROR) |
||||
|
||||
set(QT_MIN_VERSION "4.2.0") |
||||
#this line includes FindQt4.cmake, which searches the Qt library and headers |
||||
find_package(Qt4 REQUIRED) |
||||
|
||||
if (NOT QT_DBUSXML2CPP_EXECUTABLE) |
||||
message(FATAL_ERROR "Qt4 qdbusxml2cpp was not found. Make sure it has been built and installed by Qt") |
||||
endif (NOT QT_DBUSXML2CPP_EXECUTABLE) |
||||
|
||||
|
||||
# Perl is required for building KDE software, |
||||
find_package(Perl REQUIRED) |
||||
|
||||
# remove once we require cmake >= 2.4.4, then the REQUIRED flag is honored by FindPerl.cmake, Alex |
||||
if(NOT PERL_FOUND) |
||||
message(FATAL_ERROR "Perl was not found. Make sure it has installed on your system") |
||||
endif(NOT PERL_FOUND) |
||||
|
||||
include (MacroLibrary) |
||||
include (CheckCXXCompilerFlag) |
||||
|
||||
#add some KDE specific stuff |
||||
|
||||
# the following are directories where stuff will be installed to |
||||
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) |
||||
|
||||
|
||||