From cfafca887c20cf9f855d52b48edbdad0491cc763 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 23 Nov 2023 19:01:30 +0900 Subject: [PATCH] CMake conversion Signed-off-by: Michele Calgaro (cherry picked from commit 5bbf72161272557c243ac0bfd6935b058fe8dd17) --- CMakeLists.txt | 90 +++++++++++++++++++++ ConfigureChecks.cmake | 26 ++++++ config.h.cmake | 8 ++ plugin/CMakeLists.txt | 30 +++++++ po/CMakeLists.txt | 1 + smb4k/CMakeLists.txt | 46 +++++++++++ smb4k/browser/CMakeLists.txt | 31 +++++++ smb4k/browser/smb4knetworkbrowser_part.cpp | 2 +- smb4k/configdlg/CMakeLists.txt | 23 ++++++ smb4k/configdlg/smb4tdeconfigdialog.cpp | 2 +- smb4k/core/CMakeLists.txt | 49 +++++++++++ smb4k/core/smb4kauthinfo.h | 4 +- smb4k/core/smb4kbookmark.h | 4 +- smb4k/core/smb4kbookmarkhandler.h | 4 +- smb4k/core/smb4kcore.h | 4 +- smb4k/core/smb4kmounter.h | 3 +- smb4k/core/smb4knetworkitems.h | 8 +- smb4k/core/smb4kpasswordhandler.h | 5 +- smb4k/core/smb4kpreviewer.h | 3 +- smb4k/core/smb4kpreviewitem.h | 4 +- smb4k/core/smb4kprint.h | 5 +- smb4k/core/smb4kprintinfo.h | 4 +- smb4k/core/smb4ksambaoptionshandler.h | 3 +- smb4k/core/smb4ksambaoptionsinfo.h | 4 +- smb4k/core/smb4kscanner.h | 3 +- smb4k/core/smb4ksettings.kcfgc | 1 + smb4k/core/smb4kshare.h | 3 +- smb4k/core/smb4ksynchronizer.h | 5 +- smb4k/core/smb4tdefileio.h | 3 +- smb4k/core/smb4tdeglobal.h | 3 +- smb4k/dialogs/CMakeLists.txt | 23 ++++++ smb4k/dialogs/smb4kbookmarkeditor.h | 3 +- smb4k/dialogs/smb4kcustomoptionsdialog.h | 3 +- smb4k/dialogs/smb4kmountdialog.h | 3 +- smb4k/dialogs/smb4kpreviewdialog.h | 3 +- smb4k/dialogs/smb4kprintdialog.h | 3 +- smb4k/dialogs/smb4ksynchronizationdialog.h | 3 +- smb4k/icons/CMakeLists.txt | 1 + smb4k/iconview/CMakeLists.txt | 31 +++++++ smb4k/iconview/smb4ksharesiconview_part.cpp | 2 +- smb4k/listview/CMakeLists.txt | 31 +++++++ smb4k/listview/smb4kshareslistview_part.cpp | 2 +- smb4k/searchdlg/CMakeLists.txt | 21 +++++ smb4k/searchdlg/smb4ksearchdialog_part.cpp | 2 +- utilities/CMakeLists.txt | 40 +++++++++ 45 files changed, 518 insertions(+), 34 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 ConfigureChecks.cmake create mode 100644 config.h.cmake create mode 100644 plugin/CMakeLists.txt create mode 100644 po/CMakeLists.txt create mode 100644 smb4k/CMakeLists.txt create mode 100644 smb4k/browser/CMakeLists.txt create mode 100644 smb4k/configdlg/CMakeLists.txt create mode 100644 smb4k/core/CMakeLists.txt create mode 100644 smb4k/dialogs/CMakeLists.txt create mode 100644 smb4k/icons/CMakeLists.txt create mode 100644 smb4k/iconview/CMakeLists.txt create mode 100644 smb4k/listview/CMakeLists.txt create mode 100644 smb4k/searchdlg/CMakeLists.txt create mode 100644 utilities/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..dfc902a --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,90 @@ +############################################ +# +# (C) 2023 Michele Calgaro +# Michele (DOT) Calgaro (AT) yahoo.it +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +############################################ + + +cmake_minimum_required( VERSION 3.5 ) + + +#### general package setup + +project( smb4k ) + + +#### include essential cmake modules + +include( FindPkgConfig ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) +include( CheckTypeSize ) + + +#### include our cmake modules + +include( TDEMacros ) + + +##### set version number + +tde_set_project_version( ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) + +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +##### global compiler settings + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) + + +##### directories + +add_subdirectory( smb4k ) +add_subdirectory( plugin ) +add_subdirectory( utilities ) + + +##### other data ################################ + +tde_conditional_add_project_docs( BUILD_DOC ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..0b84648 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,26 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + + +# required stuff +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..61ede3a --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,8 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt new file mode 100644 index 0000000..f2b0ba6 --- /dev/null +++ b/plugin/CMakeLists.txt @@ -0,0 +1,30 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} +) + + +##### pluginloader + +tde_import( konqueror ) +tde_add_kpart( konqsidebar_smb4k AUTOMOC + SOURCES smb4k_konqplugin.cpp + LINK tdecore-shared tdeui-shared tdeio-shared tdeparts-shared konqsidebarplugin-shared smb4kcore-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +##### other files + +tde_create_translated_desktop( + SOURCE smb4k_add.desktop + DESTINATION ${DATA_INSTALL_DIR}/konqsidebartng/add +) diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..24e3bd8 --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1 @@ +tde_add_project_translations() diff --git a/smb4k/CMakeLists.txt b/smb4k/CMakeLists.txt new file mode 100644 index 0000000..83cec66 --- /dev/null +++ b/smb4k/CMakeLists.txt @@ -0,0 +1,46 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TDE_LIBRARY_DIRS} +) + + +##### subfolders + +add_subdirectory( core ) +add_subdirectory( dialogs ) +add_subdirectory( browser ) +add_subdirectory( configdlg ) +add_subdirectory( icons ) +add_subdirectory( iconview ) +add_subdirectory( listview ) +add_subdirectory( searchdlg ) + + +##### smb4k (executable) + +tde_add_executable( smb4k AUTOMOC + SOURCES main.cpp smb4k.cpp smb4ksystemtray.cpp + LINK + tdecore-shared tdeui-shared tdeio-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### other files + +tde_create_translated_desktop( + SOURCE smb4k.desktop + DESTINATION ${XDG_APPS_INSTALL_DIR} +) + +install( + FILES smb4k_shell.rc + DESTINATION ${DATA_INSTALL_DIR}/smb4k +) diff --git a/smb4k/browser/CMakeLists.txt b/smb4k/browser/CMakeLists.txt new file mode 100644 index 0000000..6be3161 --- /dev/null +++ b/smb4k/browser/CMakeLists.txt @@ -0,0 +1,31 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} +) + + +##### smb4knetworkbrowser (shared) + +tde_add_kpart( libsmb4knetworkbrowser AUTOMOC + SOURCES + smb4knetworkbrowser_part.cpp smb4knetworkbrowser.cpp + smb4knetworkbrowseritem.cpp smb4knetworkbrowsertooltip.cpp + LINK tdecore-shared tdeui-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +##### other files + +install( + FILES smb4knetworkbrowser_part.rc + DESTINATION ${DATA_INSTALL_DIR}/smb4knetworkbrowserpart +) diff --git a/smb4k/browser/smb4knetworkbrowser_part.cpp b/smb4k/browser/smb4knetworkbrowser_part.cpp index 856854e..b3d1662 100644 --- a/smb4k/browser/smb4knetworkbrowser_part.cpp +++ b/smb4k/browser/smb4knetworkbrowser_part.cpp @@ -1918,7 +1918,7 @@ TDEInstance *Smb4KNetworkBrowserPartFactory::instance() extern "C" { - void *init_libsmb4knetworkbrowser() + KDE_EXPORT void *init_libsmb4knetworkbrowser() { TDEGlobal::locale()->insertCatalogue( "smb4k" ); return new Smb4KNetworkBrowserPartFactory; diff --git a/smb4k/configdlg/CMakeLists.txt b/smb4k/configdlg/CMakeLists.txt new file mode 100644 index 0000000..09a9625 --- /dev/null +++ b/smb4k/configdlg/CMakeLists.txt @@ -0,0 +1,23 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} +) + + +##### smb4tdeconfigdialog (shared) + +tde_add_kpart( libsmb4tdeconfigdialog AUTOMOC + SOURCES + smb4kauthoptions.cpp smb4tdeconfigdialog.cpp smb4knetworkoptions.cpp smb4tdersyncoptions.cpp + smb4ksambaoptions.cpp smb4kshareoptions.cpp smb4ksuperuseroptions.cpp smb4kuserinterfaceoptions.cpp + LINK tdecore-shared tdeui-shared tdeio-shared smb4kcore-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/smb4k/configdlg/smb4tdeconfigdialog.cpp b/smb4k/configdlg/smb4tdeconfigdialog.cpp index eb2a694..f9aeef9 100644 --- a/smb4k/configdlg/smb4tdeconfigdialog.cpp +++ b/smb4k/configdlg/smb4tdeconfigdialog.cpp @@ -1212,7 +1212,7 @@ const TQStringList & ) extern "C" { - void *init_libsmb4tdeconfigdialog() + KDE_EXPORT void *init_libsmb4tdeconfigdialog() { TDEGlobal::locale()->insertCatalogue( "smb4k" ); return new Smb4TDEConfigDialogFactory; diff --git a/smb4k/core/CMakeLists.txt b/smb4k/core/CMakeLists.txt new file mode 100644 index 0000000..965af83 --- /dev/null +++ b/smb4k/core/CMakeLists.txt @@ -0,0 +1,49 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} +) + + +##### smb4kcore (shared) + +tde_add_library( smb4kcore SHARED AUTOMOC + SOURCES + smb4kauthinfo.cpp smb4kbookmark.cpp smb4kbookmarkhandler.cpp smb4kcore.cpp + smb4kerror.cpp smb4tdefileio.cpp smb4tdeglobal.cpp smb4kglobal_p.cpp + smb4khomesshareshandler.cpp smb4kmounter.cpp smb4kmounter_p.cpp + smb4knetworkitems.cpp smb4kpasswordhandler.cpp smb4kpreviewer.cpp + smb4kpreviewitem.cpp smb4kprint.cpp smb4kprintinfo.cpp smb4ksambaoptionshandler.cpp + smb4ksambaoptionsinfo.cpp smb4kscanner.cpp smb4kscanner_p.cpp smb4ksettings.kcfgc + smb4kshare.cpp smb4ksynchronizationinfo.cpp smb4ksynchronizer.cpp + LINK tdecore-shared tdeui-shared tdeio-shared tdewalletclient-shared + VERSION 2.0.0 + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### other files + +install( + FILES smb4k.kcfg + DESTINATION ${SHARE_INSTALL_PREFIX}/config.kcfg +) + +install( + FILES + smb4kauthinfo.h smb4kbookmark.h smb4kbookmarkhandler.h + smb4kcore.h smb4kdefs.h smb4kerror.h smb4tdefileio.h smb4tdeglobal.h + smb4khomesshareshandler.h smb4kmounter.h smb4knetworkitems.h + smb4kpasswordhandler.h smb4kpreviewer.h smb4kpreviewitem.h + smb4kprint.h smb4kprintinfo.h smb4ksambaoptionshandler.h + smb4ksambaoptionsinfo.h smb4kscanner.h smb4kshare.h + smb4ksynchronizationinfo.h smb4ksynchronizer.h + DESTINATION ${INCLUDE_INSTALL_DIR} +) diff --git a/smb4k/core/smb4kauthinfo.h b/smb4k/core/smb4kauthinfo.h index dd0f05c..3323db0 100644 --- a/smb4k/core/smb4kauthinfo.h +++ b/smb4k/core/smb4kauthinfo.h @@ -31,6 +31,8 @@ #include #include +#include + /** * This class provides a container for the authentication data. * @@ -38,7 +40,7 @@ */ -class Smb4KAuthInfo +class KDE_EXPORT Smb4KAuthInfo { public: /** diff --git a/smb4k/core/smb4kbookmark.h b/smb4k/core/smb4kbookmark.h index a4d3753..536862c 100644 --- a/smb4k/core/smb4kbookmark.h +++ b/smb4k/core/smb4kbookmark.h @@ -31,6 +31,8 @@ // TQt includes #include +#include + // forward declarations class Smb4KShareItem; @@ -38,7 +40,7 @@ class Smb4KShareItem; * This class is a container for a set bookmark on a samba share */ -class Smb4KBookmark +class KDE_EXPORT Smb4KBookmark { public: /** diff --git a/smb4k/core/smb4kbookmarkhandler.h b/smb4k/core/smb4kbookmarkhandler.h index fdda735..0e33b49 100644 --- a/smb4k/core/smb4kbookmarkhandler.h +++ b/smb4k/core/smb4kbookmarkhandler.h @@ -34,6 +34,8 @@ #include #include +#include + // forward declarations class Smb4KHostItem; class Smb4KBookmark; @@ -46,7 +48,7 @@ class Smb4KBookmark; * @author Alexander Reinholdt */ -class Smb4KBookmarkHandler : public TQObject +class KDE_EXPORT Smb4KBookmarkHandler : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4kcore.h b/smb4k/core/smb4kcore.h index ddaa3ba..f3faea7 100644 --- a/smb4k/core/smb4kcore.h +++ b/smb4k/core/smb4kcore.h @@ -36,6 +36,8 @@ #include #include +#include + // application specific includes #include "smb4kscanner.h" #include "smb4kmounter.h" @@ -57,7 +59,7 @@ class Smb4KShare; * @author Alexander Reinholdt */ -class Smb4KCore : public TQObject +class KDE_EXPORT Smb4KCore : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4kmounter.h b/smb4k/core/smb4kmounter.h index 84d04d6..1652405 100644 --- a/smb4k/core/smb4kmounter.h +++ b/smb4k/core/smb4kmounter.h @@ -37,6 +37,7 @@ #include // KDE includes +#include #include // application specific includes @@ -56,7 +57,7 @@ class Smb4KShare; * @author Alexander Reinholdt */ -class Smb4KMounter : public TQObject +class KDE_EXPORT Smb4KMounter : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4knetworkitems.h b/smb4k/core/smb4knetworkitems.h index 963093f..6b017ad 100644 --- a/smb4k/core/smb4knetworkitems.h +++ b/smb4k/core/smb4knetworkitems.h @@ -35,12 +35,14 @@ #include #include +#include + /** * This class provides a container for a workgroup/domain found in the network * neighborhood. */ -class Smb4KWorkgroupItem +class KDE_EXPORT Smb4KWorkgroupItem { public: /** @@ -158,7 +160,7 @@ class Smb4KWorkgroupItem * neighborhood. */ -class Smb4KHostItem +class KDE_EXPORT Smb4KHostItem { public: /** @@ -361,7 +363,7 @@ class Smb4KHostItem * network neighborhood. */ -class Smb4KShareItem +class KDE_EXPORT Smb4KShareItem { public: /** diff --git a/smb4k/core/smb4kpasswordhandler.h b/smb4k/core/smb4kpasswordhandler.h index cb0a3be..997087d 100644 --- a/smb4k/core/smb4kpasswordhandler.h +++ b/smb4k/core/smb4kpasswordhandler.h @@ -35,9 +35,10 @@ #include // KDE includes -#include +#include #include #include +#include // forward declarations #ifndef __FreeBSD__ @@ -60,7 +61,7 @@ class Smb4KAuthInfo; * @author Alexander Reinholdt */ -class Smb4KPasswordHandler : public TQObject +class KDE_EXPORT Smb4KPasswordHandler : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4kpreviewer.h b/smb4k/core/smb4kpreviewer.h index b9579b6..72e75c6 100644 --- a/smb4k/core/smb4kpreviewer.h +++ b/smb4k/core/smb4kpreviewer.h @@ -36,6 +36,7 @@ #include // KDE includes +#include #include // forward declarations @@ -48,7 +49,7 @@ class Smb4KPreviewItem; * @author Alexander Reinholdt */ -class Smb4KPreviewer : public TQObject +class KDE_EXPORT Smb4KPreviewer : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4kpreviewitem.h b/smb4k/core/smb4kpreviewitem.h index 2ef4f72..45b1e88 100644 --- a/smb4k/core/smb4kpreviewitem.h +++ b/smb4k/core/smb4kpreviewitem.h @@ -35,6 +35,8 @@ #include #include +#include + // application specific includes #include "smb4knetworkitems.h" @@ -47,7 +49,7 @@ typedef TQPair ContentsItem; * @author Alexander Reinholdt */ -class Smb4KPreviewItem +class KDE_EXPORT Smb4KPreviewItem { public: /** diff --git a/smb4k/core/smb4kprint.h b/smb4k/core/smb4kprint.h index 67dec73..c4ef162 100644 --- a/smb4k/core/smb4kprint.h +++ b/smb4k/core/smb4kprint.h @@ -36,8 +36,9 @@ #include // KDE includes -#include +#include #include +#include // forward declarations class Smb4KPrintInfo; @@ -52,7 +53,7 @@ class Smb4KPrintInfo; * @author Alexander Reinholdt */ -class Smb4KPrint : public TQObject +class KDE_EXPORT Smb4KPrint : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4kprintinfo.h b/smb4k/core/smb4kprintinfo.h index d9ccabb..89bf753 100644 --- a/smb4k/core/smb4kprintinfo.h +++ b/smb4k/core/smb4kprintinfo.h @@ -33,6 +33,8 @@ // TQt includes #include +#include + // application specific includes #include "smb4knetworkitems.h" @@ -41,7 +43,7 @@ * that is needed to print a file. */ -class Smb4KPrintInfo +class KDE_EXPORT Smb4KPrintInfo { public: /** diff --git a/smb4k/core/smb4ksambaoptionshandler.h b/smb4k/core/smb4ksambaoptionshandler.h index ab41bed..b6b72b4 100644 --- a/smb4k/core/smb4ksambaoptionshandler.h +++ b/smb4k/core/smb4ksambaoptionshandler.h @@ -35,6 +35,7 @@ #include // KDE includes +#include #include // forward declarations @@ -49,7 +50,7 @@ class Smb4KShare; * @author Alexander Reinholdt */ -class Smb4KSambaOptionsHandler : public TQObject +class KDE_EXPORT Smb4KSambaOptionsHandler : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4ksambaoptionsinfo.h b/smb4k/core/smb4ksambaoptionsinfo.h index 800cc84..80e141f 100644 --- a/smb4k/core/smb4ksambaoptionsinfo.h +++ b/smb4k/core/smb4ksambaoptionsinfo.h @@ -34,6 +34,8 @@ // TQt includes #include +#include + // forward declarations class Smb4KShare; @@ -45,7 +47,7 @@ class Smb4KShare; * @author Alexander Reinholdt */ -class Smb4KSambaOptionsInfo +class KDE_EXPORT Smb4KSambaOptionsInfo { public: /** diff --git a/smb4k/core/smb4kscanner.h b/smb4k/core/smb4kscanner.h index 5367930..24807f3 100644 --- a/smb4k/core/smb4kscanner.h +++ b/smb4k/core/smb4kscanner.h @@ -36,6 +36,7 @@ #include // KDE includes +#include #include // application specific includes @@ -55,7 +56,7 @@ class Smb4KShareItem; * @author Alexander Reinholdt */ -class Smb4KScanner : public TQObject +class KDE_EXPORT Smb4KScanner : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4ksettings.kcfgc b/smb4k/core/smb4ksettings.kcfgc index c103aec..05fce7c 100644 --- a/smb4k/core/smb4ksettings.kcfgc +++ b/smb4k/core/smb4ksettings.kcfgc @@ -4,3 +4,4 @@ Singleton=true Mutators=true ItemAccessors=true SetUserTexts=true +Visibility=KDE_EXPORT diff --git a/smb4k/core/smb4kshare.h b/smb4k/core/smb4kshare.h index 2c8ee5b..4bc51be 100644 --- a/smb4k/core/smb4kshare.h +++ b/smb4k/core/smb4kshare.h @@ -38,6 +38,7 @@ #include // KDE includes +#include #include @@ -50,7 +51,7 @@ * @author Alexander Reinholdt */ -class Smb4KShare +class KDE_EXPORT Smb4KShare { public: /** diff --git a/smb4k/core/smb4ksynchronizer.h b/smb4k/core/smb4ksynchronizer.h index a40e613..ea55e87 100644 --- a/smb4k/core/smb4ksynchronizer.h +++ b/smb4k/core/smb4ksynchronizer.h @@ -31,8 +31,9 @@ #endif // KDE includes -#include +#include #include +#include // TQt includes #include @@ -51,7 +52,7 @@ class Smb4KSynchronizationInfo; */ -class Smb4KSynchronizer : public TQObject +class KDE_EXPORT Smb4KSynchronizer : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4tdefileio.h b/smb4k/core/smb4tdefileio.h index c5afaa3..7c93a59 100644 --- a/smb4k/core/smb4tdefileio.h +++ b/smb4k/core/smb4tdefileio.h @@ -36,6 +36,7 @@ #include // KDE include +#include #include @@ -46,7 +47,7 @@ * @author Alexander Reinholdt */ -class Smb4KFileIO : public TQObject +class KDE_EXPORT Smb4KFileIO : public TQObject { TQ_OBJECT diff --git a/smb4k/core/smb4tdeglobal.h b/smb4k/core/smb4tdeglobal.h index b173d1b..dd5dbe1 100644 --- a/smb4k/core/smb4tdeglobal.h +++ b/smb4k/core/smb4tdeglobal.h @@ -29,6 +29,7 @@ #include #include +#include #include // forward declarations: @@ -42,7 +43,7 @@ class Smb4KHomesSharesHandler; * @author Alexander Reinholdt */ -namespace Smb4TDEGlobal +namespace KDE_EXPORT Smb4TDEGlobal { /** * This returns the pointer to the global timer for the application. diff --git a/smb4k/dialogs/CMakeLists.txt b/smb4k/dialogs/CMakeLists.txt new file mode 100644 index 0000000..14362d6 --- /dev/null +++ b/smb4k/dialogs/CMakeLists.txt @@ -0,0 +1,23 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} +) + + +##### smb4kdialogs (shared) + +tde_add_library( smb4kdialogs SHARED AUTOMOC + SOURCES + smb4kbookmarkeditor.cpp smb4kcustomoptionsdialog.cpp smb4kmountdialog.cpp + smb4kpreviewdialog.cpp smb4kprintdialog.cpp smb4ksynchronizationdialog.cpp + LINK tdecore-shared tdeui-shared smb4kcore-shared + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/smb4k/dialogs/smb4kbookmarkeditor.h b/smb4k/dialogs/smb4kbookmarkeditor.h index e4a2415..6927154 100644 --- a/smb4k/dialogs/smb4kbookmarkeditor.h +++ b/smb4k/dialogs/smb4kbookmarkeditor.h @@ -31,6 +31,7 @@ #endif // KDE includes +#include #include #include #include @@ -41,7 +42,7 @@ * @author Alexander Reinholdt */ -class Smb4KBookmarkEditor : public KDialogBase +class KDE_EXPORT Smb4KBookmarkEditor : public KDialogBase { TQ_OBJECT diff --git a/smb4k/dialogs/smb4kcustomoptionsdialog.h b/smb4k/dialogs/smb4kcustomoptionsdialog.h index 59ede12..dbe0529 100644 --- a/smb4k/dialogs/smb4kcustomoptionsdialog.h +++ b/smb4k/dialogs/smb4kcustomoptionsdialog.h @@ -35,6 +35,7 @@ #include // KDE includes +#include #include #include #include @@ -44,7 +45,7 @@ class Smb4KHostItem; class Smb4KShareItem; -class Smb4KCustomOptionsDialog : public KDialogBase +class KDE_EXPORT Smb4KCustomOptionsDialog : public KDialogBase { TQ_OBJECT diff --git a/smb4k/dialogs/smb4kmountdialog.h b/smb4k/dialogs/smb4kmountdialog.h index 691bb4a..24adb50 100644 --- a/smb4k/dialogs/smb4kmountdialog.h +++ b/smb4k/dialogs/smb4kmountdialog.h @@ -35,6 +35,7 @@ #include // KDE includes +#include #include #include @@ -44,7 +45,7 @@ * @author Alexander Reinholdt */ -class Smb4KMountDialog : public KDialogBase +class KDE_EXPORT Smb4KMountDialog : public KDialogBase { TQ_OBJECT diff --git a/smb4k/dialogs/smb4kpreviewdialog.h b/smb4k/dialogs/smb4kpreviewdialog.h index 7f18054..f4ea96f 100644 --- a/smb4k/dialogs/smb4kpreviewdialog.h +++ b/smb4k/dialogs/smb4kpreviewdialog.h @@ -34,6 +34,7 @@ #include // KDE includes +#include #include #include #include @@ -52,7 +53,7 @@ class Smb4KShareItem; * @author Alexander Reinholdt */ -class Smb4KPreviewDialog : public KDialogBase +class KDE_EXPORT Smb4KPreviewDialog : public KDialogBase { TQ_OBJECT diff --git a/smb4k/dialogs/smb4kprintdialog.h b/smb4k/dialogs/smb4kprintdialog.h index 126dd8c..523513c 100644 --- a/smb4k/dialogs/smb4kprintdialog.h +++ b/smb4k/dialogs/smb4kprintdialog.h @@ -34,6 +34,7 @@ #include // KDE includes +#include #include // forward declarations @@ -48,7 +49,7 @@ class Smb4KShareItem; * @author Alexander Reinholdt */ -class Smb4KPrintDialog : public KDialogBase +class KDE_EXPORT Smb4KPrintDialog : public KDialogBase { TQ_OBJECT diff --git a/smb4k/dialogs/smb4ksynchronizationdialog.h b/smb4k/dialogs/smb4ksynchronizationdialog.h index a050c4a..78cefcb 100644 --- a/smb4k/dialogs/smb4ksynchronizationdialog.h +++ b/smb4k/dialogs/smb4ksynchronizationdialog.h @@ -31,6 +31,7 @@ #endif // KDE includes +#include #include #include @@ -46,7 +47,7 @@ class Smb4KSynchronizationInfo; * @author Alexander Reinholdt */ -class Smb4KSynchronizationDialog : public KDialogBase +class KDE_EXPORT Smb4KSynchronizationDialog : public KDialogBase { TQ_OBJECT diff --git a/smb4k/icons/CMakeLists.txt b/smb4k/icons/CMakeLists.txt new file mode 100644 index 0000000..92042ee --- /dev/null +++ b/smb4k/icons/CMakeLists.txt @@ -0,0 +1 @@ +tde_install_icons( ${PROJECT_NAME} ) diff --git a/smb4k/iconview/CMakeLists.txt b/smb4k/iconview/CMakeLists.txt new file mode 100644 index 0000000..9f2a047 --- /dev/null +++ b/smb4k/iconview/CMakeLists.txt @@ -0,0 +1,31 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} +) + + +##### smb4ksharesiconview (shared) + +tde_add_kpart( libsmb4ksharesiconview AUTOMOC + SOURCES + smb4ksharesiconview.cpp smb4ksharesiconview_part.cpp + smb4ksharesiconviewitem.cpp smb4ksharesiconviewtooltip.cpp + LINK tdecore-shared tdeui-shared tdeio-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +##### other files + +install( + FILES smb4ksharesiconview_part.rc + DESTINATION ${DATA_INSTALL_DIR}/smb4ksharesiconviewpart +) diff --git a/smb4k/iconview/smb4ksharesiconview_part.cpp b/smb4k/iconview/smb4ksharesiconview_part.cpp index 32f8695..c271862 100644 --- a/smb4k/iconview/smb4ksharesiconview_part.cpp +++ b/smb4k/iconview/smb4ksharesiconview_part.cpp @@ -562,7 +562,7 @@ TDEInstance *Smb4KSharesIconViewPartFactory::instance() extern "C" { - void *init_libsmb4ksharesiconview() + KDE_EXPORT void *init_libsmb4ksharesiconview() { TDEGlobal::locale()->insertCatalogue( "smb4k" ); return new Smb4KSharesIconViewPartFactory; diff --git a/smb4k/listview/CMakeLists.txt b/smb4k/listview/CMakeLists.txt new file mode 100644 index 0000000..c77d061 --- /dev/null +++ b/smb4k/listview/CMakeLists.txt @@ -0,0 +1,31 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} +) + + +##### smb4kdialogs (shared) + +tde_add_kpart( libsmb4kshareslistview AUTOMOC + SOURCES + smb4kshareslistview.cpp smb4kshareslistview_part.cpp + smb4kshareslistviewitem.cpp smb4kshareslistviewtooltip.cpp + LINK tdecore-shared tdeui-shared tdeio-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +##### other files + +install( + FILES smb4kshareslistview_part.rc + DESTINATION ${DATA_INSTALL_DIR}/smb4kshareslistviewpart +) diff --git a/smb4k/listview/smb4kshareslistview_part.cpp b/smb4k/listview/smb4kshareslistview_part.cpp index 7fc9a98..62f89ea 100644 --- a/smb4k/listview/smb4kshareslistview_part.cpp +++ b/smb4k/listview/smb4kshareslistview_part.cpp @@ -689,7 +689,7 @@ TDEInstance *Smb4KSharesListViewPartFactory::instance() extern "C" { - void *init_libsmb4kshareslistview() + KDE_EXPORT void *init_libsmb4kshareslistview() { TDEGlobal::locale()->insertCatalogue( "smb4k" ); return new Smb4KSharesListViewPartFactory; diff --git a/smb4k/searchdlg/CMakeLists.txt b/smb4k/searchdlg/CMakeLists.txt new file mode 100644 index 0000000..e88d4ce --- /dev/null +++ b/smb4k/searchdlg/CMakeLists.txt @@ -0,0 +1,21 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} +) + + +##### smb4ksearchdialog (shared) + +tde_add_kpart( libsmb4ksearchdialog AUTOMOC + SOURCES smb4ksearchdialog.cpp smb4ksearchdialog_part.cpp smb4ksearchdialogitem.cpp + LINK tdecore-shared tdeui-shared tdeparts-shared smb4kcore-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/smb4k/searchdlg/smb4ksearchdialog_part.cpp b/smb4k/searchdlg/smb4ksearchdialog_part.cpp index afabfd1..75c76e9 100644 --- a/smb4k/searchdlg/smb4ksearchdialog_part.cpp +++ b/smb4k/searchdlg/smb4ksearchdialog_part.cpp @@ -267,7 +267,7 @@ TDEInstance *Smb4KSearchDialogPartFactory::instance() extern "C" { - void *init_libsmb4ksearchdialog() + KDE_EXPORT void *init_libsmb4ksearchdialog() { TDEGlobal::locale()->insertCatalogue( "smb4k" ); return new Smb4KSearchDialogPartFactory; diff --git a/utilities/CMakeLists.txt b/utilities/CMakeLists.txt new file mode 100644 index 0000000..4d5711b --- /dev/null +++ b/utilities/CMakeLists.txt @@ -0,0 +1,40 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} +) + + +##### (executable) + +tde_add_executable( smb4k_mount AUTOMOC + SOURCES smb4k_mount.cpp + DESTINATION ${BIN_INSTALL_DIR} +) + +tde_add_executable( smb4k_umount AUTOMOC + SOURCES smb4k_umount.cpp + DESTINATION ${BIN_INSTALL_DIR} +) + +tde_add_executable( smb4k_kill AUTOMOC + SOURCES smb4k_kill.cpp + DESTINATION ${BIN_INSTALL_DIR} +) + +tde_add_executable( smb4k_cat AUTOMOC + SOURCES smb4k_cat.cpp + DESTINATION ${BIN_INSTALL_DIR} +) + +tde_add_executable( smb4k_mv AUTOMOC + SOURCES smb4k_mv.cpp + DESTINATION ${BIN_INSTALL_DIR} +)