]> granicus.if.org Git - fortune-mod/commitdiff
Build some of the cookies.
authorShlomi Fish <shlomif@shlomifish.org>
Thu, 21 Jul 2016 15:41:40 +0000 (18:41 +0300)
committerShlomi Fish <shlomif@shlomifish.org>
Thu, 21 Jul 2016 15:41:40 +0000 (18:41 +0300)
fortune-mod/CMakeLists.txt
fortune-mod/datfiles/CMakeLists.txt [new file with mode: 0644]

index 878f6f05a1bf55b46dbde8374fd9a452f4318ced..104bc922b1c44c1c4994a6f0b6b599d344560737 100644 (file)
@@ -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 (file)
index 0000000..70aba09
--- /dev/null
@@ -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()