summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Jones <ethan@yasfu.net>2021-09-15 19:32:01 +0200
committerGitHub <noreply@github.com>2021-09-15 19:32:01 +0200
commitf09258d24e9436353efcf8323826ab2ddbf2e249 (patch)
treec0c251270988eb0784691bbe32e1cabb07c65676
parentAdd LittleBigBug to CONTRIBUTORS (#5297) (diff)
downloadcuberite-f09258d24e9436353efcf8323826ab2ddbf2e249.tar
cuberite-f09258d24e9436353efcf8323826ab2ddbf2e249.tar.gz
cuberite-f09258d24e9436353efcf8323826ab2ddbf2e249.tar.bz2
cuberite-f09258d24e9436353efcf8323826ab2ddbf2e249.tar.lz
cuberite-f09258d24e9436353efcf8323826ab2ddbf2e249.tar.xz
cuberite-f09258d24e9436353efcf8323826ab2ddbf2e249.tar.zst
cuberite-f09258d24e9436353efcf8323826ab2ddbf2e249.zip
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b5dcead39..4efc76a90 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -192,7 +192,12 @@ SET_TARGET_PROPERTIES(${CMAKE_PROJECT_NAME} PROPERTIES
-
+MACRO(TO_NATIVE_PATH PATH OUT)
+ FILE(TO_NATIVE_PATH "${PATH}" "${OUT}")
+ IF(MINGW)
+ STRING(REPLACE "/" "\\" "${OUT}" "${${OUT}}")
+ ENDIF(MINGW)
+ENDMACRO(TO_NATIVE_PATH)
# Create a symbolic link from ${orig} to ${link}
# If the orig and link point to the same thing, does nothing (-> in-source build)
@@ -211,8 +216,8 @@ function(make_symlink orig link)
if (CMAKE_HOST_UNIX)
set(command ln -s ${orig} ${link})
else()
- file(TO_NATIVE_PATH "${orig}" orig)
- file(TO_NATIVE_PATH "${link}" link)
+ TO_NATIVE_PATH("${orig}" orig)
+ TO_NATIVE_PATH("${link}" link)
if (IS_DIRECTORY ${orig})
set(command cmd.exe /c mklink /j ${link} ${orig})
else()