Skip to content

Commit ff0cfc9

Browse files
committed
add comment about converting symlinks into targets
1 parent c9a398f commit ff0cfc9

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

CMakeLists.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,11 @@ endif()
649649
# toolbox path into MATLAB path. This issue is fixed in R2024a
650650
install(FILES ${OTLP_MISC_FILES} DESTINATION .)
651651

652-
# Macro: accepts base name, full version, and short version
652+
# Macro to install a library and then rename it to shorten its version. The renaming is intended to
653+
# work around an issue in matlab.addons.toolbox.packagetoolbox that omits symlinks from the resulting
654+
# mltbx package. Many libraries ship symlinks with shortened version numbers. The renaming here
655+
# effectively converts symlinks into their targets.
656+
# Accepts base name, full version, and short version
653657
macro(install_and_shorten_version base full_version short_version)
654658
if(APPLE)
655659
# macOS: version before extension
@@ -681,11 +685,11 @@ endif()
681685
install(FILES ${OPENTELEMETRY_PROXY_RUNTIME_LIBRARIES} DESTINATION ${DEPENDENT_RUNTIME_INSTALLED_DIR})
682686
if(UNIX)
683687
if(WITH_OTLP_GRPC)
684-
# Uniform version numbers for most files
688+
# Install gRPC shared libraries
689+
690+
# Loop through gRPC and dependent libraries
685691
set(GRPC_FULL_VERSION "41.0.0")
686692
set(GRPC_SHORT_VERSION "41")
687-
688-
# Loop through all base names (no version numbers here)
689693
foreach(grpcfile IN ITEMS
690694
libaddress_sorting
691695
libgpr
@@ -701,7 +705,7 @@ if(UNIX)
701705
install_and_shorten_version(${grpcfile} ${GRPC_FULL_VERSION} ${GRPC_SHORT_VERSION})
702706
endforeach()
703707

704-
# Handle libgrpc++ separately (different version scheme)
708+
# Loop through libgrpc++ libraries (different version scheme)
705709
set(GRPCPP_FULL_VERSION "1.64.2")
706710
set(GRPCPP_SHORT_VERSION "1.64")
707711
foreach(grpcppfile IN ITEMS

0 commit comments

Comments
 (0)