]> granicus.if.org Git - fortune-mod/commitdiff
try to fix crosscompiling builds
authorShlomi Fish <shlomif@shlomifish.org>
Tue, 14 Dec 2021 08:42:01 +0000 (10:42 +0200)
committerShlomi Fish <shlomif@shlomifish.org>
Tue, 14 Dec 2021 08:42:01 +0000 (10:42 +0200)
See: https://github.com/shlomif/fortune-mod/issues/58

add sanity check
Thanks to https://github.com/leleliu008

fortune-mod/datfiles/CMakeLists.txt
fortune-mod/util/rot.pl

index f2b0cc07bd74770881e73ecbb65a01a5a1f5d9ea..52cbfc2673b0ae9ff750bb1e2b548db5c552fab0 100644 (file)
@@ -1,6 +1,10 @@
 # See: https://github.com/shlomif/fortune-mod/issues/58
 if ("${IS_CROSS}")
     SET (_strfile  "strfile")
+    find_program(_found "${_strfile}")
+    if (NOT "${_found}")
+        MESSAGE(FATAL_ERROR "\"strfile\" must be in the executables' path for cross-compiling builds. You can get it from a native install of fortune-mod: https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them . Also see https://github.com/shlomif/fortune-mod/issues/58 .")
+    endif()
 else()
     SET (_strfile  "${CMAKE_CURRENT_BINARY_DIR}/../strfile")
 endif()
index 5331520422211029bda18f4016b6eb81ba48c1a9..6ec74a0e838211774e6e536a8da46631c64c11fa 100644 (file)
@@ -2,8 +2,10 @@
 #
 # Short description for rot.pl
 #
-# rot13 for cross compiling builds:
+# rot13 fallback for cross compiling builds:
+#
 # https://github.com/shlomif/fortune-mod/issues/58
+#
 # Version 0.0.1
 # Copyright (C) 2021 Shlomi Fish < https://www.shlomifish.org/ >
 #