summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-25 14:43:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-25 14:43:11 -0600
commit4988ec1a102e4e80aa4675c9157a80725c3c2dba (patch)
treec92ca0102dee219ef801d530e46c5234fbd26e20
parent44bff95885fd2ad8d17e4b4f95f53e181b774028 (diff)
downloadkbfx-4988ec1a102e4e80aa4675c9157a80725c3c2dba.tar.gz
kbfx-4988ec1a102e4e80aa4675c9157a80725c3c2dba.zip
Initial attempt at using the standard CMake system
-rw-r--r--CMakeLists.txt345
-rw-r--r--CMakeLists.txt.orig288
-rw-r--r--ConfigureChecks.cmake53
-rw-r--r--kbfxlib/CMakeLists.txt13
-rw-r--r--plugins/CMakeLists.txt17
-rw-r--r--skin/CMakeLists.txt13
-rw-r--r--skin/raster/CMakeLists.txt13
7 files changed, 494 insertions, 248 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 97c4284..31e405f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,71 +1,47 @@
-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/trinity/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/trinity/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/trinity/lib
- /opt/kde4/lib
- /usr/kde/3.5/lib
- /usr/lib
- /usr/local/lib
- /opt/lib
- )
-
-# Setting versions
+#################################################
+#
+# (C) 2011 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+cmake_minimum_required( VERSION 2.8 )
+
+
+##### general package setup #####################
+
+project( kio-locate )
+
+
+##### include essential cmake modules ###########
+
+include( CheckCXXSourceCompiles )
+include( CheckFunctionExists )
+include( CheckIncludeFileCXX )
+include( CheckLibraryExists )
+include( CheckStructHasMember )
+include( CheckSymbolExists )
+include( CheckTypeSize )
+include( FindPkgConfig )
+
+
+##### include our cmake modules #################
+
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
+include( TDEMacros )
+
+
+##### setup install paths #######################
+
+include( TDESetupPaths )
+tde_setup_paths( )
+
+
+##### set version numbers #######################
# For versions that are stable set to 1, else to 0
SET(APPLICATION_STABLE 1)
@@ -95,194 +71,67 @@ 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)
-
-IF (NOT QT_FOUND)
- MESSAGE("TQt3 not found, assuming TQt4 was desired")
- SET(TQT_INCLUDE_DIR "/usr/include/qt4")
-ELSE ()
- SET(TQT_INCLUDE_DIR "${QT_INCLUDE_DIR}")
-ENDIF ()
-
-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
- ${TQT_INCLUDE_DIR}
- ${KDE3_INCLUDE_DIR}
- ${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})
-
-SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt")
-SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc")
-
-SET(CMAKE_CXX_FLAGS "-I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT")
-
-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)
+
+##### user requested modules ####################
+
+option( BUILD_ALL "Build all" OFF )
+option( BUILD_DOC "Build doc" ${BUILD_ALL} )
+option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
+option( USE_STRIGI "Enable use of Strigi search support (disabled)" OFF )
+option( USE_MENUDRAKE "Use 'menudrake' instead of 'kmenuedit' in Mandriva (auto)" ON )
+
+
+##### configure checks ##########################
+
+include( ConfigureChecks.cmake )
+
+
+###### global compiler settings #################
+
+add_definitions(
+ -DHAVE_CONFIG_H
+)
+
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS} -DTQT_THREAD_SUPPORT" )
+set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
+set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
+
+
+##### source directories ########################
+
+add_subdirectory( kbfxlib )
+add_subdirectory( src )
+add_subdirectory( configdialog )
+add_subdirectory( skin )
+add_subdirectory( images )
+add_subdirectory( plugins )
+tde_conditional_add_subdirectory( BUILD_DOC doc )
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
+tde_conditional_add_subdirectory( USE_STRIGI plugins/strigi )
SET(DIST_INCLUDE "kbfx-9999.ebuild kbfx.spec kbfx-${GENTOO_VERSION}.ebuild strigi-${STRIGI_VERSION}.ebuild")
SET(DIST_EXCLUDE "Helperstuff")
-CONFIGURE_FILE(
+configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules/makedist.sh.in"
"${CMAKE_CURRENT_BINARY_DIR}/makedist.sh"
IMMEDIATE
@ONLY)
-ADD_CUSTOM_TARGET(dist
+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")
+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")
+
+
+##### write configure files #####################
+configure_file(config.h.in config.h @ONLY)
+configure_file(kbfx.spec.in kbfx.spec @ONLY)
+configure_file(kbfx.ebuild.in kbfx-${GENTOO_VERSION}.ebuild @ONLY)
+configure_file(strigi.ebuild.in strigi-${STRIGI_VERSION}.ebuild @ONLY)
+configure_file(kbfx-svn.ebuild.in kbfx-9999.ebuild @ONLY)
diff --git a/CMakeLists.txt.orig b/CMakeLists.txt.orig
new file mode 100644
index 0000000..97c4284
--- /dev/null
+++ b/CMakeLists.txt.orig
@@ -0,0 +1,288 @@
+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/trinity/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/trinity/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/trinity/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)
+
+IF (NOT QT_FOUND)
+ MESSAGE("TQt3 not found, assuming TQt4 was desired")
+ SET(TQT_INCLUDE_DIR "/usr/include/qt4")
+ELSE ()
+ SET(TQT_INCLUDE_DIR "${QT_INCLUDE_DIR}")
+ENDIF ()
+
+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
+ ${TQT_INCLUDE_DIR}
+ ${KDE3_INCLUDE_DIR}
+ ${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})
+
+SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt")
+SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc")
+
+SET(CMAKE_CXX_FLAGS "-I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT")
+
+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")
+
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 0000000..fdf3435
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,53 @@
+#################################################
+#
+# (C) 2011 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+if( BUILD_TRANSLATIONS AND NOT DEFINED MSGFMT_EXECUTABLE )
+ find_program( MSGFMT_EXECUTABLE msgfmt )
+ if( NOT MSGFMT_EXECUTABLE )
+ tde_message_fatal( "msgfmt program is required, but was not found on your system" )
+ endif( )
+endif( )
+
+check_type_size( "int" SIZEOF_INT BUILTIN_TYPES_ONLY )
+check_type_size( "long" SIZEOF_LONG BUILTIN_TYPES_ONLY )
+
+check_include_file( stdint.h HAVE_STDINT_H )
+check_include_file( systems.h HAVE_SYSTEMS_H )
+check_include_file( linux/inotify.h HAVE_INOTIFY )
+
+check_function_exists( statvfs HAVE_STATVFS )
+
+
+#### Find strigi if needed #######################
+
+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)
+
+# common required stuff
+find_package( TQt )
+find_package( TDE )
+
+
+#### Find menudrake if needed #####################
+
+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) \ No newline at end of file
diff --git a/kbfxlib/CMakeLists.txt b/kbfxlib/CMakeLists.txt
new file mode 100644
index 0000000..50b1962
--- /dev/null
+++ b/kbfxlib/CMakeLists.txt
@@ -0,0 +1,13 @@
+#################################################
+#
+# (C) 2011 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( common )
+add_subdirectory( data ) \ No newline at end of file
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
new file mode 100644
index 0000000..14350db
--- /dev/null
+++ b/plugins/CMakeLists.txt
@@ -0,0 +1,17 @@
+#################################################
+#
+# (C) 2011 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( applications )
+add_subdirectory( common )
+add_subdirectory( plasmoids )
+add_subdirectory( recentstuff )
+add_subdirectory( settings )
+add_subdirectory( strigi ) \ No newline at end of file
diff --git a/skin/CMakeLists.txt b/skin/CMakeLists.txt
new file mode 100644
index 0000000..9eeaf67
--- /dev/null
+++ b/skin/CMakeLists.txt
@@ -0,0 +1,13 @@
+#################################################
+#
+# (C) 2011 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( raster )
+add_subdirectory( vector ) \ No newline at end of file
diff --git a/skin/raster/CMakeLists.txt b/skin/raster/CMakeLists.txt
new file mode 100644
index 0000000..62f59c8
--- /dev/null
+++ b/skin/raster/CMakeLists.txt
@@ -0,0 +1,13 @@
+#################################################
+#
+# (C) 2011 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( 2panels )
+add_subdirectory( default ) \ No newline at end of file