diff options
author | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-19 21:04:17 +0000 |
---|---|---|
committer | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-19 21:04:17 +0000 |
commit | 4c7e54787a593c1bd8f30427720df86f40b751b1 (patch) | |
tree | 7d7a47582c08d7a65a5b9a272660a96036eb4fc6 | |
parent | 5ab9dadace563042784f58bc7398543869c1c0b9 (diff) | |
download | tdenetwork-4c7e54787a593c1bd8f30427720df86f40b751b1.tar.gz tdenetwork-4c7e54787a593c1bd8f30427720df86f40b751b1.zip |
[kdenetwork/ktalkd] added cmake support
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1254535 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | config.h.cmake | 15 | ||||
-rw-r--r-- | ktalkd/CMakeLists.txt | 17 | ||||
-rw-r--r-- | ktalkd/ConfigureChecks.cmake | 18 | ||||
-rw-r--r-- | ktalkd/kcmktalkd/CMakeLists.txt | 37 | ||||
-rw-r--r-- | ktalkd/ktalkd/CMakeLists.txt | 41 | ||||
-rw-r--r-- | ktalkd/ktalkd/announce.cpp | 1 | ||||
-rw-r--r-- | ktalkd/ktalkd/machines/CMakeLists.txt | 24 | ||||
-rw-r--r-- | ktalkd/ktalkdlg/CMakeLists.txt | 30 | ||||
-rw-r--r-- | ktalkd/mail.local/CMakeLists.txt | 22 |
10 files changed, 208 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 37659289..7d9e3735 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ set( VERSION "3.5.13" ) ##### include essential cmake modules ########### include( FindPkgConfig ) +include( CheckFunctionExists ) include( CheckIncludeFile ) include( CheckIncludeFileCXX ) include( CheckCXXSourceCompiles ) @@ -104,6 +105,7 @@ option( BUILD_KPPP "Build kppp" ${BUILD_ALL} ) option( BUILD_KRDC "Build krdc" ${BUILD_ALL} ) option( BUILD_KRFB "Build krfb" ${BUILD_ALL} ) option( BUILD_KSIRC "Build ksirc" ${BUILD_ALL} ) +option( BUILD_KTALKD "Build ktalkd" ${BUILD_ALL} ) option( BUILD_LIBRSS "Build librss" ${BUILD_ALL} ) @@ -139,6 +141,7 @@ tde_conditional_add_subdirectory( BUILD_KPPP kppp ) tde_conditional_add_subdirectory( BUILD_KRDC krdc ) tde_conditional_add_subdirectory( BUILD_KRFB krfb ) tde_conditional_add_subdirectory( BUILD_KSIRC ksirc ) +tde_conditional_add_subdirectory( BUILD_KTALKD ktalkd ) tde_conditional_add_subdirectory( BUILD_LIBRSS librss ) diff --git a/config.h.cmake b/config.h.cmake index a9cf2d87..7283634b 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -21,7 +21,22 @@ #cmakedefine HAVE_SYS_PARAM_H 1 #cmakedefine HAVE_NET_IF_PPP_H 1 +// ktalkd +#cmakedefine HAVE_SYS_TYPES_H 1 +#cmakedefine HAVE_SYS_STAT_H 1 +#cmakedefine HAVE_SYS_FILE_H 1 +#cmakedefine HAVE_UNISTD_H 1 +#cmakedefine HAVE_UTMP_H 1 +#cmakedefine HAVE_VSNPRINTF 1 +#define SCANDIR_NEEDS_CONST 1 +// only for Linux +#define PROC_FIND_USER 1 +#define UTMP_AND_PROC_FIND_USER 1 +#define ALL_PROCESSES_AND_PROC_FIND_USER 1 + +#ifdef __cplusplus extern "C" { unsigned long strlcpy(char*, const char*, unsigned long); unsigned long strlcat(char*, const char*, unsigned long); } +#endif diff --git a/ktalkd/CMakeLists.txt b/ktalkd/CMakeLists.txt new file mode 100644 index 00000000..4e019db9 --- /dev/null +++ b/ktalkd/CMakeLists.txt @@ -0,0 +1,17 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include( ConfigureChecks.cmake ) + +add_subdirectory( ktalkd ) +add_subdirectory( mail.local ) +add_subdirectory( kcmktalkd ) +add_subdirectory( ktalkdlg ) diff --git a/ktalkd/ConfigureChecks.cmake b/ktalkd/ConfigureChecks.cmake new file mode 100644 index 00000000..8238322f --- /dev/null +++ b/ktalkd/ConfigureChecks.cmake @@ -0,0 +1,18 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +check_include_file( sys/types.h HAVE_SYS_TYPES_H ) +check_include_file( sys/stat.h HAVE_SYS_STAT_H ) +check_include_file( sys/file.h HAVE_SYS_FILE_H ) +check_include_file( unistd.h HAVE_UNISTD_H ) +check_include_file( utmp.h HAVE_UTMP_H ) + +check_function_exists( vsnprintf HAVE_VSNPRINTF ) diff --git a/ktalkd/kcmktalkd/CMakeLists.txt b/ktalkd/kcmktalkd/CMakeLists.txt new file mode 100644 index 00000000..f9f7a560 --- /dev/null +++ b/ktalkd/kcmktalkd/CMakeLists.txt @@ -0,0 +1,37 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +tde_install_icons( ktalkd ) +install( FILES kcmktalkd.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) + + +##### kcm_ktalkd (module) ####################### + +tde_add_kpart( kcm_ktalkd AUTOMOC + SOURCES + main.cpp soundpage.cpp answmachpage.cpp forwmachpage.cpp + LINK kio-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/ktalkd/ktalkd/CMakeLists.txt b/ktalkd/ktalkd/CMakeLists.txt new file mode 100644 index 00000000..32a9cb73 --- /dev/null +++ b/ktalkd/ktalkd/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( machines ) + +add_definitions( -DHAVE_KDE ) + +include_directories( + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES ktalkd.wav DESTINATION ${SOUND_INSTALL_DIR} ) +install( FILES ktalkdrc DESTINATION ${CONFIG_INSTALL_DIR} ) + + +##### ktalkd (executable) ####################### + +tde_add_executable( ktalkd + SOURCES + print.c repairs.c announce.cpp process.cpp readcfg++.cpp table.cpp + talkd.cpp find_user.cpp threads.cpp options.cpp unixsock.cpp + LINK mach-static kdecore-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/ktalkd/ktalkd/announce.cpp b/ktalkd/ktalkd/announce.cpp index d21f27f4..4606058f 100644 --- a/ktalkd/ktalkd/announce.cpp +++ b/ktalkd/ktalkd/announce.cpp @@ -44,6 +44,7 @@ #include <sys/stat.h> #endif #include <time.h> +#include <sys/time.h> #include <sys/wait.h> #include <sys/ioctl.h> #include <termios.h> diff --git a/ktalkd/ktalkd/machines/CMakeLists.txt b/ktalkd/ktalkd/machines/CMakeLists.txt new file mode 100644 index 00000000..43da0e27 --- /dev/null +++ b/ktalkd/ktalkd/machines/CMakeLists.txt @@ -0,0 +1,24 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_definitions( -Dksize_t=socklen_t ) + +include_directories( + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} +) + + +##### mach (static) ############################# + +tde_add_library( mach STATIC_PIC + SOURCES answmach.cpp forwmach.cpp talkconn.cpp +) diff --git a/ktalkd/ktalkdlg/CMakeLists.txt b/ktalkd/ktalkdlg/CMakeLists.txt new file mode 100644 index 00000000..9183ba5c --- /dev/null +++ b/ktalkd/ktalkdlg/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### ktalkdlg (executable) ##################### + +tde_add_executable( ktalkdlg AUTOMOC + SOURCES ktalkdlg.cpp + LINK kdeui-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/ktalkd/mail.local/CMakeLists.txt b/ktalkd/mail.local/CMakeLists.txt new file mode 100644 index 00000000..f6dd074c --- /dev/null +++ b/ktalkd/mail.local/CMakeLists.txt @@ -0,0 +1,22 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR} +) + + +##### mail.local (executable) ################### + +tde_add_executable( mail.local + SOURCES mail.local.c + DESTINATION ${BIN_INSTALL_DIR} +) |