From 10aa686d04cb8707dfa93d8e069e5055c5f459db Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Sun, 9 Jun 2019 00:56:42 +0300 Subject: [PATCH] win32 porting --- fortune-mod/datfiles/CMakeLists.txt | 7 +++++++ fortune-mod/datfiles/off/CMakeLists.txt | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/fortune-mod/datfiles/CMakeLists.txt b/fortune-mod/datfiles/CMakeLists.txt index ea3b65e..c8aeb39 100644 --- a/fortune-mod/datfiles/CMakeLists.txt +++ b/fortune-mod/datfiles/CMakeLists.txt @@ -23,11 +23,18 @@ FOREACH(c ${COOKIES}) ) SET(LINK "${c}.u8") + if (WIN32) + ADD_CUSTOM_COMMAND( + OUTPUT "${LINK}" + COMMAND ${CMAKE_COMMAND} -E copy "${c}" "${LINK}" + ) + else() ADD_CUSTOM_COMMAND( OUTPUT "${LINK}" COMMAND "ln" ARGS "-sf" "${c}" "${LINK}" ) + endif() ADD_CUSTOM_TARGET( "${TARGET_NAME}" ALL diff --git a/fortune-mod/datfiles/off/CMakeLists.txt b/fortune-mod/datfiles/off/CMakeLists.txt index 9bd2d5f..f994203 100644 --- a/fortune-mod/datfiles/off/CMakeLists.txt +++ b/fortune-mod/datfiles/off/CMakeLists.txt @@ -24,6 +24,12 @@ FOREACH(c ${OFFENSIVE_COOKIES}) SET(LINK "${c}.u8") SET(rot_LINK "${rot_dir}/${LINK}") + if (WIN32) + ADD_CUSTOM_COMMAND( + OUTPUT "${rot_LINK}" + COMMAND ${CMAKE_COMMAND} -E copy "${rot_dest}" "${rot_LINK}" + ) +else() ADD_CUSTOM_COMMAND( OUTPUT "${rot_LINK}" COMMAND "ln" @@ -31,7 +37,7 @@ FOREACH(c ${OFFENSIVE_COOKIES}) DEPENDS "${rot_dest}" WORKING_DIRECTORY "${rot_dir}" ) - +endif() ADD_CUSTOM_TARGET( "${TARGET_NAME}" ALL DEPENDS "${rot_dest}" "${DEST}" "${rot_LINK}" -- 2.40.0