mimalloc icon indicating copy to clipboard operation
mimalloc copied to clipboard

mimalloc.cmake has hard-coded paths

Open davesworking opened this issue 2 years ago • 0 comments

hi,

the generated mimalloc.cmake file has hard-coded paths, e.g.

mimalloc.cmake

# The installation prefix configured by this project.
set(_IMPORT_PREFIX"C:/Build/work/Windows-x86-64/vc143")

set_target_properties(mimallocPROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES"C:/Build/work/Build/Windows-x86-64/vc143/include/mimalloc-2.1"
)

set_target_properties(mimalloc-staticPROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES"C:/Build/work/Build/Windows-x86-64/vc143/include/mimalloc-2.1"
  INTERFACE_LINK_LIBRARIES"\$<LINK_ONLY:psapi>;\$<LINK_ONLY:shell32>;\$<LINK_ONLY:user32>;\$<LINK_ONLY:advapi32>;\$<LINK_ONLY:bcrypt>"
)

Is it possible to have relative paths, e.g.:

# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX"${CMAKE_CURRENT_LIST_FILE}"PATH)
get_filename_component(_IMPORT_PREFIX"${_IMPORT_PREFIX}"PATH)
get_filename_component(_IMPORT_PREFIX"${_IMPORT_PREFIX}"PATH)
get_filename_component(_IMPORT_PREFIX"${_IMPORT_PREFIX}"PATH)
if(_IMPORT_PREFIXSTREQUAL"/")
  set(_IMPORT_PREFIX"")
endif()

Is there a way to specify that during the CMake build?

Thanks! Dave

davesworking avatar Nov 23 '23 15:11 davesworking