1 # See: https://github.com/shlomif/fortune-mod/issues/58
3 SET (_strfile "strfile")
4 find_program(_found "${_strfile}")
6 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 .")
9 SET (_strfile "${CMAKE_CURRENT_BINARY_DIR}/../strfile")
12 SET (_install_unrot_cookies )
15 SET(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${c}")
17 SET(PATH_PERL ${PERL_EXECUTABLE})
22 "my (\$src, \$dest) = @ARGV; use File::Copy; copy(\$src, \$dest);"
31 ARGS "${SOURCE}" "${DEST}"
32 DEPENDS "${SOURCE}" "${_strfile}"
39 COMMAND ${CMAKE_COMMAND} -E copy "${SOURCE}" "${LINK}"
45 ARGS "-sf" "${c}" "${LINK}"
49 SET(_targets_on_build_stage_for_avoiding_broken_symlinks_which_regenerate "${c}")
50 LIST(APPEND _unrot_cookies ${_targets_on_build_stage_for_avoiding_broken_symlinks_which_regenerate} "${DEST}" "${LINK}")
51 LIST(APPEND _install_unrot_cookies "${c}" "${CMAKE_CURRENT_BINARY_DIR}/${DEST}" "${CMAKE_CURRENT_BINARY_DIR}/${LINK}")
57 DEPENDS ${_unrot_cookies}
60 FILES ${_install_unrot_cookies}
61 DESTINATION "${LOCALDIR}"
65 ADD_SUBDIRECTORY("off")