2020-06-02 07:17:34 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2021-09-17 23:05:23 +08:00
|
|
|
index b56953c..d7ad3e7 100644
|
2020-06-02 07:17:34 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2021-12-07 13:10:27 +08:00
|
|
|
@@ -303,10 +303,13 @@ 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")
|
2020-06-02 07:17:34 +08:00
|
|
|
+ install (
|
2021-09-17 23:05:23 +08:00
|
|
|
+ FILES $<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll
|
2020-06-02 07:17:34 +08:00
|
|
|
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
2021-09-17 23:05:23 +08:00
|
|
|
+ )
|
|
|
|
endif()
|
2021-12-07 13:10:27 +08:00
|
|
|
|
2021-09-17 23:05:23 +08:00
|
|
|
- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
|
|
|
|
- install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})
|
2020-09-23 07:38:03 +08:00
|
|
|
+ install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib NAMELINK_SKIP)
|
2020-06-02 07:17:34 +08:00
|
|
|
endif()
|
2020-09-23 07:38:03 +08:00
|
|
|
|
2020-06-02 07:17:34 +08:00
|
|
|
# static library
|
2021-12-07 13:10:27 +08:00
|
|
|
@@ -332,6 +335,8 @@ if (MI_BUILD_STATIC)
|
2021-09-17 23:05:23 +08:00
|
|
|
install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
|
2020-06-02 07:17:34 +08:00
|
|
|
endif()
|
2020-09-23 07:38:03 +08:00
|
|
|
|
2021-09-17 23:05:23 +08:00
|
|
|
+install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})
|
2020-09-23 07:38:03 +08:00
|
|
|
+
|
|
|
|
# install include files
|
2021-09-17 23:05:23 +08:00
|
|
|
install(FILES include/mimalloc.h DESTINATION ${mi_install_incdir})
|
|
|
|
install(FILES include/mimalloc-override.h DESTINATION ${mi_install_incdir})
|
2021-12-07 13:10:27 +08:00
|
|
|
@@ -366,9 +371,6 @@ if (MI_BUILD_OBJECT)
|
2020-06-02 07:17:34 +08:00
|
|
|
|
2020-09-23 07:38:03 +08:00
|
|
|
# the FILES expression can also be: $<TARGET_OBJECTS:mimalloc-obj>
|
|
|
|
# but that fails cmake versions less than 3.10 so we leave it as is for now
|
|
|
|
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION}
|
2021-09-17 23:05:23 +08:00
|
|
|
- DESTINATION ${mi_install_libdir}
|
2020-09-23 07:38:03 +08:00
|
|
|
- RENAME ${mi_basename}${CMAKE_C_OUTPUT_EXTENSION} )
|
|
|
|
endif()
|
2020-06-02 07:17:34 +08:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|