summaryrefslogtreecommitdiffstats
path: root/libkholidays/CMakeLists.txt
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-08-19 22:14:02 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-08-20 10:14:23 +0900
commitb45508efc36b7e4c920360b10168c24a94398340 (patch)
tree11f5cd9a4e48cbe4962eed561c0002f65414e76e /libkholidays/CMakeLists.txt
parent1be574fd138d97526b48fd202454d10f2f1e8c94 (diff)
downloadtdepim-b45508efc36b7e4c920360b10168c24a94398340.tar.gz
tdepim-b45508efc36b7e4c920360b10168c24a94398340.zip
Generated parseholiday and scanholiday using bison/flex.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'libkholidays/CMakeLists.txt')
-rw-r--r--libkholidays/CMakeLists.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/libkholidays/CMakeLists.txt b/libkholidays/CMakeLists.txt
index 7bd4dc9ee..c4ef09f03 100644
--- a/libkholidays/CMakeLists.txt
+++ b/libkholidays/CMakeLists.txt
@@ -11,6 +11,8 @@
project( libkholidays )
+include( ConfigureChecks.cmake )
+
add_subdirectory( holidays )
include_directories(
@@ -27,12 +29,30 @@ link_directories(
##### kholidays (shared) ########################
+add_custom_command(
+ OUTPUT parseholiday.c parseholiday.h
+ COMMAND ${BISON_EXECUTABLE} -p kcal -d -o parseholiday.c ${CMAKE_CURRENT_SOURCE_DIR}/parseholiday.y
+)
+
+add_custom_command(
+ OUTPUT scanholiday.c
+ COMMAND ${FLEX_EXECUTABLE} -Pkcal -B -i -o scanholiday.c ${CMAKE_CURRENT_SOURCE_DIR}/scanholiday.lex
+)
+
+add_custom_target(
+ libkholiday_file_generation
+ DEPENDS
+ ${CMAKE_CURRENT_BINARY_DIR}/parseholiday.c
+ ${CMAKE_CURRENT_BINARY_DIR}/parseholiday.h
+ ${CMAKE_CURRENT_BINARY_DIR}/scanholiday.c
+)
tde_add_library( kholidays SHARED AUTOMOC
SOURCES
kholidays.cpp scanholiday.c parseholiday.h parseholiday.c lunarphase.cpp
VERSION 1.0.0
LINK tdecore-shared
+ DEPENDENCIES libkholiday_file_generation
DESTINATION ${LIB_INSTALL_DIR}
)