summaryrefslogtreecommitdiffstats
path: root/kweather/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'kweather/CMakeLists.txt')
-rw-r--r--kweather/CMakeLists.txt20
1 files changed, 18 insertions, 2 deletions
diff --git a/kweather/CMakeLists.txt b/kweather/CMakeLists.txt
index 1be2418..075266b 100644
--- a/kweather/CMakeLists.txt
+++ b/kweather/CMakeLists.txt
@@ -45,6 +45,21 @@ tde_add_executable( kweatherservice AUTOMOC
)
+##### generate stations.dat and weather_stations.desktop
+
+if( NOT PERL_EXECUTABLE )
+ include( FindPerl )
+endif( )
+
+execute_process(
+ COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genstations.pl
+ ${CMAKE_CURRENT_SOURCE_DIR}/data/nsd_cccc.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/data/station_names.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/weather_stations.desktop.in
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
##### sun_test (test) ###########################
# FIXME: add correct test targets support
#
@@ -118,13 +133,14 @@ tde_install_icons( kweather )
##### other data ################################
tde_create_translated_desktop(
- SOURCE weather_stations.desktop
+ SOURCE ${CMAKE_CURRENT_BINARY_DIR}/weather_stations.desktop
KEYWORDS name
DESTINATION ${DATA_INSTALL_DIR}/kweatherservice
PO_DIR kweather-stations
)
-install( FILES stations.dat
+install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/stations.dat
DESTINATION ${DATA_INSTALL_DIR}/kweatherservice
)