From 9968fc9f455c8822d6fef496d200a24c51388b5f Mon Sep 17 00:00:00 2001 From: Pablo Hoch Date: Fri, 25 Oct 2024 15:13:03 +0200 Subject: [PATCH] fix windows mimalloc build --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88ac48d..e40bd42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,8 @@ if (MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996") # ignore deprecated fileno in tiles endif () +option(OSR_MIMALLOC "use mimalloc" OFF) + if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY) if (OSR_MIMALLOC) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") @@ -29,7 +31,6 @@ if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY) endif () endif () -option(OSR_MIMALLOC "use mimalloc" OFF) if (OSR_MIMALLOC AND WIN32) set(MI_BUILD_SHARED ON) endif () @@ -155,9 +156,9 @@ if (OSR_MIMALLOC) add_custom_command( TARGET osr-extract POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy - "${CMAKE_CURRENT_BINARY_DIR}/deps/mimalloc/mimalloc-redirect.dll" + "${CMAKE_BINARY_DIR}/deps/mimalloc/mimalloc-redirect.dll" $ COMMENT "Copy mimalloc-redirect.dll to output directory" ) endif () -endif () \ No newline at end of file +endif ()