summaryrefslogtreecommitdiffstats
path: root/src/plugins/infowidget
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-03-10 20:36:49 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-03-21 19:05:50 +0900
commit73da215882d7f96b6010fa99361c7cc10ec18bfb (patch)
treecea1a5016a94a9dac26cab8227e2513224288be3 /src/plugins/infowidget
parentbb099158e6c9fd0f1c2771cb9350d3b0a0b51a27 (diff)
downloadktorrent-73da2158.tar.gz
ktorrent-73da2158.zip
Conversion to cmake building system
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit bf204e931c605c73d761ec84943bb0cc94d7e7e4)
Diffstat (limited to 'src/plugins/infowidget')
-rw-r--r--src/plugins/infowidget/CMakeLists.txt54
-rw-r--r--src/plugins/infowidget/chunkbar.h3
-rw-r--r--src/plugins/infowidget/geoip/CMakeLists.txt17
-rw-r--r--src/plugins/infowidget/statustab.h3
4 files changed, 75 insertions, 2 deletions
diff --git a/src/plugins/infowidget/CMakeLists.txt b/src/plugins/infowidget/CMakeLists.txt
new file mode 100644
index 0000000..23ffe8e
--- /dev/null
+++ b/src/plugins/infowidget/CMakeLists.txt
@@ -0,0 +1,54 @@
+
+##### subfolders
+
+add_subdirectory( geoip )
+
+
+##### current folder
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/src/libktorrent
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### geoip library (system-wide or builtin)
+
+set( LIB_GEOIP "")
+if( WITH_SYSTEM_GEOIP )
+ set( LIB_GEOIP "${GEOIP_LIBRARIES}" )
+else( )
+ if( WITH_BUILTIN_GEOIP )
+ tde_add_library( geoip_builtin STATIC_PIC SOURCES GeoIP.c )
+ set( LIB_GEOIP "geoip_builtin-static")
+ endif( )
+endif( )
+
+##### ktinfowidgetplugin (kpart)
+
+tde_add_kpart( ktinfowidgetplugin AUTOMOC
+ SOURCES
+ infowidgetplugin.cpp availabilitychunkbar.cpp fileview.cpp floatspinbox.cpp
+ chunkbar.cpp chunkdownloadview.cpp downloadedchunkbar.cpp flagdb.cpp peerview.cpp
+ ktorrentmonitor.cpp iwfiletreediritem.cpp iwfiletreeitem.cpp infowidgetprefpage.cpp
+ infowidgetpluginsettings.kcfgc iwpref.ui trackerviewbase.ui trackerview.cpp
+ localefloatvalidator.cpp chunkdownloadviewbase.ui statustabbase.ui statustab.cpp
+ LINK
+ ${LIB_GEOIP} ktorrent-shared
+ tdecore-shared tdeui-shared tdeio-shared tdeparts-shared tdehtml-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### other files
+
+install(
+ FILES ktinfowidgetplugin.kcfg
+ DESTINATION ${KCFG_INSTALL_DIR}
+)
+
+tde_create_translated_desktop(
+ SOURCE ktinfowidgetplugin.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+)
diff --git a/src/plugins/infowidget/chunkbar.h b/src/plugins/infowidget/chunkbar.h
index 593acfe..361f854 100644
--- a/src/plugins/infowidget/chunkbar.h
+++ b/src/plugins/infowidget/chunkbar.h
@@ -24,6 +24,7 @@
#include <tqlabel.h>
#include <util/bitset.h>
#include <tqpixmap.h>
+#include <libktorrent_export.h>
class TQPainter;
@@ -47,7 +48,7 @@ namespace kt
* BitSets can represent which chunks are downloaded, which chunks are available
* and which chunks are excluded.
*/
- class ChunkBar : public TQFrame
+ class LIBKTORRENT_EXPORT ChunkBar : public TQFrame
{
TQ_OBJECT
diff --git a/src/plugins/infowidget/geoip/CMakeLists.txt b/src/plugins/infowidget/geoip/CMakeLists.txt
new file mode 100644
index 0000000..b11354d
--- /dev/null
+++ b/src/plugins/infowidget/geoip/CMakeLists.txt
@@ -0,0 +1,17 @@
+
+##### icon files
+
+if( WITH_BUILTIN_FLAGS )
+ file(GLOB _pics "${CMAKE_CURRENT_SOURCE_DIR}/*.png" )
+ install(
+ FILES ${_pics}
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/geoip
+ )
+endif( )
+
+if( WITH_BUILTIN_GEOIP )
+ install(
+ FILES geoip.dat GeoIP-LICENSE.txt
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/geoip
+ )
+endif( )
diff --git a/src/plugins/infowidget/statustab.h b/src/plugins/infowidget/statustab.h
index d044011..1a7d7ac 100644
--- a/src/plugins/infowidget/statustab.h
+++ b/src/plugins/infowidget/statustab.h
@@ -22,12 +22,13 @@
#define STATUSTAB_H
#include "statustabbase.h"
+#include <libktorrent_export.h>
namespace kt
{
class TorrentInterface;
- class StatusTab : public StatusTabBase
+ class LIBKTORRENT_EXPORT StatusTab : public StatusTabBase
{
TQ_OBJECT