Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion core/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,15 @@ if(ROOT_NEED_STDCXXFS)
endif()

# This code about the LIB_CORE_NAME define is important for TROOT::GetSharedLibDir()
set(full_core_filename $<TARGET_FILE_NAME:Core>)
# On Linux, dl_iterate_phdr reports loaded libraries by their SONAME
# (e.g. libCore.so.6.38), not their full filename (libCore.so.6.38.02).
# On macOS, _dyld_get_image_name returns the actual filename.
# LIB_CORE_NAME must match what the dynamic linker reports.
if(soversion AND NOT APPLE)
set(full_core_filename $<TARGET_SONAME_FILE_NAME:Core>)
else()
set(full_core_filename $<TARGET_FILE_NAME:Core>)
endif()

target_compile_options(Core PRIVATE -DLIB_CORE_NAME=${full_core_filename})

Expand Down
Loading