summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-01-25 22:08:40 +0100
committerSlávek Banko <slavek.banko@axis.cz>2021-01-27 18:18:25 +0100
commit07d616b7e20de3282bad26ac303503bf86955ffe (patch)
tree5faab7f443c4a47b96b0388265f96856f4aabe5a
parent9575c4d686f29ecb6b6df32de6d345f5be047470 (diff)
downloadtdetoys-07d616b7.tar.gz
tdetoys-07d616b7.zip
Generate kweather station information files during the build phase
instead of the configuration phase. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--kweather/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/kweather/CMakeLists.txt b/kweather/CMakeLists.txt
index 075266b..6b28670 100644
--- a/kweather/CMakeLists.txt
+++ b/kweather/CMakeLists.txt
@@ -51,11 +51,14 @@ if( NOT PERL_EXECUTABLE )
include( FindPerl )
endif( )
-execute_process(
+add_custom_command(
+ OUTPUT stations.dat weather_stations.desktop
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
+ DEPENDS
+ data/nsd_cccc.txt data/station_names.txt weather_stations.desktop.in
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)