2024-03-23 07:28:56 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index 2bcd1ef..351817c 100644
|
2020-06-02 07:17:34 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2024-03-23 07:28:56 +08:00
|
|
|
@@ -297,6 +297,10 @@ if (MSVC AND MSVC_VERSION GREATER_EQUAL 1914)
|
|
|
|
list(APPEND mi_cflags /Zc:__cplusplus)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(MINGW)
|
|
|
|
+ add_definitions(-D_WIN32_WINNT=0x600)
|
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
# extra needed libraries
|
|
|
|
if(WIN32)
|
|
|
|
list(APPEND mi_libraries psapi shell32 user32 advapi32 bcrypt)
|
|
|
|
@@ -412,10 +416,10 @@ if(MI_BUILD_SHARED)
|
2020-09-23 07:38:03 +08:00
|
|
|
add_custom_command(TARGET mimalloc POST_BUILD
|
2021-09-17 23:05:23 +08:00
|
|
|
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" $<TARGET_FILE_DIR:mimalloc>
|
|
|
|
COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory")
|
2022-03-08 03:42:23 +08:00
|
|
|
- install(FILES "$<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${mi_install_libdir})
|
|
|
|
+ install(FILES "$<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2021-09-17 23:05:23 +08:00
|
|
|
endif()
|
2022-03-08 03:42:23 +08:00
|
|
|
|
2023-01-24 07:59:44 +08:00
|
|
|
- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
|
2024-03-23 07:28:56 +08:00
|
|
|
+ install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION ${mi_install_libdir} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${mi_install_libdir})
|
2022-03-08 03:42:23 +08:00
|
|
|
install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})
|
2020-06-02 07:17:34 +08:00
|
|
|
endif()
|
2020-09-23 07:38:03 +08:00
|
|
|
|