From 7d0a2d666521b05eb2a20668291eeddbcc7ff38b Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Thu, 21 Jul 2016 18:41:40 +0300 Subject: [PATCH] Build some of the cookies. --- fortune-mod/CMakeLists.txt | 2 + fortune-mod/datfiles/CMakeLists.txt | 59 +++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 fortune-mod/datfiles/CMakeLists.txt diff --git a/fortune-mod/CMakeLists.txt b/fortune-mod/CMakeLists.txt index 878f6f0..104bc92 100644 --- a/fortune-mod/CMakeLists.txt +++ b/fortune-mod/CMakeLists.txt @@ -120,3 +120,5 @@ ADD_DEFINITIONS("-DLOCOFFDIR=\"${LOCALODIR}\"") ADD_DEFINITIONS("-DLOCFORTDIR=\"${LOCALDIR}\"") ADD_DEFINITIONS("-DOFFDIR=\"${OCOOKIEDIR}\"") ADD_DEFINITIONS("-DFORTDIR=\"${COOKIEDIR}\"") + +ADD_SUBDIRECTORY("datfiles") diff --git a/fortune-mod/datfiles/CMakeLists.txt b/fortune-mod/datfiles/CMakeLists.txt new file mode 100644 index 0000000..70aba09 --- /dev/null +++ b/fortune-mod/datfiles/CMakeLists.txt @@ -0,0 +1,59 @@ +SET (COOKIES + art + ascii-art + computers + cookie + definitions + drugs + education + ethnic + food + fortunes + goedel + humorists + kids + law + linuxcookie + literature + love + magic + medicine + men-women + miscellaneous + news + people + pets + platitudes + politics + riddles + science + songs-poems + sports + startrek + translate-me + wisdom + work + linux + perl + knghtbrd + paradoxum + zippy + debian +) + +FOREACH(c ${COOKIES}) + SET(TARGET_NAME "cookie__${c}") + SET(DEST "${c}.dat") + SET(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${c}") + + ADD_CUSTOM_COMMAND( + OUTPUT "${DEST}" + COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../strfile" + ARGS "${SOURCE}" "${DEST}" + DEPENDS "${SOURCE}" + ) + ADD_CUSTOM_TARGET( + "${TARGET_NAME}" ALL + DEPENDS "${DEST}" + ) +ENDFOREACH() -- 2.50.1