mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
This commit is contained in:
parent
34172910e5
commit
e2c095fad2
3 changed files with 33 additions and 19 deletions
|
@ -1,2 +1,11 @@
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/mimalloc.cmake)
|
||||
get_filename_component(MIMALLOC_TARGET_DIR "${CMAKE_CURRENT_LIST_DIR}" PATH)
|
||||
get_filename_component(MIMALLOC_SHARE_DIR "${CMAKE_CURRENT_LIST_DIR}" PATH) # one up from the cmake dir, e.g. /usr/local/share/mimalloc-2.0
|
||||
if (MIMALLOC_SHARE_DIR MATCHES "/share/")
|
||||
string(REPLACE "/share/" "/lib/" MIMALLOC_LIBRARY_DIR ${MIMALLOC_SHARE_DIR})
|
||||
string(REPLACE "/share/" "/include/" MIMALLOC_INCLUDE_DIR ${MIMALLOC_SHARE_DIR})
|
||||
else()
|
||||
# if MI_INSTALL_TOPLEVEL==ON
|
||||
set(MIMALLOC_LIBRARY_DIR "${MIMALLOC_SHARE_DIR}/lib")
|
||||
set(MIMALLOC_INCLUDE_DIR "${MIMALLOC_SHARE_DIR}/include")
|
||||
endif()
|
||||
set(MIMALLOC_TARGET_DIR "${MIMALLOC_LIBRARY_DIR}") # legacy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue