Browse Source

[kdelibs] added initial cmake support

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1182854 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
samelian 9 years ago
parent
commit
7ffba8afee
100 changed files with 7781 additions and 0 deletions
  1. +797
    -0
      CMakeLists.txt
  2. +17
    -0
      arts/CMakeLists.txt
  3. +69
    -0
      arts/kde/CMakeLists.txt
  4. +56
    -0
      arts/knotify/CMakeLists.txt
  5. +40
    -0
      arts/message/CMakeLists.txt
  6. +684
    -0
      cmake/modules/TDEMacros.cmake
  7. +5
    -0
      cmake/modules/template_dummy_cpp.cmake
  8. +2
    -0
      cmake/modules/template_kdeinit_executable.cmake
  9. +3
    -0
      cmake/modules/template_kdeinit_module.cmake
  10. +35
    -0
      cmake/modules/template_libtool_file.cmake
  11. +1158
    -0
      config.h.cmake
  12. +82
    -0
      dcop/CMakeLists.txt
  13. +39
    -0
      dcop/KDE-ICE/CMakeLists.txt
  14. +61
    -0
      dcop/client/CMakeLists.txt
  15. +39
    -0
      dcop/dcopidl/CMakeLists.txt
  16. +36
    -0
      dcop/dcopidl2cpp/CMakeLists.txt
  17. +25
    -0
      dcop/dcopidlng/CMakeLists.txt
  18. +54
    -0
      dnssd/CMakeLists.txt
  19. +12
    -0
      doc/CMakeLists.txt
  20. +28
    -0
      doc/common/CMakeLists.txt
  21. +0
    -0
      doc/kspell/CMakeLists.txt
  22. +20
    -0
      interfaces/CMakeLists.txt
  23. +22
    -0
      interfaces/khexedit/CMakeLists.txt
  24. +13
    -0
      interfaces/kimproxy/CMakeLists.txt
  25. +22
    -0
      interfaces/kimproxy/interface/CMakeLists.txt
  26. +55
    -0
      interfaces/kimproxy/library/CMakeLists.txt
  27. +13
    -0
      interfaces/kimproxy/library/icons/CMakeLists.txt
  28. +17
    -0
      interfaces/kio/CMakeLists.txt
  29. +65
    -0
      interfaces/kmediaplayer/CMakeLists.txt
  30. +50
    -0
      interfaces/kmediaplayer/kfileaudiopreview/CMakeLists.txt
  31. +20
    -0
      interfaces/kregexpeditor/CMakeLists.txt
  32. +61
    -0
      interfaces/kscript/CMakeLists.txt
  33. +47
    -0
      interfaces/kscript/sample/CMakeLists.txt
  34. +21
    -0
      interfaces/kspeech/CMakeLists.txt
  35. +101
    -0
      interfaces/ktexteditor/CMakeLists.txt
  36. +16
    -0
      interfaces/terminal/CMakeLists.txt
  37. +40
    -0
      kab/CMakeLists.txt
  38. +128
    -0
      kabc/CMakeLists.txt
  39. +51
    -0
      kabc/formats/CMakeLists.txt
  40. +15
    -0
      kabc/plugins/CMakeLists.txt
  41. +77
    -0
      kabc/plugins/dir/CMakeLists.txt
  42. +77
    -0
      kabc/plugins/file/CMakeLists.txt
  43. +77
    -0
      kabc/plugins/ldapkio/CMakeLists.txt
  44. +77
    -0
      kabc/plugins/net/CMakeLists.txt
  45. +44
    -0
      kabc/vcard/CMakeLists.txt
  46. +44
    -0
      kabc/vcardparser/CMakeLists.txt
  47. +16
    -0
      kate/CMakeLists.txt
  48. +83
    -0
      kate/data/CMakeLists.txt
  49. +51
    -0
      kate/interfaces/CMakeLists.txt
  50. +81
    -0
      kate/part/CMakeLists.txt
  51. +15
    -0
      kate/plugins/CMakeLists.txt
  52. +52
    -0
      kate/plugins/insertfile/CMakeLists.txt
  53. +50
    -0
      kate/plugins/isearch/CMakeLists.txt
  54. +52
    -0
      kate/plugins/kdatatool/CMakeLists.txt
  55. +48
    -0
      kate/plugins/wordcompletion/CMakeLists.txt
  56. +21
    -0
      kate/scripts/CMakeLists.txt
  57. +54
    -0
      kcert/CMakeLists.txt
  58. +45
    -0
      kcmshell/CMakeLists.txt
  59. +38
    -0
      kconf_update/CMakeLists.txt
  60. +206
    -0
      kdecore/CMakeLists.txt
  61. +33
    -0
      kdecore/kconfig_compiler/CMakeLists.txt
  62. +220
    -0
      kdecore/kdemacros.h.cmake
  63. +18
    -0
      kdecore/malloc/CMakeLists.txt
  64. +58
    -0
      kdecore/network/CMakeLists.txt
  65. +42
    -0
      kdecore/svgicons/CMakeLists.txt
  66. +119
    -0
      kded/CMakeLists.txt
  67. +52
    -0
      kdefx/CMakeLists.txt
  68. +129
    -0
      kdeprint/CMakeLists.txt
  69. +98
    -0
      kdeprint/cups/CMakeLists.txt
  70. +58
    -0
      kdeprint/cups/cupsdconf2/CMakeLists.txt
  71. +51
    -0
      kdeprint/ext/CMakeLists.txt
  72. +23
    -0
      kdeprint/filters/CMakeLists.txt
  73. +53
    -0
      kdeprint/lpdunix/CMakeLists.txt
  74. +81
    -0
      kdeprint/lpr/CMakeLists.txt
  75. +112
    -0
      kdeprint/management/CMakeLists.txt
  76. +41
    -0
      kdeprint/pics/CMakeLists.txt
  77. +55
    -0
      kdeprint/rlpr/CMakeLists.txt
  78. +12
    -0
      kdeprint/tools/CMakeLists.txt
  79. +46
    -0
      kdeprint/tools/escputil/CMakeLists.txt
  80. +61
    -0
      kdesu/CMakeLists.txt
  81. +172
    -0
      kdeui/CMakeLists.txt
  82. +21
    -0
      kdeui/about/CMakeLists.txt
  83. +50
    -0
      kdeui/kdetrayproxy/CMakeLists.txt
  84. +54
    -0
      kdeui/tests/CMakeLists.txt
  85. +67
    -0
      kdewidgets/CMakeLists.txt
  86. +27
    -0
      kdewidgets/pics/CMakeLists.txt
  87. +109
    -0
      kdoctools/CMakeLists.txt
  88. +7
    -0
      kdoctools/checkXML.cmake
  89. +142
    -0
      khtml/CMakeLists.txt
  90. +51
    -0
      khtml/css/CMakeLists.txt
  91. +62
    -0
      khtml/dom/CMakeLists.txt
  92. +66
    -0
      khtml/ecma/CMakeLists.txt
  93. +48
    -0
      khtml/html/CMakeLists.txt
  94. +79
    -0
      khtml/java/CMakeLists.txt
  95. +22
    -0
      khtml/java/dummy/CMakeLists.txt
  96. +52
    -0
      khtml/kmultipart/CMakeLists.txt
  97. +45
    -0
      khtml/misc/CMakeLists.txt
  98. +20
    -0
      khtml/pics/CMakeLists.txt
  99. +51
    -0
      khtml/rendering/CMakeLists.txt
  100. +47
    -0
      khtml/xml/CMakeLists.txt

+ 797
- 0
CMakeLists.txt View File

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

cmake_minimum_required( VERSION 2.6 )

# FIXME KDE3_MODULE_DIR is not set; this is cmake bug?
set( KDE3_MODULE_DIR "/usr/share/cmake/Modules" )

# directory to our cmake modules
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )

project( kdelibs )
set( VERSION "3.5.12" )

##### user requested options ####################

OPTION( KDE_MALLOC "Use own malloc implementation" OFF )
OPTION( KDE_MALLOC_DEBUG "Enable debugging in fast malloc" OFF )
OPTION( KDE_MALLOC_FULL "Make alloc as fast as possible" OFF )

OPTION( WITH_ARTS "Build with aRts" ON )
OPTION( WITH_ALSA "Enable ALSA support" ON )
OPTION( WITH_LIBART "Enable libart support (for SVG icons)" OFF )
OPTION( WITH_LIBIDN "Enable support for libidn" OFF )
OPTION( WITH_SSL "Enable support for SSL" ON )
OPTION( WITH_CUPS "Enable CUPS support" ON )
OPTION( WITH_LUA "Enable LUA support" OFF )
OPTION( WITH_TIFF "Enable tiff support" OFF )
OPTION( WITH_JASPER "Enable jasper (jpeg2k) support" OFF )
OPTION( WITH_OPENEXR "Enable openexr support" OFF )

OPTION( WITH_ASPELL "Enable aspell support" OFF )
OPTION( WITH_HSPELL "Enable hspell support" OFF )


##### paths setup ###############################

if( NOT BIN_INSTALL_DIR )
set( BIN_INSTALL_DIR bin )
endif ( NOT BIN_INSTALL_DIR )

if( NOT LIB_INSTALL_DIR )
set( LIB_INSTALL_DIR lib )
endif( NOT LIB_INSTALL_DIR )

if( NOT INCLUDE_INSTALL_DIR )
set( INCLUDE_INSTALL_DIR include )
endif( NOT INCLUDE_INSTALL_DIR )

if( NOT SHARE_INSTALL_DIR )
set( SHARE_INSTALL_DIR share )
endif( NOT SHARE_INSTALL_DIR )

if( NOT ICONS_INSTALL_DIR )
set( ICONS_INSTALL_DIR ${SHARE_INSTALL_DIR}/icons )
endif( NOT ICONS_INSTALL_DIR )

if( NOT MIME_INSTALL_DIR )
set( MIME_INSTALL_DIR ${SHARE_INSTALL_DIR}/mimelnk )
endif( NOT MIME_INSTALL_DIR )

if( NOT PLUGIN_INSTALL_DIR )
set( PLUGIN_INSTALL_DIR ${LIB_INSTALL_DIR}/kde3 )
endif( NOT PLUGIN_INSTALL_DIR )

if( NOT SERVICES_INSTALL_DIR )
set( SERVICES_INSTALL_DIR share/services )
endif( NOT SERVICES_INSTALL_DIR )

if( NOT DATA_INSTALL_DIR )
set( DATA_INSTALL_DIR share/apps )
endif( NOT DATA_INSTALL_DIR )

if( NOT HTML_INSTALL_DIR )
set( HTML_INSTALL_DIR ${SHARE_INSTALL_DIR}/doc/HTML )
endif( NOT HTML_INSTALL_DIR )

if( NOT CONFIG_INSTALL_DIR )
set( CONFIG_INSTALL_DIR ${SHARE_INSTALL_DIR}/config )
endif( NOT CONFIG_INSTALL_DIR )

if( NOT LOCALE_INSTALL_DIR )
set( LOCALE_INSTALL_DIR share/locale )
endif( NOT LOCALE_INSTALL_DIR )

if( NOT PKGCONFIG_INSTALL_DIR )
set( PKGCONFIG_INSTALL_DIR lib/pkgconfig )
endif( NOT PKGCONFIG_INSTALL_DIR )

if( NOT DCOP_PATH )
set( DCOP_PATH ${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR} )
endif( NOT DCOP_PATH )

if( NOT KDEDIR )
set( KDEDIR ${CMAKE_INSTALL_PREFIX} )
endif( NOT KDEDIR )


#################################################


if( NOT SYSCONFDIR )
set( SYSCONFDIR ${CMAKE_INSTALL_PREFIX}/etc )
endif( NOT SYSCONFDIR )

if( NOT XDG_MENUDIR )
set( XDG_MENUDIR ${SYSCONFDIR}/xdg/menus )
endif( NOT XDG_MENUDIR )


##### include our cmake modules #################

include( TDEMacros )


##### check for CPU architecture ################

### FIXME fast malloc is also available on x86_64 architecture?
if( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
set( KDE_MALLOC_X86 1 )
message( STATUS "Found x86 architecture" )
else( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
if( KDE_MALLOC )
message( FATAL_ERROR "\nKDE fast malloc is available only on x86 architecture" )
endif( KDE_MALLOC )
endif( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )


##### check for operating system ################

if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
set( KDEINIT_SETUID 1 )
set( KDEINIT_OOM_PROTECT 1 )
endif( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )


##### check for compiler capabilities ###########

include( CheckCXXCompilerFlag )

check_cxx_compiler_flag( -Woverloaded-virtual WOVERLOADED_VIRTUAL )
if( WOVERLOADED_VIRTUAL )
set( WOVERLOADED_VIRTUAL -Woverloaded-virtual )
endif( WOVERLOADED_VIRTUAL )

check_cxx_compiler_flag( -fno-builtin NO_BUILTIN )
if( NO_BUILTIN )

endif( NO_BUILTIN )


##### system checks #############################

include( CheckIncludeFile )
include( CheckSymbolExists )
include( CheckFunctionExists )
include( FindPkgConfig )
include( CheckCSourceCompiles )
include( CheckTypeSize )
include( CheckCSourceRuns )

check_include_file( "alloca.h" HAVE_ALLOCA_H )
check_include_file( "arpa/nameser8_compat.h" HAVE_ARPA_NAMESER8_COMPAT_H )
check_include_file( "awe_voice.h" HAVE_AWE_VOICE_H )
check_include_file( "Carbon/Carbon.h" HAVE_CARBON_CARBON_H )
check_include_file( "crt_externs.h" HAVE_CRT_EXTERNS_H )
check_include_file( "ctype.h" HAVE_CTYPE_H )
check_include_file( "dirent.h" HAVE_DIRENT_H )
check_include_file( "dld.h" HAVE_DLD_H )
check_include_file( "dlfcn.h" HAVE_DLFCN_H )
check_include_file( "dl.h" HAVE_DL_H )
check_include_file( "float.h" HAVE_FLOAT_H )
check_include_file( "fstab.h" HAVE_FSTAB_H )
check_include_file( "ieeefp.h" HAVE_IEEEFP_H )
check_include_file( "inttypes.h" HAVE_INTTYPES_H )
check_include_file( "libutil.h" HAVE_LIBUTIL_H )
check_include_file( "limits.h" HAVE_LIMITS_H )
check_include_file( "linux/awe_voice.h" HAVE_LINUX_AWE_VOICE_H )
check_include_file( "locale.h" HAVE_LOCALE_H )
check_include_file( "machine/soundcard.h" HAVE_MACHINE_SOUNDCARD_H )
check_include_file( "malloc.h" HAVE_MALLOC_H )
check_include_file( "memory.h" HAVE_MEMORY_H )
check_include_file( "mntent.h" HAVE_MNTENT_H )
check_include_file( "ndir.h" HAVE_NDIR_H )
check_include_file( "netinet/in.h" HAVE_NETINET_IN_H )
check_include_file( "net/if.h" HAVE_NET_IF_H )
check_include_file( "paths.h" HAVE_PATHS_H )
check_include_file( "pty.h" HAVE_PTY_H )
check_include_file( "stdint.h" HAVE_STDINT_H )
check_include_file( "stdio.h" HAVE_STDIO_H )
check_include_file( "stdlib.h" HAVE_STDLIB_H )
check_include_file( "strings.h" HAVE_STRINGS_H )
check_include_file( "string.h" HAVE_STRING_H )
check_include_file( "sysent.h" HAVE_SYSENT_H )
check_include_file( "sys/bitypes.h" HAVE_SYS_BITYPES_H )
check_include_file( "sys/dir.h" HAVE_SYS_DIR_H )
check_include_file( "sys/filio.h" HAVE_SYS_FILIO_H )
check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H )
check_include_file( "sys/mntent.h" HAVE_SYS_MNTENT_H )
check_include_file( "sys/mnttab.h" HAVE_SYS_MNTTAB_H )
check_include_file( "sys/mount.h" HAVE_SYS_MOUNT_H )
check_include_file( "sys/ndir.h" HAVE_SYS_NDIR_H )
check_include_file( "sys/param.h" HAVE_SYS_PARAM_H )
check_include_file( "sys/prctl.h" HAVE_SYS_PRCTL_H )
check_include_file( "sys/select.h" HAVE_SYS_SELECT_H )
check_include_file( "sys/soundcard.h" HAVE_SYS_SOUNDCARD_H )
check_include_file( "sys/stat.h" HAVE_SYS_STAT_H )
check_include_file( "sys/stropts.h" HAVE_SYS_STROPTS_H )
check_include_file( "sys/types.h" HAVE_SYS_TYPES_H )
check_include_file( "sys/ucred.h" HAVE_SYS_UCRED_H )
check_include_file( "sys/xattr.h" sys/xattr.h )
check_include_file( "termios.h" HAVE_TERMIOS_H )
check_include_file( "termio.h" HAVE_TERMIO_H )
check_include_file( "unistd.h" HAVE_UNISTD_H )
check_include_file( "util.h" HAVE_UTIL_H )

# FIXME I'm not sure if test TIME_WITH_SYS_TIME are correct
check_include_file( "sys/time.h" HAVE_SYS_TIME_H )
check_include_file( "time.h" HAVE_TIME_H )
if( HAVE_SYS_TIME_H AND HAVE_TIME_H )
set( TIME_WITH_SYS_TIME 1 )
endif( HAVE_SYS_TIME_H AND HAVE_TIME_H )

check_include_file( "valgrind/memcheck.h" HAVE_VALGRIND_MEMCHECK_H )
check_include_file( "values.h" HAVE_VALUES_H )
check_include_file( "X11/extensions/shape.h" HAVE_X11_EXTENSIONS_SHAPE_H )
check_include_file( "X11/extensions/Xrandr.h" HAVE_X11_EXTENSIONS_XRANDR_H )
check_include_file( "X11/extensions/XShm.h" HAVE_X11_EXTENSIONS_XSHM_H )
check_include_file( "X11/ICE/ICElib.h" HAVE_X11_ICE_ICELIB_H )
check_include_file( "/usr/src/sys/gnu/i386/isa/sound/awe_voice.h" HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H )
check_include_file( "/usr/src/sys/i386/isa/sound/awe_voice.h" HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H )

check_function_exists( random HAVE_RANDOM )
check_symbol_exists( random "stdlib.h" HAVE_RANDOM_PROTO )

check_function_exists( srandom HAVE_SRANDOM )
check_symbol_exists( srandom "stdlib.h" HAVE_SRANDOM_PROTO )

check_function_exists( seteuid HAVE_SETEUID )

check_function_exists( gethostname HAVE_GETHOSTNAME )
check_symbol_exists( gethostname "unistd.h" HAVE_GETHOSTNAME_PROTO )

check_function_exists( vsnprintf HAVE_VSNPRINTF )
check_function_exists( snprintf HAVE_SNPRINTF )

check_function_exists( setenv HAVE_SETENV )
check_symbol_exists( setenv "stdlib.h" HAVE_SETENV_PROTO )

check_function_exists( unsetenv HAVE_UNSETENV )
check_symbol_exists( unsetenv "stdlib.h" HAVE_UNSETENV_PROTO )

check_function_exists( mkdtemp HAVE_MKDTEMP )
check_symbol_exists( mkdtemp "stdlib.h" HAVE_MKDTEMP_PROTO )

check_function_exists( mkstemp HAVE_MKSTEMP )
check_symbol_exists( mkstemp "stdlib.h" HAVE_MKSTEMP_PROTO )

check_function_exists( mkstemps HAVE_MKSTEMPS )
check_symbol_exists( mkstemps "stdlib.h" HAVE_MKSTEMPS_PROTO )

check_function_exists( initgroups HAVE_INITGROUPS )
check_symbol_exists( initgroups "grp.h" HAVE_INITGROUPS_PROTO )

check_symbol_exists( S_ISSOCK "sys/stat.h" HAVE_S_ISSOCK )

check_symbol_exists( gethostbyname2 "netdb.h" HAVE_GETHOSTBYNAME2 )
check_symbol_exists( gethostbyname2_r "netdb.h" HAVE_GETHOSTBYNAME2_R )
check_symbol_exists( gethostbyname_r "netdb.h" HAVE_GETHOSTBYNAME_R )
check_symbol_exists( gai_strerror "sys/types.h;sys/socket.h;netdb.h" HAVE_GAI_STRERROR )
check_symbol_exists( getaddrinfo "sys/types.h;sys/socket.h;netdb.h" HAVE_GETADDRINFO )

check_function_exists( usleep HAVE_USLEEP )
check_symbol_exists( usleep "unistd.h" HAVE_USLEEP_PROTO )

check_function_exists( getmntinfo HAVE_GETMNTINFO )
check_function_exists( getnameinfo HAVE_GETNAMEINFO )
check_function_exists( getpagesize HAVE_GETPAGESIZE )
check_function_exists( getpeereid HAVE_GETPEEREID )
check_function_exists( getpeername HAVE_GETPEERNAME )
check_function_exists( getprotobyname_r HAVE_GETPROTOBYNAME_R )
check_function_exists( getpt HAVE_GETPT )
check_function_exists( getservbyname_r HAVE_GETSERVBYNAME_R )
check_function_exists( getservbyport_r HAVE_GETSERVBYPORT_R )
check_function_exists( getsockname HAVE_GETSOCKNAME )
check_function_exists( getsockopt HAVE_GETSOCKOPT )
check_function_exists( gettimeofday HAVE_GETTIMEOFDAY )
check_function_exists( grantpt HAVE_GRANTPT )
check_function_exists( if_nametoindex HAVE_IF_NAMETOINDEX )
check_function_exists( index HAVE_INDEX)
check_function_exists( inet_ntop HAVE_INET_NTOP )
check_function_exists( inet_pton HAVE_INET_PTON )
check_function_exists( setfsent HAVE_SETFSENT )
check_function_exists( setgroups HAVE_SETGROUPS )
check_function_exists( setlocale HAVE_SETLOCALE )
check_function_exists( setmntent HAVE_SETMNTENT )
check_function_exists( setpriority HAVE_SETPRIORITY )
check_function_exists( isnan HAVE_FUNC_ISNAN )
check_function_exists( _finite HAVE_FUNC__FINITE )
check_function_exists( finite HAVE_FUNC_FINITE )
check_function_exists( isinf HAVE_FUNC_ISINF )
check_function_exists( freeaddrinfo HAVE_FREEADDRINFO )

check_type_size( "char*" SIZEOF_CHAR_P )
check_type_size( "int" SIZEOF_INT )
check_type_size( "long" SIZEOF_LONG )
check_type_size( "short" SIZEOF_SHORT )
check_type_size( "size_t" SIZEOF_SIZE_T )
check_type_size( "unsigned long" SIZEOF_UNSIGNED_LONG )

set( CMAKE_EXTRA_INCLUDE_FILES "netdb.h" )
check_type_size( "struct addrinfo" STRUCT_ADDRINFO )
set( CMAKE_EXTRA_INCLUDE_FILES "netinet/in.h" )
check_type_size( "struct sockaddr_in6" HAVE_STRUCT_SOCKADDR_IN6 )
unset( CMAKE_EXTRA_INCLUDE_FILES )

check_c_source_compiles("
#include <features.h>
#ifndef __GNU_LIBRARY__
#error
#endif
int main(int argc, char *argv[]) { return 0; } "
_GNU_SOURCE )

check_c_source_compiles("
#include <unistd.h>
int main(int argc, char *argv[]) { revoke(\"/dev/tty\"); return 0; } "
HAVE_REVOKE )

check_c_source_runs("
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
int main()
{
struct addrinfo hint, *res;
int err;
memset(&hint, 0, sizeof(hint));
hint.ai_family = AF_INET;
hint.ai_protocol = 0;
hint.ai_socktype = SOCK_STREAM;
hint.ai_flags = AI_PASSIVE;
err = getaddrinfo(0, \"18300\", &hint, &res); /* kxmlrpc tries this */
if (err != 0 || res == 0 || res->ai_family != AF_INET)
return 1;
return 0;
}"
HAVE_GOOD_GETADDRINFO
)

if( NOT HAVE_GOOD_GETADDRINFO )
set( HAVE_BROKEN_GETADDRINFO 1 )
endif( NOT HAVE_GOOD_GETADDRINFO )


# save CMAKE_REQUIRED_LIBRARIES
set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )

set( CMAKE_REQUIRED_LIBRARIES resolv )
check_c_source_compiles("
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
int main(int argc, char *argv[]) { res_init(); return 0; } "
HAVE_RES_INIT )

if( HAVE_RES_INIT )
set( RESOLV_LIBRARIES resolv )
endif( HAVE_RES_INIT)

# restore CMAKE_REQUIRED_LIBRARIES
set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
unset( bak_CMAKE_REQUIRED_LIBRARIES )


# FIXME for unknown reason cmake cannot find su
#find_program( __PATH_SU su )
set( __PATH_SU "/bin/su" )

if( __PATH_SU )
set( DEFAULT_SUPER_USER_COMMAND ${__PATH_SU} )
else( __PATH_SU )
message( STATUS "WARNING: su was not found" )
endif( __PATH_SU )

# FIXME for unknown reason cmake cannot find sudo
# find_program( __PATH_SUDO "sudo" )
set( __PATH_SUDO "/usr/bin/sudo" )
if( WITH_SUDO_KDESU_BACKEND )
if( __PATH_SUDO )
set( DEFAULT_SUPER_USER_COMMAND ${__PATH_SUDO} )
else( __PATH_SUDO )
message( FATAL_ERROR "sudo was chosen as kdesu backend, but was not found in path." )
endif( __PATH_SUDO )
endif( WITH_SUDO_KDESU_BACKEND )


#### set some constants #########################

set( LTDL_OBJDIR \".\" )
set( KDELIBSUFF "" )
set( kde_socklen_t socklen_t )


##### check for libdl ###########################

find_library( HAVE_LIBDL dl )
if( NOT HAVE_LIBDL-NOTFOUND )
set( DL_LIBRARIES dl )
endif( NOT HAVE_LIBDL-NOTFOUND )


##### check for zlib ############################

find_package( ZLIB )
if( NOT ZLIB_FOUND )
message(FATAL_ERROR "\nzlib are required, but not found on your system" )
endif( NOT ZLIB_FOUND )

set( HAVE_LIBZ 1 )


#### check for bzip2 ############################

find_package( BZip2 )
if( NOT BZIP2_FOUND )
# FIXME I'm not sure if bzip2 are required; maybe is optional?
message(FATAL_ERROR "\nbzip2 are required, but not found on your system" )
endif( NOT BZIP2_FOUND )

set( HAVE_BZIP2_SUPPORT 1 )

if( BZIP2_NEED_PREFIX )
set( NEED_BZ2_PREFIX 1 )
endif( BZIP2_NEED_PREFIX )


##### check for jpeg ############################

find_package( JPEG )
if( NOT JPEG_FOUND )
# FIXME I think jpeg support must be required
message(FATAL_ERROR "\njpeg are required, but not found on your system" )
endif( NOT JPEG_FOUND )

set( HAVE_LIBJPEG 1 )


##### check for png #############################

find_package( PNG )
if( NOT PNG_FOUND )
# FIXME I think png support must be required
message(FATAL_ERROR "\npng are required, but not found on your system" )
endif( NOT PNG_FOUND )

set( HAVE_LIBPNG 1 )


##### check for tiff ############################

if( WITH_TIFF )
find_package( TIFF )
if( NOT TIFF_FOUND )
message(FATAL_ERROR "\ntiff are requested, but not found on your system" )
endif( NOT TIFF_FOUND )
set( HAVE_LIBTIFF 1)
endif( WITH_TIFF )


##### check for jasper ##########################

if( WITH_JASPER )
find_package( Jasper )
if( NOT JASPER_FOUND )
message(FATAL_ERROR "\njasper are requested, but not found on your system" )
endif( NOT JASPER_FOUND )
set( HAVE_JASPER 1 )
endif( WITH_JASPER )


##### check for openexr #########################

if( WITH_OPENEXR )
pkg_search_module( OPENEXR OpenEXR )
if( NOT OPENEXR_FOUND )
message(FATAL_ERROR "\nopenexr are requested, but not found on your system" )
endif( NOT OPENEXR_FOUND )
set( HAVE_EXR 1 )
endif( WITH_OPENEXR )


##### check for freetype2 #######################

pkg_search_module( FREETYPE freetype2 )
if( NOT FREETYPE_FOUND )
message(FATAL_ERROR "\nfreetype2 are required, but not found on your system" )
endif( NOT FREETYPE_FOUND )

set( KDEINIT_USE_FONTCONFIG 1 )


##### check for fontconfig ######################

pkg_search_module( FONTCONFIG fontconfig )
if( NOT FONTCONFIG_FOUND )
message(FATAL_ERROR "\nfontconfig are required, but not found on your system" )
endif( NOT FONTCONFIG_FOUND )


##### check for Xrandr ##########################

pkg_search_module( XRANDR xrandr )
if( XRANDR_FOUND )
set( XRANDR_SUPPORT 1 )
endif( XRANDR_FOUND )


##### check for libxml-2.0 ######################

pkg_search_module( LIBXML2 libxml-2.0 )
if( NOT LIBXML2_FOUND )
message(FATAL_ERROR "\nlibxml-2.0 are required, but not found on your system" )
endif( NOT LIBXML2_FOUND )


##### check for libxslt ######################

pkg_search_module( LIBXSLT libxslt )
if( NOT LIBXSLT_FOUND )
message(FATAL_ERROR "\nlibxslt are required, but not found on your system" )
endif( NOT LIBXSLT_FOUND )


##### check for Qt3 #############################

find_package( Qt3 )
if( NOT QT_FOUND )
message(FATAL_ERROR "\nQt3 are required, but not found on your system" )
endif( NOT QT_FOUND )


##### check for TQt #############################

pkg_search_module( TQT TQt )
if( NOT TQT_FOUND )
message(FATAL_ERROR "\nTQt are required, but not found on your system" )
endif( NOT TQT_FOUND )

set( QT_MOC_EXECUTABLE "tmoc" )

# check if Qt is linked against Xft
set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
set( CMAKE_REQUIRED_LIBRARIES ${TQT_LDFLAGS} )
check_function_exists( XftInit KDEINIT_USE_XFT )
set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
unset( bak_CMAKE_REQUIRED_LIBRARIES )


##### check for ALSA ############################
# FIXME I propose to drop support for very old ALSA versions (i.e 0.5)

if( WITH_ALSA )
find_package( ALSA )
if( NOT ALSA_FOUND )
message(FATAL_ERROR "\nALSA support are requested, but not found on your system" )
endif( NOT ALSA_FOUND )
set( HAVE_LIBASOUND2 1 )

# FIXME I'm not sure if order is correct
check_include_file( "alsa/asoundlib.h" HAVE_ALSA_ASOUNDLIB_H )
if( NOT HAVE_ALSA_ASOUNDLIB_H )
check_include_file( "sys/asoundlib.h" HAVE_SYS_ASOUNDLIB_H )
endif( NOT HAVE_ALSA_ASOUNDLIB_H )
endif( WITH_ALSA )


##### check for aRts ############################

if( WITH_ARTS )
pkg_search_module( ARTS arts )
if( ARTS_FOUND )
set( ARTS_MCOPIDL_EXECUTABLE ${ARTS_PREFIX}/bin/mcopidl )
else( ARTS_FOUND )
message(FATAL_ERROR "\naRts are requested, but not found on your system" )
endif( ARTS_FOUND )
else( WITH_ARTS )
set( WITHOUT_ARTS 1 )
endif( WITH_ARTS )


##### check for Xft #############################

if( KDEINIT_USE_XFT )
pkg_search_module( XFT xft )
if( NOT XFT_FOUND )
message(FATAL_ERROR "\nXft are required, but not found on your system" )
endif( NOT XFT_FOUND )
endif( KDEINIT_USE_XFT )


##### check for libart ##########################

if( WITH_LIBART )
pkg_search_module( LIBART libart-2.0 )
if( NOT LIBART_FOUND )
message(FATAL_ERROR "\nlibart-2.0 support are requested, but not found on your system" )
endif( NOT LIBART_FOUND )
set( HAVE_LIBART 1 )
endif( WITH_LIBART )


##### check for libidn ##########################

if( WITH_LIBIDN )
pkg_search_module( LIBIDN libidn )
if( NOT LIBIDN_FOUND )
message(FATAL_ERROR "\nlibidn support are requested, but not found on your system" )
endif( NOT LIBIDN_FOUND )
set( HAVE_LIBIDN 1 )
check_include_file( "idna.h" HAVE_IDNA_H )
check_include_file( "punycode.h" HAVE_PUNYCODE_H )
check_include_file( "stringprep.h" HAVE_STRINGPREP_H )
endif( WITH_LIBIDN )


##### check for openssl #########################

if( WITH_SSL )
pkg_search_module( SSL openssl )
if( NOT SSL_FOUND )
message(FATAL_ERROR "\nSSL support are requested, but openssl is not found on your system" )
endif( NOT SSL_FOUND )
set( KSSL_HAVE_SSL 1 )
endif( WITH_SSL )


##### check for cups ############################
# FIXME CUPS must be at least 1.1.9

if( WITH_CUPS )
find_package( Cups )
if( NOT CUPS_FOUND )
message(FATAL_ERROR "\nCUPS support are requested, but not found on your system" )
endif( NOT CUPS_FOUND )
set( HAVE_CUPS 1 )
# FIXME if CUPS is at least 1.1.20, doesn't have password caching
set( HAVE_CUPS_NO_PWD_CACHE 1 )
endif( WITH_CUPS )


##### check for LUA #############################

if( WITH_LUA )
message(FATAL_ERROR "\nLUA support are not ready yet" )
pkg_search_module( LUA lua )
if( NOT LUA_FOUND )
message(FATAL_ERROR "\nLUA support are requested, but not found on your system" )
endif( NOT LUA_FOUND )
set( HAVE_LUA 1 )
endif( WITH_LUA )


##### check for avahi ###########################

pkg_search_module( AVAHI avahi-qt3 )
if( NOT AVAHI_FOUND )
message(FATAL_ERROR "\navahi support are requested, but not found on your system" )
endif( NOT AVAHI_FOUND )

set( AVAHI_API_0_6 1 )


##### check for aspell ##########################
# we need ASPELL_DATADIR too

if( WITH_ASPELL )
find_package( ASPELL )
if( NOT ASPELL_FOUND )
message(FATAL_ERROR "\nASPELL support are requested, but not found on your system" )
endif( NOT ASPELL_FOUND )
endif( WITH_ASPELL )


##### check for hspell ##########################

if( WITH_HSPELL )
find_package( HSPELL )
if( NOT HSPELL_FOUND )
message(FATAL_ERROR "\nHSPELL support are requested, but not found on your system" )
endif( NOT HSPELL_FOUND )
endif( WITH_HSPELL )


##### write configure files #####################

configure_file( config.h.cmake config.h )
configure_file( dcop/dcop-path.h.cmake dcop/dcop-path.h )
configure_file( kdecore/kdemacros.h.cmake kdecore/kdemacros.h )
configure_file( kjs/global.h.in kjs/global.h )
configure_file( kio/kssl/ksslconfig.h.cmake kio/kssl/ksslconfig.h )
configure_file( kdoctools/checkXML.cmake kdoctools/checkXML )


##### tools #####################################

set( KDE3_DCOPIDL_EXECUTABLE ${CMAKE_BINARY_DIR}/dcop/dcopidl/dcopidl )
set( KDE3_DCOPIDL2CPP_EXECUTABLE ${CMAKE_BINARY_DIR}/dcop/dcopidl2cpp/dcopidl2cpp )
set( KDE3_MEINPROC_EXECUTABLE ${CMAKE_BINARY_DIR}/kdoctools/meinproc )
set( KDE3_KCFGC_EXECUTABLE ${CMAKE_BINARY_DIR}/kdecore/kconfig_compiler/kconfig_compiler )


##### global compiler settings ##################

add_definitions(
-DHAVE_CONFIG_H
-DQT_NO_ASCII_CAST
-DQT_CLEAN_NAMESPACE
-DQT_NO_STL
-DQT_NO_COMPAT
-DQT_NO_TRANSLATION
)

set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )


##### headers ###################################

install( FILES
kde.pot
DESTINATION ${INCLUDE_INSTALL_DIR} )


##### subdirectories ############################

add_subdirectory( dcop )
add_subdirectory( libltdl )
add_subdirectory( kdefx )
add_subdirectory( kdecore )
add_subdirectory( kunittest )
add_subdirectory( kdeui )
add_subdirectory( kdesu )
add_subdirectory( kjs )
add_subdirectory( kwallet )
add_subdirectory( kio )
add_subdirectory( kded )

# FIXME this directory/target doesn't exists
# add_subdirectory( kded_post )

add_subdirectory( kdoctools )

# FIXME is not very important, I will back there later
# add_subdirectory( doc )

add_subdirectory( kparts )
add_subdirectory( kutils )
add_subdirectory( kspell2 )
add_subdirectory( kmdi )
add_subdirectory( kinit )
add_subdirectory( kdeprint )
add_subdirectory( kab )
add_subdirectory( kresources )
add_subdirectory( kabc )
add_subdirectory( arts )
add_subdirectory( interfaces )
add_subdirectory( kate )
add_subdirectory( kcert )
if( XRANDR_FOUND )
add_subdirectory( krandr )
endif( XRANDR_FOUND )
add_subdirectory( khtml )
add_subdirectory( kcmshell )
add_subdirectory( kconf_update )
add_subdirectory( kdewidgets )
add_subdirectory( kimgio )
add_subdirectory( kioslave )
add_subdirectory( kstyles )
add_subdirectory( libkmid )
add_subdirectory( libkscreensaver )
add_subdirectory( networkstatus )
add_subdirectory( knewstuff )
add_subdirectory( licenses )
add_subdirectory( dnssd )
add_subdirectory( pics )
add_subdirectory( mimetypes )

+ 17
- 0
arts/CMakeLists.txt View File

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

if( ARTS_FOUND )
add_subdirectory( kde )
add_subdirectory( message )
endif( ARTS_FOUND )

add_subdirectory( knotify )

+ 69
- 0
arts/kde/CMakeLists.txt View File

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

add_definitions(
${TQT_CFLAGS_OTHER}
)

include_directories(
${TQT_INCLUDE_DIRS}
${ARTS_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/kdecore
${CMAKE_SOURCE_DIR}/kdecore
${CMAKE_SOURCE_DIR}/kdeui
${CMAKE_SOURCE_DIR}/kio
${CMAKE_SOURCE_DIR}/kio/kio
)

link_directories(
${TQT_LIBRARY_DIRS}
${ARTS_LIBRARY_DIRS}
)


##### headers ###################################

install( FILES
kplayobject.h kplayobjectfactory.h kartsfloatwatch.h
${CMAKE_CURRENT_BINARY_DIR}/artskde.h kartsdispatcher.h
kaudiorecordstream.h kaudioplaystream.h kartsserver.h
kvideowidget.h kaudiomanagerplay.h
DESTINATION ${INCLUDE_INSTALL_DIR}/arts )


##### artskde ###################################

set( target artskde )

set( ${target}_SRCS
artskde.cc kioinputstream_impl.cpp kplayobject.cc
kplayobjectfactory.cc kartsfloatwatch.cpp kartsdispatcher.cc
kaudiorecordstream.cpp kaudioplaystream.cpp kartsserver.cpp
kdatarequest_impl.cpp kaudioconverter.cc kvideowidget.cpp
kplayobjectcreator.cc kaudiomanagerplay.cpp
)

add_custom_command(
OUTPUT artskde.cc artskde.h
COMMAND ${ARTS_MCOPIDL_EXECUTABLE}
ARGS -I${ARTS_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/artskde.idl
DEPENDS artskde.idl
)

tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 1.2.0
LINK kio-shared mcop artsflow_idl kmedia2_idl soundserver_idl artsflow qtmcop
DESTINATION ${LIB_INSTALL_DIR}
)

+ 56
- 0
arts/knotify/CMakeLists.txt View File

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

add_definitions(
${TQT_CFLAGS_OTHER}
)

include_directories(
${TQT_INCLUDE_DIRS}
${ARTS_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/kdecore
${CMAKE_SOURCE_DIR}/arts/kde
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/kdecore
${CMAKE_SOURCE_DIR}/kdeui
)

link_directories(
${TQT_LIBRARY_DIRS}
${ARTS_LIBRARY_DIRS}
)


##### other data ################################

install( FILES knotify.desktop DESTINATION ${SERVICES_INSTALL_DIR} )


##### knotify ###################################

set( target knotify )

set( ${target}_SRCS
knotify.cpp knotify.skel
)

if( ARTS_FOUND )
set( LIBS artskde-shared )
endif( ARTS_FOUND )

tde_add_kpart( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK ${LIBS}
DEPENDENCIES dcopidl
DESTINATION ${PLUGIN_INSTALL_DIR}
)

+ 40
- 0
arts/message/CMakeLists.txt View File

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

add_definitions(
${TQT_CFLAGS_OTHER}
)

include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/kdecore
${CMAKE_SOURCE_DIR}/kdecore
${CMAKE_SOURCE_DIR}/kdeui
)

link_directories(
${TQT_LIBRARY_DIRS}
)


##### artsmessage ###############################

set( target artsmessage )

set( ${target}_SRCS
artsmessage.cc
)

tde_add_executable( ${target}
SOURCES ${${target}_SRCS}
LINK kdeui-shared
DESTINATION ${BIN_INSTALL_DIR}
)

+ 684
- 0
cmake/modules/TDEMacros.cmake View File

@@ -0,0 +1,684 @@
#################################################
#####
##### tde_install_icons( <icons...> THEME <svgicons> DESTINATION <destdir> )
##### default theme: hicolor
##### default destination: ${SHARE_INSTALL_DIR}/icons

macro( tde_install_icons )

# clearing
unset( _dest )
unset( _req_theme )
unset( _icons )
set( _var _icons )

# parse all arguments
foreach( _arg ${ARGV} )
# directive DESTINATION
if( _arg STREQUAL "DESTINATION" )
set( _var _dest )
set( _directive 1 )
endif( _arg STREQUAL "DESTINATION" )
# directive THEME
if( _arg STREQUAL "THEME" )
set( _var _req_theme )
set( _directive 1 )
endif( _arg STREQUAL "THEME" )
# collect data
if( _directive )
unset( _directive )
else( _directive )
set( ${_var} ${${_var}} ${_arg} )
set( _var _icons )
endif( _directive )
endforeach( _arg )

#defaults
if( NOT _icons )
set( _icons "*" )
endif( NOT _icons )
if( NOT _dest )
set( _dest "${SHARE_INSTALL_DIR}/icons" )
endif( NOT _dest )

foreach( _icon ${_icons} )
unset( _theme ) # clearing

file(GLOB _icon_files *-${_icon}.png _icon_files *-${_icon}.svg* )
foreach( _icon_file ${_icon_files} )
# FIXME need a review
string( REGEX MATCH "^.*/([a-zA-Z][a-zA-Z])([0-9a-zA-Z]+)\\-([a-z]+)\\-(.+)$" _dummy "${_icon_file}" )
set( _type "${CMAKE_MATCH_1}" )
set( _size "${CMAKE_MATCH_2}" )
set( _group "${CMAKE_MATCH_3}" )
set( _name "${CMAKE_MATCH_4}" )

# autodetect theme
if( NOT _req_theme )
if( "${_type}" STREQUAL "cr" )
set( _theme crystalsvg )
endif( "${_type}" STREQUAL "cr" )
# defaulting
if( NOT _theme )
set( _theme hicolor )
endif( NOT _theme )
else( NOT _req_theme )
set( _theme ${_req_theme} )
endif( NOT _req_theme )

# fix "group" name
if( "${_group}" STREQUAL "mime" )
set( _group "mimetypes" )
endif( "${_group}" STREQUAL "mime" )
if( "${_group}" STREQUAL "filesys" )
set( _group "filesystems" )
endif( "${_group}" STREQUAL "filesys" )
if( "${_group}" STREQUAL "device" )
set( _group "devices" )
endif( "${_group}" STREQUAL "device" )
if( "${_group}" STREQUAL "app" )
set( _group "apps" )
endif( "${_group}" STREQUAL "app" )
if( "${_group}" STREQUAL "action" )
set( _group "actions" )
endif( "${_group}" STREQUAL "action" )

if( "${_size}" STREQUAL "sc" )
install( FILES ${_icon_file} DESTINATION ${_dest}/${_theme}/scalable/${_group}/ RENAME ${_name} )
else( "${_size}" STREQUAL "sc" )
install( FILES ${_icon_file} DESTINATION ${_dest}/${_theme}/${_size}x${_size}/${_group}/ RENAME ${_name} )
endif( "${_size}" STREQUAL "sc" )

endforeach( _icon_file )
endforeach( _icon )

endmacro( tde_install_icons )


#################################################
#####
##### tde_add_lut( <source> <result> [depends] )
##### default depends: source

macro( tde_add_lut _src _lut _dep )
set( create_hash_table ${CMAKE_SOURCE_DIR}/kjs/create_hash_table )
if( NOT _dep )
set( _dep ${_src} )
endif( NOT _dep )
add_custom_command( OUTPUT ${_lut}
COMMAND perl ARGS ${create_hash_table} ${CMAKE_CURRENT_SOURCE_DIR}/${_src} -i > ${_lut}
DEPENDS ${_src} )
set_source_files_properties( ${_dep} PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_lut} )
unset( _dep )
endmacro( tde_add_lut )


#################################################
#####
##### tde_add_luts( <sources...> )

macro( tde_add_luts )
foreach( _src ${ARGV} )
get_filename_component( _lut ${_src} NAME_WE )
set( _lut "${_lut}.lut.h" )
tde_add_lut( ${_src} ${_lut} ${_src} )
endforeach( _src )
endmacro( tde_add_luts )


#################################################
#####
##### tde_install_la_file( <target> <destination> )

macro( tde_install_la_file _target _destination )

get_target_property( _target_location ${_target} LOCATION )
get_filename_component( _laname ${_target_location} NAME_WE )
get_filename_component( _soname ${_target_location} NAME )
set( _laname ${CMAKE_CURRENT_BINARY_DIR}/${_laname}.la )

file( WRITE ${_laname}
"# ${_laname} - a libtool library file, generated by cmake
# The name that we can dlopen(3).
dlname='${_soname}'
# Names of this library
library_names='${_soname} ${_soname} ${_soname}'
# The name of the static archive
old_library=''
# Libraries that this one depends upon.
dependency_libs=''
# Version information.\ncurrent=0\nage=0\nrevision=0
# Is this an already installed library?\ninstalled=yes
# Should we warn about portability when linking against -modules?\nshouldnotlink=yes
# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''
# Directory that this library needs to be installed in:
libdir='${_destination}'
" )

install( FILES ${_laname} DESTINATION ${_destination} )

endmacro( tde_install_la_file )


#################################################
#####
##### __tde_internal_process_sources

macro( __tde_internal_process_sources _sources )

unset( ${_sources} )

foreach( _arg ${ARGN} )
get_filename_component( _ext ${_arg} EXT )
get_filename_component( _name ${_arg} NAME_WE )
get_filename_component( _path ${_arg} PATH )

# if not path, set it to "."
if( NOT _path )
set( _path "./" )
endif( NOT _path )

# handle .ui files
if( ${_ext} STREQUAL ".ui" )
kde3_add_ui_files( ${_sources} ${_arg} )

# handle .skel files
elseif( ${_ext} STREQUAL ".skel" )
kde3_add_dcop_skels( ${_sources} ${_name}.h )

# handle .stub files
elseif( ${_ext} STREQUAL ".stub" )
kde3_add_dcop_stubs( ${_sources} ${_path}/${_name}.h )

# handle .kcfgc files
elseif( ${_ext} STREQUAL ".kcfgc" )
kde3_add_kcfg_files( ${_sources} ${_arg} )

# handle any other files
else( ${_ext} STREQUAL ".ui" )
list(APPEND ${_sources} ${_arg} )
endif( ${_ext} STREQUAL ".ui" )
endforeach( _arg )

endmacro( __tde_internal_process_sources )


#################################################
#####
##### tde_install_libtool_file

macro( tde_install_libtool_file _target _destination )

get_target_property( _target_location ${_target} LOCATION )

# get name of target
get_filename_component( _name ${_target_location} NAME_WE )

# get .la name
set( _laname ${_name}.la )

# get .so name
get_filename_component( _soname ${_target_location} NAME )

# get version of target
get_target_property( _target_version ${_target} VERSION )
get_target_property( _target_soversion ${_target} SOVERSION )

# we have so version
if( _target_version )
set( _library_name_1 "${_soname}.${_target_version}" )
set( _library_name_2 "${_soname}.${_target_soversion}" )
set( _library_name_3 "${_soname}" )

string( REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" _dummy "${_target_version}" )
set( _version_current "${CMAKE_MATCH_1}" )
set( _version_age "${CMAKE_MATCH_2}" )
set( _version_revision "${CMAKE_MATCH_3}" )

# we have no so version (module?)
else( _target_version )
set( _library_name_1 "${_soname}" )
set( _library_name_2 "${_soname}" )
set( _library_name_3 "${_soname}" )
set( _version_current "0" )
set( _version_age "0" )
set( _version_revision "0" )
endif( _target_version )

if( IS_ABSOLUTE ${_destination} )
set( _libdir "${_destination}" )
else( IS_ABSOLUTE ${_destination} )
set( _libdir "${CMAKE_INSTALL_PREFIX}/${_destination}" )
endif( IS_ABSOLUTE ${_destination} )

configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_libtool_file.cmake "${_laname}" @ONLY )

install( FILES "${CMAKE_CURRENT_BINARY_DIR}/${_laname}" DESTINATION ${_destination} )

endmacro( tde_install_libtool_file )


#################################################
#####
##### tde_add_library

macro( tde_add_library _arg_target )

unset( _target )
unset( _type )
unset( _static_pic )
unset( _automoc )
unset( _no_libtool_file )
unset( _version )
unset( _sources )
unset( _destination )
unset( _embed )
unset( _link )
unset( _dependencies )
unset( _storage )

set( _shouldnotlink no )

foreach( _arg ${ARGV} )

# this variable help us to skip
# storing unapropriate values (i.e. directives)
unset( _skip_store )

# found one of directives: "SHARED", "STATIC", "MODULE"
if( "${_arg}" STREQUAL "SHARED" OR "${_arg}" STREQUAL "STATIC" OR "${_arg}" STREQUAL "MODULE" )
set( _skip_store 1 )
set( _type "${_arg}" )
endif( "${_arg}" STREQUAL "SHARED" OR "${_arg}" STREQUAL "STATIC" OR "${_arg}" STREQUAL "MODULE" )

# found directive "STATIC_PIC"
if( "${_arg}" STREQUAL "STATIC_PIC" )
set( _skip_store 1 )
set( _type "STATIC" )
set( _static_pic 1 )
endif( "${_arg}" STREQUAL "STATIC_PIC" )

# found directive "AUTOMOC"
if( "${_arg}" STREQUAL "AUTOMOC" )
set( _skip_store 1 )
set( _automoc 1 )
endif( "${_arg}" STREQUAL "AUTOMOC" )

# found directive "NO_LIBTOOL_FILE"
if( "${_arg}" STREQUAL "NO_LIBTOOL_FILE" )
set( _skip_store 1 )
set( _no_libtool_file 1 )
endif( "${_arg}" STREQUAL "NO_LIBTOOL_FILE" )

# found directive "VERSION"
if( "${_arg}" STREQUAL "VERSION" )
set( _skip_store 1 )
set( _storage "_version" )
endif( "${_arg}" STREQUAL "VERSION" )

# found directive "SOURCES"
if( "${_arg}" STREQUAL "SOURCES" )
set( _skip_store 1 )
set( _storage "_sources" )
endif( "${_arg}" STREQUAL "SOURCES" )

# found directive "EMBED"
if( "${_arg}" STREQUAL "EMBED" )
set( _skip_store 1 )
set( _storage "_embed" )
endif( "${_arg}" STREQUAL "EMBED" )

# found directive "LINK"
if( "${_arg}" STREQUAL "LINK" )
set( _skip_store 1 )
set( _storage "_link" )
endif( "${_arg}" STREQUAL "LINK" )

# found directive "DEPENDENCIES"
if( "${_arg}" STREQUAL "DEPENDENCIES" )
set( _skip_store 1 )
set( _storage "_dependencies" )
endif( "${_arg}" STREQUAL "DEPENDENCIES" )

# found directive "DESTINATION"
if( "${_arg}" STREQUAL "DESTINATION" )
set( _skip_store 1 )
set( _storage "_destination" )
unset( ${_storage} )
endif( "${_arg}" STREQUAL "DESTINATION" )

# storing value
if( _storage AND NOT _skip_store )
#set( ${_storage} "${${_storage}} ${_arg}" )
list( APPEND ${_storage} ${_arg} )
endif( _storage AND NOT _skip_store )

endforeach( _arg )

# if no type is set, we choose one
# based on BUILD_SHARED_LIBS
if( NOT _type )
if( BUILD_SHARED_LIBS )
set( _type "SHARED" )
else( BUILD_SHARED_LIBS )
set( _type "STATIC" )
endif( BUILD_SHARED_LIBS )
endif( NOT _type )

# change target name, based on type
string( TOLOWER "${_type}" _target )
set( _target "${_arg_target}-${_target}" )

# disallow target without sources
if( NOT _sources )
message( FATAL_ERROR "\nTarget [$_target] have no sources." )
endif( NOT _sources )

# processing different types of sources
__tde_internal_process_sources( _sources ${_sources} )

# set automoc
if( _automoc )
kde3_automoc( ${_sources} )
endif( _automoc )

# add target
add_library( ${_target} ${_type} ${_sources} )

# we assume that modules have no prefix and no version
# also, should not link
if( ${_type} STREQUAL "MODULE" )
set_target_properties( ${_target} PROPERTIES PREFIX "" )
unset( _version )
set( _shouldnotlink yes )
endif( ${_type} STREQUAL "MODULE" )

# set real name of target
set_target_properties( ${_target} PROPERTIES OUTPUT_NAME ${_arg_target} )

# set -fPIC flag for static libraries
if( _static_pic )
set_target_properties( ${_target} PROPERTIES COMPILE_FLAGS -fPIC )
endif( _static_pic )

# set version
if( _version )
string( REGEX MATCH "^[0-9]+" _soversion ${_version} )
set_target_properties( ${_target} PROPERTIES VERSION ${_version} SOVERSION ${_soversion} )
endif( _version )

# set embedded archives
if( _embed )
list( INSERT _link 0 "-Wl,-no-whole-archive" )
list( INSERT _link 0 ${_embed} )
list( INSERT _link 0 "-Wl,-whole-archive" )
endif( _embed )

# set link libraries
if( _link )
target_link_libraries( ${_target} ${_link} )
endif( _link )

# set dependencies
if( _dependencies )
add_dependencies( ${_target} ${_dependencies} )
endif( _dependencies )

# set destination directory
if( _destination )
install( TARGETS ${_target} DESTINATION ${_destination} )
if( NOT "STATIC" STREQUAL ${_type} AND NOT _no_libtool_file )
tde_install_libtool_file( ${_target} ${_destination} )
endif( NOT "STATIC" STREQUAL ${_type} AND NOT _no_libtool_file )
endif( _destination )

endmacro( tde_add_library )


#################################################
#####
##### tde_add_kpart

macro( tde_add_kpart _target )
tde_add_library( ${_target} ${ARGN} MODULE )
endmacro( tde_add_kpart )


#################################################
#####
##### tde_add_executable

macro( tde_add_executable _arg_target )

unset( _target )
unset( _automoc )
unset( _setuid )
unset( _sources )
unset( _destination )
unset( _link )
unset( _dependencies )
unset( _storage )

foreach( _arg ${ARGV} )

# this variable help us to skip
# storing unapropriate values (i.e. directives)
unset( _skip_store )

# found directive "AUTOMOC"
if( "${_arg}" STREQUAL "AUTOMOC" )
set( _skip_store 1 )
set( _automoc 1 )
endif( "${_arg}" STREQUAL "AUTOMOC" )

# found directive "SETUID"
if( "${_arg}" STREQUAL "SETUID" )
set( _skip_store 1 )
set( _setuid 1 )
endif( "${_arg}" STREQUAL "SETUID" )

# found directive "SOURCES"
if( "${_arg}" STREQUAL "SOURCES" )
set( _skip_store 1 )
set( _storage "_sources" )
endif( "${_arg}" STREQUAL "SOURCES" )

# found directive "LINK"
if( "${_arg}" STREQUAL "LINK" )
set( _skip_store 1 )
set( _storage "_link" )
endif( "${_arg}" STREQUAL "LINK" )

# found directive "DEPENDENCIES"
if( "${_arg}" STREQUAL "DEPENDENCIES" )
set( _skip_store 1 )
set( _storage "_dependencies" )
endif( "${_arg}" STREQUAL "DEPENDENCIES" )

# found directive "DESTINATION"
if( "${_arg}" STREQUAL "DESTINATION" )
set( _skip_store 1 )
set( _storage "_destination" )
unset( ${_storage} )
endif( "${_arg}" STREQUAL "DESTINATION" )

# storing value
if( _storage AND NOT _skip_store )
#set( ${_storage} "${${_storage}} ${_arg}" )
list( APPEND ${_storage} ${_arg} )
endif( _storage AND NOT _skip_store )

endforeach( _arg )

set( _target "${_arg_target}" )

# disallow target without sources
if( NOT _sources )
message( FATAL_ERROR "\nTarget [$_target] have no sources." )
endif( NOT _sources )

# processing different types of sources
__tde_internal_process_sources( _sources ${_sources} )

# set automoc
if( _automoc )
kde3_automoc( ${_sources} )
endif( _automoc )

# add target
add_executable( ${_target} ${_sources} )

# set link libraries
if( _link )
target_link_libraries( ${_target} ${_link} )
endif( _link )

# set dependencies
if( _dependencies )
add_dependencies( ${_target} ${_dependencies} )
endif( _dependencies )

# set destination directory
if( _destination )
if( _setuid )
install( TARGETS ${_target} DESTINATION ${_destination} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE SETUID )
else( _setuid )
install( TARGETS ${_target} DESTINATION ${_destination} )
endif( _setuid )
endif( _destination )

endmacro( tde_add_executable )


#################################################
#####
##### tde_add_kdeinit_executable

macro( tde_add_kdeinit_executable _target )

configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_kdeinit_executable.cmake ${_target}_kdeinit_executable.cpp COPYONLY )
configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_kdeinit_module.cmake ${_target}_kdeinit_module.cpp COPYONLY )

unset( _sources )
unset( _runtime_destination )
unset( _library_destination )
unset( _plugin_destination )

# default storage is _sources
set( _storage _sources )

foreach( _arg ${ARGN} )

# this variable help us to skip
# storing unapropriate values (i.e. directives)
unset( _skip_store )

# found directive "RUNTIME_DESTINATION"
if( "${_arg}" STREQUAL "RUNTIME_DESTINATION" )
set( _skip_store 1 )
set( _storage "_runtime_destination" )
unset( ${_storage} )
endif( "${_arg}" STREQUAL "RUNTIME_DESTINATION" )

# found directive "LIBRARY_DESTINATION"
if( "${_arg}" STREQUAL "LIBRARY_DESTINATION" )
set( _skip_store 1 )
set( _storage "_library_destination" )
unset( ${_storage} )
endif( "${_arg}" STREQUAL "LIBRARY_DESTINATION" )

# found directive "PLUGIN_DESTINATION"
if( "${_arg}" STREQUAL "PLUGIN_DESTINATION" )
set( _skip_store 1 )
set( _storage "_plugin_destination" )
unset( ${_storage} )
endif( "${_arg}" STREQUAL "PLUGIN_DESTINATION" )

# storing value
if( _storage AND NOT _skip_store )
list( APPEND ${_storage} ${_arg} )
set( _storage "_sources" )
endif( _storage AND NOT _skip_store )

endforeach( _arg )

# if destinations are not set, we using some defaults
# we assume that kdeinit executable MUST be installed
# (otherwise why we build it?)
if( NOT _runtime_destination )
set( _runtime_destination ${BIN_INSTALL_DIR} )
endif( NOT _runtime_destination )
if( NOT _library_destination )
set( _library_destination ${LIB_INSTALL_DIR} )
endif( NOT _library_destination )
if( NOT _plugin_destination )
set( _plugin_destination ${PLUGIN_INSTALL_DIR} )
endif( NOT _plugin_destination )

# create the library
tde_add_library( kdeinit_${_target} ${_sources} SHARED
DESTINATION ${_library_destination}
)

# create the executable
tde_add_executable( ${_target}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${_target}_kdeinit_executable.cpp
LINK kdeinit_${_target}-shared
DESTINATION ${_runtime_destination}
)

# create the plugin
tde_add_kpart( ${_target}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${_target}_kdeinit_module.cpp
LINK kdeinit_${_target}-shared
DESTINATION ${_plugin_destination}
)

endmacro( tde_add_kdeinit_executable )


#################################################
#####
##### tde_install_symlink

macro( tde_install_symlink _target _link )

# if path is relative, we must to prefix it with CMAKE_INSTALL_PREFIX
if( IS_ABSOLUTE ${_link} )
set( _destination "${_link}" )
else( IS_ABSOLUTE ${_link} )
set( _destination "${CMAKE_INSTALL_PREFIX}/${_link}" )
endif( IS_ABSOLUTE ${_link} )

# prefix with DESTDIR
set( _destination "$ENV{DESTDIR}${_destination}" )

get_filename_component( _path ${_destination} PATH )
if( NOT IS_DIRECTORY "${_path}" )
install( CODE "execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory ${_path} )" )
endif( NOT IS_DIRECTORY "${_path}" )

install( CODE "execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${_target} ${_destination} )" )

endmacro( tde_install_symlink )


#################################################
#####
##### tde_install_empty_directory

macro( tde_install_empty_directory _path )

# if path is relative, we must to prefix it with CMAKE_INSTALL_PREFIX
if( IS_ABSOLUTE ${_path} )
set( _destination "${_path}" )
else( IS_ABSOLUTE ${_path} )
set( _destination "${CMAKE_INSTALL_PREFIX}/${_path}" )
endif( IS_ABSOLUTE ${_path} )

# prefix with DESTDIR
set( _destination "$ENV{DESTDIR}${_destination}" )

install( CODE "execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory ${_destination} )" )

endmacro( tde_install_empty_directory )

+ 5
- 0
cmake/modules/template_dummy_cpp.cmake View File

@@ -0,0 +1,5 @@
#ifdef _AIX
namespace {
void *not_empty_file;
}
#endif

+ 2
- 0
cmake/modules/template_kdeinit_executable.cmake View File

@@ -0,0 +1,2 @@
extern "C" int kdemain(int argc, char* argv[]);
int main(int argc, char* argv[]) { return kdemain(argc,argv); }

+ 3
- 0
cmake/modules/template_kdeinit_module.cmake View File

@@ -0,0 +1,3 @@
#include <kdemacros.h>
extern "C" int kdemain(int argc, char* argv[]);
extern "C" KDE_EXPORT int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }

+ 35
- 0
cmake/modules/template_libtool_file.cmake View File

@@ -0,0 +1,35 @@
# @_laname@ - a libtool library file
# Generated by CMake
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='@_library_name_2@'

# Names of this library.
library_names='@_library_name_1@ @_library_name_2@ @_library_name_3@'

# The name of the static archive.
old_library=''

# Libraries that this one depends upon.
dependency_libs=''

# Version information for @_name@.
current=@_version_current@
age=@_version_age@
revision=@_version_revision@

# Is this an already installed library?
installed=yes

# Should we warn about portability when linking against -modules?
shouldnotlink=@_shouldnotlink@

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='@_libdir@'

+ 1158
- 0
config.h.cmake
File diff suppressed because it is too large
View File


+ 82
- 0
dcop/CMakeLists.txt View File

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

add_subdirectory( KDE-ICE )
add_subdirectory( dcopidl )
add_subdirectory( dcopidlng )
add_subdirectory( dcopidl2cpp )
add_subdirectory( client )


include( KDE3Macros )

add_definitions(
${TQT_CFLAGS_OTHER}
)

include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/kdecore
${CMAKE_SOURCE_DIR}/kdecore
)

link_directories(
${TQT_LIBRARY_DIRS}
)


##### headers ###################################

install( FILES
dcopclient.h dcopobject.h dcopstub.h dcopref.h
dcoptypes.h kdatastream.h
DESTINATION ${INCLUDE_INSTALL_DIR} )


##### libDCOP ###################################

set( target DCOP )

set( ${target}_SRCS
dcopstub.cpp dcopref.cpp dcopobject.cpp dcopclient.cpp
)

tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 4.2.0
LINK kICE-static ${TQT_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)


#### dcopserver (kdeinit) #######################

set( target dcopserver )

set( ${target}_SRCS
dcopserver.cpp dcopsignals.cpp
)

tde_add_kdeinit_executable( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK DCOP-shared
)


#### dcopserver_shutdown ########################

tde_add_executable( dcopserver_shutdown
SOURCES dcopserver_shutdown.c
DESTINATION ${BIN_INSTALL_DIR}
)

+ 39
- 0
dcop/KDE-ICE/CMakeLists.txt View File

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

add_definitions(
-DICE_t
-DTRANS_SERVER
-DTRANS_CLIENT
-DUNIXCONN
-DANSICPP
)

include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/dcop
)


##### kICE ######################################

set( target kICE )

set( ${target}_SRCS
accept.c authutil.c connect.c error.c getauth.c
iceauth.c listen.c listenwk.c locking.c misc.c
ping.c process.c protosetup.c register.c replywait.c
setauth.c shutdown.c watch.c transport.c globals.c
)

tde_add_library( ${target} STATIC_PIC
SOURCES ${${target}_SRCS}
)

+ 61
- 0
dcop/client/CMakeLists.txt View File

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

add_definitions(
${TQT_CFLAGS_OTHER}
)

include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/kdecore
${CMAKE_BINARY_DIR}/kdecore
)

link_directories(
${TQT_LIBRARY_DIRS}
)


#### dcop #######################################

tde_add_executable( dcop SOURCES dcop.cpp LINK DCOP-shared DESTINATION ${BIN_INSTALL_DIR} )


#### dcopfind ###################################

tde_add_executable( dcopfind SOURCES dcopfind.cpp LINK DCOP-shared DESTINATION ${BIN_INSTALL_DIR} )


#### dcopclient #################################

tde_add_executable( dcopclient SOURCES dcopclient.c DESTINATION ${BIN_INSTALL_DIR} )


#### dcopobject #################################

tde_add_executable( dcopobject SOURCES dcopobject.c DESTINATION ${BIN_INSTALL_DIR} )


#### dcopref ####################################

tde_add_executable( dcopref SOURCES dcopref.c DESTINATION ${BIN_INSTALL_DIR} )


#### dcopstart ##################################

tde_add_executable( dcopstart SOURCES dcopstart.cpp LINK DCOP-shared DESTINATION ${BIN_INSTALL_DIR} )


#### dcopquit ###################################

tde_add_executable( dcopquit SOURCES dcopquit.cpp LINK DCOP-shared DESTINATION ${BIN_INSTALL_DIR} )

+ 39
- 0
dcop/dcopidl/CMakeLists.txt View File

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

add_definitions(
${TQT_CFLAGS_OTHER}
-include tqt.h
)

include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}
)

link_directories(
${TQT_LIBRARY_DIRS}
)


##### dcopidl ###################################

set( target dcopidl )

set( ${target}_SRCS
main.cpp yacc.cc scanner.cc
)

tde_add_executable( ${target}
SOURCES ${${target}_SRCS}
LINK DCOP-shared
DESTINATION ${BIN_INSTALL_DIR}
)

+ 36
- 0
dcop/dcopidl2cpp/CMakeLists.txt View File

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

add_definitions(
${TQT_CFLAGS_OTHER}
)

include_directories(
${TQT_INCLUDE_DIRS}
)

link_directories(
${TQT_LIBRARY_DIRS}
)

##### dcopidl2cpp ###############################

set( target dcopidl2cpp )

set( ${target}_SRCS
main.cpp skel.cpp stub.cpp stubimpl.cpp
)

tde_add_executable( ${target}
SOURCES ${${target}_SRCS}
LINK ${TQT_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)

+ 25
- 0
dcop/dcopidlng/CMakeLists.txt View File

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

##### other data ################################

install( PROGRAMS
dcopidlng
DESTINATION ${BIN_INSTALL_DIR} )

install( PROGRAMS
kalyptus
DESTINATION ${DATA_INSTALL_DIR}/dcopidlng )

install( FILES
Ast.pm Iter.pm kalyptusCxxToDcopIDL.pm kdocAstUtil.pm
kdocParseDoc.pm kdocUtil.pm
DESTINATION ${DATA_INSTALL_DIR}/dcopidlng )

+ 54
- 0
dnssd/CMakeLists.txt View File

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

add_definitions(
${TQT_CFLAGS_OTHER}
)

include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/kdecore
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/kdecore
)

link_directories(
${TQT_LIBRARY_DIRS}
)

##### headers ###################################

install( FILES
domainbrowser.h query.h remoteservice.h
publicservice.h servicebase.h servicebrowser.h
${CMAKE_CURRENT_BINARY_DIR}/settings.h
DESTINATION ${INCLUDE_INSTALL_DIR}/dnssd )


##### kdnssd ####################################

set( target kdnssd )

set( ${target}_SRCS