From 760bf34acbfebc8f7d2c569238138173c103f0db Mon Sep 17 00:00:00 2001 From: samelian Date: Mon, 21 Mar 2011 22:03:43 +0000 Subject: [PATCH] [kdepim] initial cmake support for: kandy, knode git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1225593 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- CMakeLists.txt | 6 +- config.h.cmake | 3 + kandy/CMakeLists.txt | 15 +++++ kandy/ConfigureChecks.cmake | 18 ++++++ kandy/profiles/CMakeLists.txt | 12 ++++ kandy/src/CMakeLists.txt | 59 +++++++++++++++++ knode/CMakeLists.txt | 115 ++++++++++++++++++++++++++++++++++ knode/filters/CMakeLists.txt | 15 +++++ knode/pics/CMakeLists.txt | 21 +++++++ 9 files changed, 263 insertions(+), 1 deletion(-) create mode 100644 kandy/CMakeLists.txt create mode 100644 kandy/ConfigureChecks.cmake create mode 100644 kandy/profiles/CMakeLists.txt create mode 100644 kandy/src/CMakeLists.txt create mode 100644 knode/CMakeLists.txt create mode 100644 knode/filters/CMakeLists.txt create mode 100644 knode/pics/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 01869c97..f88f632c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,6 +102,8 @@ option( BUILD_KONSOLEKALENDAR "Build konsolekalendar" ${BUILD_ALL} ) option( BUILD_KMAILCVT "Build kmailcvt" ${BUILD_ALL} ) option( BUILD_KARM "Build karm" ${BUILD_ALL} ) option( BUILD_KFILE_PLUGINS "Build kfile-plugins" ${BUILD_ALL} ) +option( BUILD_KANDY "Build kandy" ${BUILD_ALL} ) +option( BUILD_KNODE "Build knode" ${BUILD_ALL} ) ##### configure checks ########################## @@ -123,7 +125,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) ##### activate dependencies ##################### -if( BUILD_LIBKCAL OR BUILD_LIBKDEPIM OR BUILD_LIBKPIMIDENTITIES OR BUILD_KIOSLAVES OR BUILD_KMAIL ) +if( BUILD_LIBKCAL OR BUILD_LIBKDEPIM OR BUILD_LIBKPIMIDENTITIES OR BUILD_KIOSLAVES OR BUILD_KMAIL OR BUILD_KNODE ) add_subdirectory( libemailfunctions ) endif() @@ -166,6 +168,8 @@ tde_conditional_add_subdirectory( BUILD_KONSOLEKALENDAR konsolekalendar ) tde_conditional_add_subdirectory( BUILD_KMAILCVT kmailcvt ) tde_conditional_add_subdirectory( BUILD_KARM karm ) tde_conditional_add_subdirectory( BUILD_KFILE_PLUGINS kfile-plugins ) +tde_conditional_add_subdirectory( BUILD_KANDY kandy ) +tde_conditional_add_subdirectory( BUILD_KNODE knode ) ##### write configure files ##################### diff --git a/config.h.cmake b/config.h.cmake index ef56ac24..4ccd2dec 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -31,6 +31,9 @@ // kaddressbook #cmakedefine KDEPIM_NEW_DISTRLISTS 1 +// kandy +#cmakedefine HAVE_LOCKDEV 1 + // mimelib #ifdef __cplusplus extern "C" { diff --git a/kandy/CMakeLists.txt b/kandy/CMakeLists.txt new file mode 100644 index 00000000..ff11f9fa --- /dev/null +++ b/kandy/CMakeLists.txt @@ -0,0 +1,15 @@ +################################################# +# +# (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( src ) +add_subdirectory( profiles ) diff --git a/kandy/ConfigureChecks.cmake b/kandy/ConfigureChecks.cmake new file mode 100644 index 00000000..296191f2 --- /dev/null +++ b/kandy/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( "lockdev.h" HAVE_LOCKDEV_H ) +if( HAVE_LOCKDEV_H ) + check_library_exists( lockdev dev_unlock "" HAVE_LOCKDEV ) + if( HAVE_LOCKDEV ) + set( LOCKDEV_LIBRARY lockdev CACHE INTERNAL "" FORCE ) + endif( ) +endif( ) diff --git a/kandy/profiles/CMakeLists.txt b/kandy/profiles/CMakeLists.txt new file mode 100644 index 00000000..9f9626f4 --- /dev/null +++ b/kandy/profiles/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +install( FILES default.kandy DESTINATION ${DATA_INSTALL_DIR}/kandy ) diff --git a/kandy/src/CMakeLists.txt b/kandy/src/CMakeLists.txt new file mode 100644 index 00000000..563ef014 --- /dev/null +++ b/kandy/src/CMakeLists.txt @@ -0,0 +1,59 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_import( libkmime ) +tde_import( ktnef ) +tde_import( libkcal ) +tde_import( libkdepim ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES kandy.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +install( FILES uninstall.desktop RENAME kandy.desktop DESTINATION ${APPS_INSTALL_DIR}/Utilities ) +install( FILES kandy.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) +install( FILES kandyui.rc kandymobileui.rc DESTINATION ${DATA_INSTALL_DIR}/kandy ) + + +##### kandy (executable) ######################## + +tde_add_executable( kandy AUTOMOC + SOURCES + main.cpp kandy.cpp cmdpropertiesdialog_base.ui + cmdpropertiesdialog.cpp kandyview.cpp kandyiface.skel modem.cpp + atcommand.cpp commanditem.cpp mobilegui_base.ui mobilegui.cpp + commandscheduler.cpp commandset.cpp kandyprefs.kcfgc + kandyprefsdialog.cpp mobilemain.cpp + LINK kdepim-shared ${LOCKDEV_LIBRARY} + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### kandy_client (executable) ################# + +tde_add_executable( kandy_client AUTOMOC + SOURCES kandy_client.cpp + LINK kdecore-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/knode/CMakeLists.txt b/knode/CMakeLists.txt new file mode 100644 index 00000000..dbea9c71 --- /dev/null +++ b/knode/CMakeLists.txt @@ -0,0 +1,115 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +# FIXME KDE_CXXFLAGS = $(USE_THREADS) + +tde_import( ktnef ) +tde_import( libkcal ) +tde_import( libkmime ) +tde_import( libkdepim ) +tde_import( libkpgp ) + +add_subdirectory( pics ) +add_subdirectory( filters ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/libemailfunctions + ${CMAKE_SOURCE_DIR}/libkmime + ${CMAKE_SOURCE_DIR}/libkdepim + ${CMAKE_SOURCE_DIR}/libkpgp + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +tde_install_icons( ) + +install( FILES + KNode.desktop + DESTINATION ${XDG_APPS_INSTALL_DIR} ) + +install( FILES + knewsservice.protocol knode_config_identity.desktop + knode_config_accounts.desktop knode_config_appearance.desktop + knode_config_read_news.desktop knode_config_post_news.desktop + knode_config_privacy.desktop knode_config_cleanup.desktop + DESTINATION ${SERVICES_INSTALL_DIR} ) + +install( FILES + headers.rc knodeui.rc knreaderui.rc kncomposerui.rc + DESTINATION ${DATA_INSTALL_DIR}/knode ) + + +##### knodecommon (shared) ###################### + +tde_add_library( knodecommon SHARED AUTOMOC + SOURCES + knconfigmanager.cpp knconfig.cpp knconfigwidgets.cpp + knnetaccess.cpp knprotocolclient.cpp knnntpclient.cpp knjobdata.cpp + knaccountmanager.cpp kncollection.cpp kncollectionviewitem.cpp + knserverinfo.cpp knnntpaccount.cpp kngroupmanager.cpp + knarticlecollection.cpp kngroup.cpp kngroupbrowser.cpp + kngroupselectdialog.cpp kngroupdialog.cpp kngrouppropdlg.cpp + knfoldermanager.cpp knfolder.cpp knmemorymanager.cpp + kncleanup.cpp knconvert.cpp knarticlemanager.cpp knarticle.cpp + kndisplayedheader.cpp knsourceviewwindow.cpp knarticlewindow.cpp + knhdrviewitem.cpp kncomposer.cpp knarticlefactory.cpp + knfiltermanager.cpp knstatusfilter.cpp knstringfilter.cpp + knrangefilter.cpp knarticlefilter.cpp knfilterconfigwidget.cpp + knfilterdialog.cpp knsearchdialog.cpp utilities.cpp knscoring.cpp + knwidgets.cpp headerview.cpp knmainwidget.cpp aboutdata.cpp + knglobals.cpp knodecomposeriface.skel knodeiface.skel + kncollectionview.cpp articlewidget.cpp csshelper.cpp + smtpaccountwidget_base.ui + VERSION 3.0.0 + LINK emailfunctions-static kdepim-shared kpgp-shared khtml-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### kcm_knode (module) ######################## + +tde_add_kpart( kcm_knode AUTOMOC + SOURCES + knconfigpages.cpp + LINK knodecommon-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +##### libknodepart (module) ##################### + +tde_add_kpart( libknodepart AUTOMOC + SOURCES + knode_part.cpp + LINK knodecommon-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +##### knode (executable) ######################## + +tde_add_executable( knode AUTOMOC + SOURCES + knode.cpp knapplication.cpp main.cpp + LINK knodecommon-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/knode/filters/CMakeLists.txt b/knode/filters/CMakeLists.txt new file mode 100644 index 00000000..6617f931 --- /dev/null +++ b/knode/filters/CMakeLists.txt @@ -0,0 +1,15 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +install( FILES + 1.fltr 2.fltr 3.fltr 4.fltr 5.fltr 6.fltr + 7.fltr 8.fltr filters.rc + DESTINATION ${DATA_INSTALL_DIR}/knode/filters ) diff --git a/knode/pics/CMakeLists.txt b/knode/pics/CMakeLists.txt new file mode 100644 index 00000000..bac85b78 --- /dev/null +++ b/knode/pics/CMakeLists.txt @@ -0,0 +1,21 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_install_icons( + message_reply mail_get_all + DESTINATION ${DATA_INSTALL_DIR}/knode/icons ) + +install( FILES + stat_edit.png mail.png stat_saved.png ctlart.png greyball.png + ignore.png newsubs.png stat_sent.png eyes.png greyballchk.png + snderr.png group.png posting.png stat_cncl.png pgp-keys.png + group_big.png article.png + DESTINATION ${DATA_INSTALL_DIR}/knode/pics )