summaryrefslogtreecommitdiffstats
path: root/kweather
diff options
context:
space:
mode:
Diffstat (limited to 'kweather')
-rw-r--r--kweather/CMakeLists.txt139
-rw-r--r--kweather/graphics/CMakeLists.txt26
-rw-r--r--kweather/metar_parser.cpp2
-rw-r--r--kweather/weatherlib.cpp3
4 files changed, 170 insertions, 0 deletions
diff --git a/kweather/CMakeLists.txt b/kweather/CMakeLists.txt
new file mode 100644
index 0000000..a63f788
--- /dev/null
+++ b/kweather/CMakeLists.txt
@@ -0,0 +1,139 @@
+#################################################
+#
+# (C) 2012 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( graphics )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### kweatherreport (tdeinit) ##################
+
+tde_add_tdeinit_executable( kweatherreport AUTOMOC
+ SOURCES reportmain.cpp weatherservice.stub
+ reportview.cpp
+ LINK tdeui-shared khtml-shared
+)
+
+
+##### kweatherservice (executable) ##############
+
+tde_add_executable( kweatherservice AUTOMOC
+ SOURCES main.cpp metar_parser.cpp
+ weatherlib.cpp weatherservice.cpp
+ weatherservice.skel stationdatabase.cpp
+ sun.cpp weatherservice.stub
+ LINK kio-shared
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### sun_test (test) ###########################
+# FIXME: add correct test targets support
+#
+# tde_add_executable( sun_test AUTOMOC
+# SOURCES sun_test.cpp sun.cpp
+# )
+#
+# add_test( NAME sun_test-test
+# COMMAND sun_test)
+#
+#
+##### stationdatabase_test (test) ###############
+#
+# tde_add_executable( stationdatabase_test AUTOMOC
+# SOURCES stationdatabase_test.cpp
+# stationdatabase.cpp
+# )
+#
+# add_test( NAME stationdatabase_test-test
+# COMMAND stationdatabase_test)
+#
+#
+##### metar_parser_test (test) ##################
+#
+# tde_add_executable( metar_parser_test AUTOMOC
+# SOURCES metar_parser_test.cpp metar_parser.cpp
+# stationdatabase.cpp sun.cpp
+# )
+#
+# add_test( NAME metar_parser_test-test
+# COMMAND metar_parser_test)
+#
+
+##### weather_panelapplet (kpart) ###############
+
+tde_add_kpart( weather_panelapplet AUTOMOC
+ SOURCES reportview.cpp kweather.cpp
+ dockwidget.cpp weatherIface.skel
+ weatherservice.stub weatherbutton.cpp
+ LINK khtml-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### kcm_weather (kpart) #######################
+
+tde_add_kpart( kcm_weather AUTOMOC
+ SOURCES kcmweather.cpp prefdialogdata.ui
+ weatherservice.stub
+ LINK kio-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### kcm_weatherservice (kpart) ################
+
+tde_add_kpart( kcm_weatherservice AUTOMOC
+ SOURCES kcmweatherservice.cpp
+ serviceconfigwidget.cpp serviceconfigdata.ui
+ weatherservice.stub
+ LINK tdeui-shared khtml-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### icons #####################################
+
+tde_install_icons( kweather )
+
+
+##### other data ################################
+
+install( FILES weather_stations.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/kweatherservice
+)
+
+install( FILES stations.dat
+ DESTINATION ${DATA_INSTALL_DIR}/kweatherservice
+)
+
+install( FILES kweather.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/kicker/applets
+)
+
+install(
+ FILES
+ kweatherservice.desktop
+ kcmweather.desktop
+ kcmweatherservice.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+)
+
diff --git a/kweather/graphics/CMakeLists.txt b/kweather/graphics/CMakeLists.txt
new file mode 100644
index 0000000..c7d04bd
--- /dev/null
+++ b/kweather/graphics/CMakeLists.txt
@@ -0,0 +1,26 @@
+#################################################
+#
+# (C) 2012 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES overcast.png sunny.png dunno.png
+ cloudy1.png cloudy2.png cloudy3.png cloudy4.png
+ cloudy5.png fog.png hail.png light_rain.png
+ mist.png shower1.png shower2.png shower3.png
+ sleet.png snow1.png snow2.png snow3.png
+ snow4.png snow5.png tstorm1.png tstorm2.png
+ tstorm3.png cloudy1_night.png cloudy2_night.png
+ cloudy3_night.png cloudy4_night.png
+ fog_night.png mist_night.png shower1_night.png
+ shower2_night.png snow1_night.png
+ snow2_night.png snow3_night.png sunny_night.png
+ tstorm1_night.png tstorm2_night.png
+ DESTINATION ${DATA_INSTALL_DIR}/kweather
+)
+
diff --git a/kweather/metar_parser.cpp b/kweather/metar_parser.cpp
index b6715f0..b576f60 100644
--- a/kweather/metar_parser.cpp
+++ b/kweather/metar_parser.cpp
@@ -18,7 +18,9 @@ email : jratke@comcast.net
* *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif // HAVE_CONFIG_H
#include <tqdatetime.h>
#include <kdebug.h>
diff --git a/kweather/weatherlib.cpp b/kweather/weatherlib.cpp
index 59a10dc..d8b93db 100644
--- a/kweather/weatherlib.cpp
+++ b/kweather/weatherlib.cpp
@@ -15,7 +15,10 @@ email : geiseri@msoe.edu
* *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif // HAVE_CONFIG_H
+
#include <tqfile.h>
#include <tqdatetime.h>
#include <tqtextstream.h>