summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt14
-rw-r--r--cmakemodules/FindKdeLibs.cmake519
-rw-r--r--configdialog/CMakeLists.txt1
3 files changed, 410 insertions, 124 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 52e2459..d7ac656 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,6 +166,13 @@ ELSE (NOT USE_KDE4)
)
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
@@ -179,6 +186,8 @@ INCLUDE_DIRECTORIES(
${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}
@@ -210,6 +219,11 @@ 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)
diff --git a/cmakemodules/FindKdeLibs.cmake b/cmakemodules/FindKdeLibs.cmake
index 1259480..b0929df 100644
--- a/cmakemodules/FindKdeLibs.cmake
+++ b/cmakemodules/FindKdeLibs.cmake
@@ -1,117 +1,397 @@
-#INCLUDE(FindQt3)
-#INCLUDE(FindQt)
-#INCLUDE(FindKDE3)
-INCLUDE(kdesvnMacros)
+include(FindQt3)
+
+# - Find the KDE3 include and library dirs, KDE preprocessors and define a some macros
+#
+# This module defines the following variables:
+# KDE3_DEFINITIONS - compiler definitions required for compiling KDE software
+# KDE3_INCLUDE_DIR - the KDE include directory
+# KDE3_INCLUDE_DIRS - the KDE and the Qt include directory, for use with INCLUDE_DIRECTORIES()
+# KDE3_LIB_DIR - the directory where the KDE libraries are installed, for use with LINK_DIRECTORIES()
+# QT_AND_KDECORE_LIBS - this contains both the Qt and the kdecore library
+# KDE3_DCOPIDL_EXECUTABLE - the dcopidl executable
+# KDE3_DCOPIDL2CPP_EXECUTABLE - the dcopidl2cpp executable
+# KDE3_KCFGC_EXECUTABLE - the kconfig_compiler executable
+# KDE3_FOUND - set to TRUE if all of the above has been found
+#
+# The following user adjustable options are provided:
+#
+# KDE3_BUILD_TESTS - enable this to build KDE testcases
+#
+#
+# It also adds the following macros (from KDE3Macros.cmake)
+# SRCS_VAR is always the variable which contains the list of source files for your application or library.
+#
+# KDE3_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.
+#
+# KDE3_ADD_MOC_FILES(SRCS_VAR file1 ... fileN )
+# If you don't use the KDE3_AUTOMOC() macro, for the files
+# listed here moc files will be created (named "foo.moc.cpp")
+#
+# KDE3_ADD_DCOP_SKELS(SRCS_VAR header1.h ... headerN.h )
+# Use this to generate DCOP skeletions from the listed headers.
+#
+# KDE3_ADD_DCOP_STUBS(SRCS_VAR header1.h ... headerN.h )
+# Use this to generate DCOP stubs from the listed headers.
+#
+# KDE3_ADD_UI_FILES(SRCS_VAR file1.ui ... fileN.ui )
+# Use this to add the Qt designer ui files to your application/library.
+#
+# KDE3_ADD_KCFG_FILES(SRCS_VAR file1.kcfgc ... fileN.kcfgc )
+# Use this to add KDE kconfig compiler files to your application/library.
+#
+# KDE3_INSTALL_LIBTOOL_FILE(target)
+# This will create and install a simple libtool file for the given target.
+#
+# KDE3_ADD_EXECUTABLE(name file1 ... fileN )
+# Currently identical to ADD_EXECUTABLE(), may provide some advanced features in the future.
+#
+# KDE3_ADD_KPART(name [WITH_PREFIX] file1 ... fileN )
+# Create a KDE plugin (KPart, kioslave, etc.) from the given source files.
+# 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.
+#
+# KDE3_ADD_KDEINIT_EXECUTABLE(name 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.
+#
+# The option KDE3_ENABLE_FINAL to enable all-in-one compilation is
+# no longer supported.
+#
+#
+# Author: Alexander Neundorf <neundorf@kde.org>
+
+IF(NOT UNIX AND KDE3_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Compiling KDE3 applications and libraries under Windows is not supported")
+ENDIF(NOT UNIX AND KDE3_FIND_REQUIRED)
+
+# If Qt4 has already been found, fail.
+IF(QT4_FOUND)
+ IF(KDE3_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "KDE3/Qt3 and Qt4 cannot be used together in one project.")
+ ELSE(KDE3_FIND_REQUIRED)
+ IF(NOT KDE3_FIND_QUIETLY)
+ MESSAGE( STATUS "KDE3/Qt3 and Qt4 cannot be used together in one project.")
+ ENDIF(NOT KDE3_FIND_QUIETLY)
+ RETURN()
+ ENDIF(KDE3_FIND_REQUIRED)
+ENDIF(QT4_FOUND)
+
+
+SET(QT_MT_REQUIRED TRUE)
+#SET(QT_MIN_VERSION "3.0.0")
+
+#this line includes FindQt.cmake, which searches the Qt library and headers
+IF(KDE3_FIND_REQUIRED)
+ SET(_REQ_STRING_KDE3 "REQUIRED")
+ENDIF(KDE3_FIND_REQUIRED)
+
+FIND_PACKAGE(Qt3 ${_REQ_STRING_KDE3})
+FIND_PACKAGE(X11 ${_REQ_STRING_KDE3})
+
+
+#now try to find some kde stuff
+FIND_PROGRAM(KDECONFIG_EXECUTABLE NAMES kde-config
+ HINTS
+ $ENV{KDEDIR}/bin
+ PATHS
+ /opt/kde3/bin
+ /opt/trinity/bin
+ /opt/kde/bin
+ /usr/kde3/bin
+ )
+
+SET(KDE3PREFIX)
+IF(KDECONFIG_EXECUTABLE)
+ EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --version
+ OUTPUT_VARIABLE kde_config_version )
+
+ STRING(REGEX MATCH "KDE: .\\." kde_version ${kde_config_version})
+ IF (${kde_version} MATCHES "KDE: 3\\.")
+ EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --prefix
+ OUTPUT_VARIABLE kdedir )
+ STRING(REGEX REPLACE "\n" "" KDE3PREFIX "${kdedir}")
+
+ ENDIF (${kde_version} MATCHES "KDE: 3\\.")
+ENDIF(KDECONFIG_EXECUTABLE)
+
+
+
+# at first the KDE include direcory
+# kpassdlg.h comes from kdeui and doesn't exist in KDE4 anymore
+FIND_PATH(KDE3_INCLUDE_DIR kpassdlg.h
+ HINTS
+ $ENV{KDEDIR}/include
+ ${KDE3PREFIX}/include
+ PATHS
+ /opt/kde3/include
+ /opt/trinity/include
+ /opt/kde/include
+ /usr/include/kde
+ /usr/local/include/kde
+)
+
+# override this
+# SET(KDE3_INCLUDE_DIR "/usr/include/kde")
+
+#now the KDE library directory
+FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore
+ HINTS
+ $ENV{KDEDIR}/lib
+ ${KDE3PREFIX}/lib
+ PATHS
+ /opt/kde3/lib
+ /opt/trinity/lib
+ /opt/kde/lib
+ /usr/kde3/lib
+)
+
+SET(QT_AND_KDECORE_LIBS ${QT_LIBRARIES} ${KDE3_KDECORE_LIBRARY})
+
+GET_FILENAME_COMPONENT(KDE3_LIB_DIR ${KDE3_KDECORE_LIBRARY} PATH )
+
+IF(NOT KDE3_LIBTOOL_DIR)
+ IF(KDE3_KDECORE_LIBRARY MATCHES lib64)
+ SET(KDE3_LIBTOOL_DIR /lib64/kde3)
+ ELSE(KDE3_KDECORE_LIBRARY MATCHES lib64)
+ SET(KDE3_LIBTOOL_DIR /lib/kde3)
+ ENDIF(KDE3_KDECORE_LIBRARY MATCHES lib64)
+ENDIF(NOT KDE3_LIBTOOL_DIR)
+
+#now search for the dcop utilities
+FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl
+ HINTS
+ $ENV{KDEDIR}/bin
+ ${KDE3PREFIX}/bin
+ PATHS
+ /opt/kde3/bin
+ /opt/trinity/bin
+ /opt/kde/bin
+ /usr/kde3/bin
+ )
+
+FIND_PROGRAM(KDE3_DCOPIDL2CPP_EXECUTABLE NAMES dcopidl2cpp
+ HINTS
+ $ENV{KDEDIR}/bin
+ ${KDE3PREFIX}/bin
+ PATHS
+ /opt/kde3/bin
+ /opt/trinity/bin
+ /opt/kde/bin
+ /usr/kde3/bin
+ )
+
+FIND_PROGRAM(KDE3_KCFGC_EXECUTABLE NAMES kconfig_compiler
+ HINTS
+ $ENV{KDEDIR}/bin
+ ${KDE3PREFIX}/bin
+ PATHS
+ /opt/kde3/bin
+ /opt/trinity/bin
+ /opt/kde/bin
+ /usr/kde3/bin
+ )
+
+
+#SET KDE3_FOUND
+IF (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE)
+ SET(KDE3_FOUND TRUE)
+ELSE (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE)
+ SET(KDE3_FOUND FALSE)
+ENDIF (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE)
+
+# add some KDE specific stuff
+SET(KDE3_DEFINITIONS -DQT_CLEAN_NAMESPACE -D_GNU_SOURCE)
+
+# set compiler flags only if KDE3 has actually been found
+IF(KDE3_FOUND)
+ SET(_KDE3_USE_FLAGS FALSE)
+ IF(CMAKE_COMPILER_IS_GNUCXX)
+ SET(_KDE3_USE_FLAGS TRUE) # use flags for gnu compiler
+ EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version
+ OUTPUT_VARIABLE out)
+ # gnu gcc 2.96 does not work with flags
+ # I guess 2.95 also doesn't then
+ IF("${out}" MATCHES "2.9[56]")
+ SET(_KDE3_USE_FLAGS FALSE)
+ ENDIF("${out}" MATCHES "2.9[56]")
+ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+ #only on linux, but NOT e.g. on FreeBSD:
+ IF(CMAKE_SYSTEM_NAME MATCHES "Linux" AND _KDE3_USE_FLAGS)
+ SET (KDE3_DEFINITIONS ${KDE3_DEFINITIONS} -D_XOPEN_SOURCE=500 -D_BSD_SOURCE)
+ SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
+ SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-exceptions -fno-check-new -fno-common")
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux" AND _KDE3_USE_FLAGS)
+
+ # works on FreeBSD, NOT tested on NetBSD and OpenBSD
+ IF (CMAKE_SYSTEM_NAME MATCHES BSD AND _KDE3_USE_FLAGS)
+ SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
+ SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
+ ENDIF (CMAKE_SYSTEM_NAME MATCHES BSD AND _KDE3_USE_FLAGS)
+
+ # if no special buildtype is selected, add -O2 as default optimization
+ IF (NOT CMAKE_BUILD_TYPE AND _KDE3_USE_FLAGS)
+ SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT -O2")
+ SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT -O2")
+ ENDIF (NOT CMAKE_BUILD_TYPE AND _KDE3_USE_FLAGS)
+
+#SET(CMAKE_SHARED_LINKER_FLAGS "-avoid-version -module -Wl,--no-undefined -Wl,--allow-shlib-undefined")
+#SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc")
+#SET(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc")
+ENDIF(KDE3_FOUND)
+
+
+# KDE3Macros.cmake contains all the KDE specific macros
INCLUDE(KDE3Macros)
-FILE(GLOB GLOB_PATHS_INCLUDE /usr/lib*/qt-3*/include/)
-FIND_PROGRAM(PKG_CONFIG NAMES pkg-config)
-EXECUTE_PROCESS(COMMAND ${PKG_CONFIG} "--variable=prefix" "qt-mt"
- OUTPUT_VARIABLE _qt_mt_path
- ERROR_QUIET
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-SET(QT_MT_PATH ${_qt_mt_path} CACHE STRING "QT Path" FORCE)
-FIND_PATH(QT_INCLUDE_DIR_PLUS qt.h
- ${GLOB_PATHS_INCLUDE}
- ${QT_MT_PATH}/include)
-IF (NOT QT_INCLUDE_DIR)
- SET(QT_INCLUDE_DIR ${QT_INCLUDE_DIR_PLUS})
-ENDIF (NOT QT_INCLUDE_DIR)
-
-FIND_PROGRAM(CMAKE_UNAME uname ${BIN_SEARCH_PATHES})
-IF(CMAKE_UNAME)
- EXECUTE_PROCESS(COMMAND ${CMAKE_UNAME} "-m"
- OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR
- ERROR_QUIET
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- IF("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "64")
- SET(LIB_SUFFIX "64" CACHE STRING "Define suffix of directory name (32/64)" FORCE)
- ELSE("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "64")
- SET(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" FORCE)
- ENDIF("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "64")
-ENDIF(CMAKE_UNAME)
-
-SET(INCLUDE_SEARCH_PATHES
- ${INCLUDE_SEARCH_PATHES}
- ${KDE3_INCLUDE_DIRS})
-
-SET(LIB_SEARCH_PATHES
- ${LIB_SEARCH_PATHES}
- ${KDE3_LIB_DIR})
+
+MACRO (KDE3_PRINT_RESULTS)
+ IF(KDE3_INCLUDE_DIR)
+ MESSAGE(STATUS "Found KDE3 include dir: ${KDE3_INCLUDE_DIR}")
+ ELSE(KDE3_INCLUDE_DIR)
+ MESSAGE(STATUS "Didn't find KDE3 headers")
+ ENDIF(KDE3_INCLUDE_DIR)
+
+ IF(KDE3_LIB_DIR)
+ MESSAGE(STATUS "Found KDE3 library dir: ${KDE3_LIB_DIR}")
+ ELSE(KDE3_LIB_DIR)
+ MESSAGE(STATUS "Didn't find KDE3 core library")
+ ENDIF(KDE3_LIB_DIR)
+
+ IF(KDE3_DCOPIDL_EXECUTABLE)
+ MESSAGE(STATUS "Found KDE3 dcopidl preprocessor: ${KDE3_DCOPIDL_EXECUTABLE}")
+ ELSE(KDE3_DCOPIDL_EXECUTABLE)
+ MESSAGE(STATUS "Didn't find the KDE3 dcopidl preprocessor")
+ ENDIF(KDE3_DCOPIDL_EXECUTABLE)
+
+ IF(KDE3_DCOPIDL2CPP_EXECUTABLE)
+ MESSAGE(STATUS "Found KDE3 dcopidl2cpp preprocessor: ${KDE3_DCOPIDL2CPP_EXECUTABLE}")
+ ELSE(KDE3_DCOPIDL2CPP_EXECUTABLE)
+ MESSAGE(STATUS "Didn't find the KDE3 dcopidl2cpp preprocessor")
+ ENDIF(KDE3_DCOPIDL2CPP_EXECUTABLE)
+
+ IF(KDE3_KCFGC_EXECUTABLE)
+ MESSAGE(STATUS "Found KDE3 kconfig_compiler preprocessor: ${KDE3_KCFGC_EXECUTABLE}")
+ ELSE(KDE3_KCFGC_EXECUTABLE)
+ MESSAGE(STATUS "Didn't find the KDE3 kconfig_compiler preprocessor")
+ ENDIF(KDE3_KCFGC_EXECUTABLE)
+
+ENDMACRO (KDE3_PRINT_RESULTS)
+
+
+IF (KDE3_FIND_REQUIRED AND NOT KDE3_FOUND)
+ #bail out if something wasn't found
+ KDE3_PRINT_RESULTS()
+ MESSAGE(FATAL_ERROR "Could NOT find everything required for compiling KDE 3 programs")
+
+ENDIF (KDE3_FIND_REQUIRED AND NOT KDE3_FOUND)
+
+
+IF (NOT KDE3_FIND_QUIETLY)
+ KDE3_PRINT_RESULTS()
+ENDIF (NOT KDE3_FIND_QUIETLY)
+
+#add the found Qt and KDE include directories to the current include path
+SET(KDE3_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${KDE3_INCLUDE_DIR})
+
+include(kdesvnMacros)
+
+IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ SET(DEF_SUFF "")
+ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ SET(DEF_SUFF 64)
+ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+
+set(LIB_SUFFIX ${DEF_SUFF} CACHE STRING "Define suffix of directory name (32/64)" FORCE)
+
+SET(LIB_SEARCH_PATHES ${KDE3_LIB_DIR}
+ $ENV{KDEDIR}/lib
+ /opt/kde/lib
+ /opt/kde3/lib
+ /opt/trinity/lib
+ /usr/lib
+ /usr/local/lib
+ /usr/kde3/lib
+)
IF (LIB_SUFFIX)
SET(LIB_SEARCH_PATHES
$ENV{KDEDIR}/lib${LIB_SUFFIX}
- $ENV{HOME}/lib${LIB_SUFFIX}
- $ENV{HOME}/usr/lib${LIB_SUFFIX}
- /opt/lib${LIB_SUFFIX}
/opt/kde/lib${LIB_SUFFIX}
/opt/kde3/lib${LIB_SUFFIX}
+ /opt/trinity/lib${LIB_SUFFIX}
/usr/lib${LIB_SUFFIX}
- /usr/kde/3.5/lib${LIB_SUFFIX}
/usr/local/lib${LIB_SUFFIX}
- ${LIB_SEARCH_PATHES}
- )
+ ${LIB_SEARCH_PATHES})
ENDIF (LIB_SUFFIX)
-
-
-FIND_LIBRARY(M_LIBRARY NAMES m
+FIND_LIBRARY(KDE3_UI_LIBRARY NAMES kdeui
PATHS
${LIB_SEARCH_PATHES}
)
-FIND_LIBRARY(KDE3_UI_LIBRARY NAMES kdeui
+FIND_LIBRARY(KDE3_PART_LIBRARY NAMES kparts
PATHS
${LIB_SEARCH_PATHES}
)
-FIND_LIBRARY(KDE3_PART_LIBRARY NAMES kparts
+FIND_LIBRARY(KDE3_KIO_LIBRARY NAMES kio
PATHS
${LIB_SEARCH_PATHES}
)
-FIND_LIBRARY(KDE3_KIO_LIBRARY NAMES kio
+FIND_LIBRARY(KDE3_DCOP_LIBRARY NAMES DCOP
PATHS
${LIB_SEARCH_PATHES}
)
-FIND_LIBRARY(KDE3_KHTML_LIBRARY NAMES khtml
+FIND_LIBRARY(KDE3_WALLET_LIBRARY NAMES kwalletclient
PATHS
${LIB_SEARCH_PATHES}
)
-FIND_LIBRARY(KDE3_DCOP_LIBRARY NAMES DCOP
+FIND_LIBRARY(KDE3_KINIT_KDED_LIBRARY NAMES kdeinit_kded
PATHS
${LIB_SEARCH_PATHES}
)
-FIND_PROGRAM(KDE3_KDECONFIG_EXECUTABLE NAME kde-config
- PATHS ${BIN_SEARCH_PATHES})
+FIND_PROGRAM(KDE3_KDECONFIG_EXECUTABLE NAME kde-config PATHS
+ $ENV{KDEDIR}/bin
+ /opt/kde/bin
+ /opt/kde3/bin
+ /opt/trinity/bin
+ /usr/kde3/bin
+)
FIND_PROGRAM(MSGFMT
- NAMES gmsgfmt msgfmt
- PATHS ${BIN_SEARCH_PATHES})
-
+ NAMES gmsgfmt msgfmt)
FIND_PROGRAM(STRIP
- NAMES strip
- PATHS ${BIN_SEARCH_PATHES})
-
-FIND_PROGRAM(KDE3_MEINPROC_EXECUTABLE NAME meinproc
- PATHS ${BIN_SEARCH_PATHES})
+ NAMES strip)
+
+FIND_PROGRAM(KDE3_MEINPROC_EXECUTABLE NAME meinproc PATHS
+ ${KDE3_BIN_INSTALL_DIR}
+ $ENV{KDEDIR}/bin
+ /opt/kde/bin
+ /opt/kde3/bin
+ /opt/trinity/bin
+ /usr/kde3/bin
+)
IF(KDE3_MEINPROC_EXECUTABLE)
MESSAGE(STATUS "Found meinproc: ${KDE3_MEINPROC_EXECUTABLE}")
ELSE(KDE3_MEINPROC_EXECUTABLE)
- MESSAGE(FATAL_ERROR "Could NOT find meinproc program!")
+ MESSAGE(STATUS "Didn't find meinproc!")
ENDIF(KDE3_MEINPROC_EXECUTABLE)
IF(MSGFMT)
- EXECUTE_PROCESS(COMMAND ${MSGFMT} "--version"
- OUTPUT_VARIABLE _msgout
- ERROR_QUIET
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+ EXECUTE_PROCESS(COMMAND ${MSGFMT} "--version" "2>&1"
+ OUTPUT_VARIABLE _msgout)
STRING(REGEX MATCH "GNU[\t ]gettext" _isgnu "${_msgout}")
IF (NOT _isgnu)
MESSAGE(STATUS "No gnu msgfmt found!")
@@ -121,63 +401,57 @@ IF(MSGFMT)
ENDIF (NOT _isgnu)
ELSE(MSGFMT)
SET(MSGFMT ":" CACHE STRING "Msgfmt program")
- MESSAGE( FATAL_ERROR "Could NOT find msgfmt program")
ENDIF(MSGFMT)
-EXECUTE_PROCESS(COMMAND ${KDE3_KDECONFIG_EXECUTABLE} "--prefix"
- COMMAND xargs "echo" "-n"
- OUTPUT_VARIABLE _kde_prefix_path
- ERROR_QUIET
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-SET(KDE_HTML_COMMON_PATH ${_kde_prefix_path}/share/doc/HTML/en/common CACHE STRING "KDE HTML common Path" FORCE)
-
# 'cause my own defines were not good I take them from kde4 trunk
#add some KDE specific stuff
-SET(SHARE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/share CACHE PATH "Base directory for files which go to share/" FORCE)
-SET(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory for executables and libraries" FORCE)
+set(SHARE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/share CACHE PATH "Base directory for files which go to share/" FORCE)
+set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory for executables and libraries" FORCE)
#
## the following are directories where stuff will be installed to
-SET(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The kde bin install dir (default prefix/bin)" FORCE)
-SET(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" CACHE PATH "The kde sbin install dir (default prefix/sbin)" FORCE)
-SET(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
-SET(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/kde3/libexec" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib/kde3/libexec)" FORCE)
-SET(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde3" CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde3)" FORCE)
-SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The subdirectory to the header prefix" FORCE)
-SET(CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" CACHE PATH "The config file install dir" FORCE)
-SET(DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" CACHE PATH "The parent directory where applications can install their data" FORCE)
-SET(HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/HTML" CACHE PATH "The HTML install dir for documentation" FORCE)
-SET(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" CACHE PATH "The icon install dir (default prefix/share/icons/)" FORCE)
-SET(KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" CACHE PATH "The install dir for kconfig files" FORCE)
-SET(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" CACHE PATH "The install dir for translations" FORCE)
-SET(MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" CACHE PATH "The install dir for the mimetype desktop files" FORCE)
-SET(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/services" CACHE PATH "The install dir for service (desktop, protocol, ...) files" FORCE)
-SET(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/servicetypes" CACHE PATH "The install dir for servicestypes desktop files" FORCE)
-SET(SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" CACHE PATH "The install dir for sound files" FORCE)
-SET(TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" CACHE PATH "The install dir for templates (Create new file...)" FORCE)
-SET(WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" CACHE PATH "The install dir for wallpapers" FORCE)
-SET(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update" CACHE PATH "The kconf_update install dir" FORCE)
+set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The kde bin install dir (default prefix/bin)" FORCE)
+set(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" CACHE PATH "The kde sbin install dir (default prefix/sbin)" FORCE)
+set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
+set(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/kde3/libexec" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib/kde3/libexec)" FORCE)
+set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde3" CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde3)" FORCE)
+set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The subdirectory to the header prefix" FORCE)
+set(CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" CACHE PATH "The config file install dir" FORCE)
+set(DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" CACHE PATH "The parent directory where applications can install their data" FORCE)
+set(HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/HTML" CACHE PATH "The HTML install dir for documentation" FORCE)
+set(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" CACHE PATH "The icon install dir (default prefix/share/icons/)" FORCE)
+set(KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" CACHE PATH "The install dir for kconfig files" FORCE)
+set(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" CACHE PATH "The install dir for translations" FORCE)
+set(MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" CACHE PATH "The install dir for the mimetype desktop files" FORCE)
+set(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/services" CACHE PATH "The install dir for service (desktop, protocol, ...) files" FORCE)
+set(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/servicetypes" CACHE PATH "The install dir for servicestypes desktop files" FORCE)
+set(SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" CACHE PATH "The install dir for sound files" FORCE)
+set(TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" CACHE PATH "The install dir for templates (Create new file...)" FORCE)
+set(WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" CACHE PATH "The install dir for wallpapers" FORCE)
+set(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update" CACHE PATH "The kconf_update install dir" FORCE)
# this one shouldn't be used anymore
-SET(APPLNK_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applnk" CACHE PATH "Is this still used ?" FORCE)
-SET(AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" CACHE PATH "The install dir for autostart files" FORCE)
-SET(XDG_APPS_DIR "${SHARE_INSTALL_PREFIX}/applications/kde" CACHE PATH "The XDG apps dir" FORCE)
-SET(XDG_DIRECTORY_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" CACHE PATH "The XDG directory" FORCE)
-SET(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "The kde sysconfig install dir (default/etc)" FORCE)
-SET(MAN_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/man" CACHE PATH "The kde man install dir (default prefix/share/man/)" FORCE)
-SET(INFO_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/info" CACHE PATH "The kde info install dir (default prefix/info)" FORCE)
+set(APPLNK_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applnk" CACHE PATH "Is this still used ?" FORCE)
+set(AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" CACHE PATH "The install dir for autostart files" FORCE)
+set(XDG_APPS_DIR "${SHARE_INSTALL_PREFIX}/applications/kde" CACHE PATH "The XDG apps dir" FORCE)
+set(XDG_DIRECTORY_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" CACHE PATH "The XDG directory" FORCE)
+set(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "The kde sysconfig install dir (default/etc)" FORCE)
+set(MAN_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/man" CACHE PATH "The kde man install dir (default prefix/share/man/)" FORCE)
+set(INFO_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/info" CACHE PATH "The kde info install dir (default prefix/info)" FORCE)
# linker flags - must get checked
-SET(LINK_NO_UNDEFINED "")
-SET(lundef "-Wl,--no-undefined")
-KDESVN_CHECK_LINK_FLAG(${lundef} _NO_UNDEFINED)
-IF (_NO_UNDEFINED)
- SET(LINK_NO_UNDEFINED "${lundef}")
-ENDIF (_NO_UNDEFINED)
-SET(lundef "-Wl,--allow-shlib-undefined")
-KDESVN_CHECK_LINK_FLAG(${lundef} _ALLOW_SHLIB)
-IF (_ALLOW_SHLIB)
- SET(LINK_NO_UNDEFINED "${LINK_NO_UNDEFINED} ${lundef}")
-ENDIF (_ALLOW_SHLIB)
+IF (CMAKE_SYSTEM MATCHES "Linux*")
+ SET(lundef "-Wl,--no-undefined")
+ KDESVN_CHECK_LINK_FLAG(${lundef} _NO_UNDEFINED)
+ IF (_NO_UNDEFINED)
+ SET(LINK_NO_UNDEFINED "${lundef}")
+ ENDIF (_NO_UNDEFINED)
+
+ SET(lundef "-Wl,--allow-shlib-undefined")
+ KDESVN_CHECK_LINK_FLAG(${lundef} _ALLOW_SHLIB)
+ IF (_ALLOW_SHLIB)
+ SET(LINK_NO_UNDEFINED "${LINK_NO_UNDEFINED} ${lundef}")
+ ENDIF (_ALLOW_SHLIB)
+ENDIF (CMAKE_SYSTEM MATCHES "Linux*")
# own macros
@@ -189,18 +463,18 @@ MACRO(KDESVN_INSTALL_ICONS _theme)
FOREACH(_current_ICON ${_icons} )
GET_FILENAME_COMPONENT(_ctype ${_current_ICON} EXT)
- IF (${_ctype} STREQUAL ".png")
+ if (${_ctype} STREQUAL ".png")
STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\1" _size "${_current_ICON}")
STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\2" _group "${_current_ICON}")
STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\3" _name "${_current_ICON}")
- SET(_sizestring "${_size}x${_size}")
- ENDIF (${_ctype} STREQUAL ".png")
+ set(_sizestring "${_size}x${_size}")
+ endif (${_ctype} STREQUAL ".png")
- IF (${_ctype} STREQUAL ".svgz")
+ if (${_ctype} STREQUAL ".svgz")
STRING(REGEX REPLACE "^.*/[a-zA-Z]+\\-([a-z]+)\\-(.+\\.svgz)$" "\\1" _group "${_current_ICON}")
STRING(REGEX REPLACE "^.*/[a-zA-Z]+\\-([a-z]+)\\-(.+\\.svgz)$" "\\2" _name "${_current_ICON}")
- SET(_sizestring "scalable")
- ENDIF (${_ctype} STREQUAL ".svgz")
+ set(_sizestring "scalable")
+ endif (${_ctype} STREQUAL ".svgz")
SET(_icon_GROUP "actions")
@@ -256,7 +530,6 @@ MACRO(ADD_POFILES packagename)
ENDMACRO(ADD_POFILES)
-
# KDE3_CREATE_HANDBOOK( docbookfile )
# Create the handbook from the docbookfile (using meinproc)
MACRO (KDE3_CREATE_HANDBOOK _docbook )
@@ -278,7 +551,6 @@ MACRO (KDE3_CREATE_HANDBOOK _docbook )
ADD_CUSTOM_TARGET(handbook ALL DEPENDS ${_doc})
ENDMACRO (KDE3_CREATE_HANDBOOK)
-
# KDE3_INSTALL_HANDBOOK()
# Install the handbook documentation
MACRO (KDE3_INSTALL_HANDBOOK _appname )
@@ -293,7 +565,7 @@ MACRO (KDE3_INSTALL_HANDBOOK _appname )
FILE(GLOB _images_src ${_tmp_src_FILE}/*.png)
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2 ${_books_src} ${_books_bin} ${_images_src} ${_images_bin}
- DESTINATION ${HTML_INSTALL_DIR}/${dirname} )
+ DESTINATION ${HTML_INSTALL_DIR}/${dirname} )
INSTALL( CODE "EXECUTE_PROCESS ( COMMAND /bin/ln -s \"${KDE_HTML_COMMON_PATH}\" \"$ENV{DESTDIR}${HTML_INSTALL_DIR}/${dirname}/common\" ERROR_QUIET )" )
INSTALL( CODE "MESSAGE(STATUS \"Installing $ENV{DESTDIR}${HTML_INSTALL_DIR}/${dirname}/common\")" )
@@ -313,4 +585,3 @@ MACRO (KDE3_INSTALL_HANDBOOK _appname )
ENDFOREACH(_p)
# End of specific for KBFX code
ENDMACRO (KDE3_INSTALL_HANDBOOK )
-
diff --git a/configdialog/CMakeLists.txt b/configdialog/CMakeLists.txt
index c65e04b..48cdc25 100644
--- a/configdialog/CMakeLists.txt
+++ b/configdialog/CMakeLists.txt
@@ -29,6 +29,7 @@ IF (NOT USE_KDE4)
${QT_AND_KDECORE_LIBS}
${KDE3_KIO_LIBRARY}
${KDE3_UI_LIBRARY}
+ -lkhtml
)
ELSE (NOT USE_KDE4)
KDE4_AUTOMOC(${kbfxconfigappsrc})