While packaging lib3mf for Homebrew we noticed install layout issues with this configuration:
cmake -S . -B build \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DUSE_INCLUDED_ZLIB=OFF \
-DUSE_INCLUDED_LIBZIP=OFF \
-DUSE_INCLUDED_SSL=OFF \
-DLIB3MF_TESTS=OFF
cmake --build build
cmake --install build --prefix <prefix>
Observed:
- In some builds, Homebrew cannot rely on the shared library being installed by upstream install rules and needs a fallback copy from build artifacts.
- C++ public headers are not available in the standard top-level include path expected by downstream consumers, so Homebrew needs to copy *.hpp manually.
Current Homebrew workaround:
dylibs = Dir["build/**/lib3mf*.{dylib,so}*"]
lib.install dylibs if dylibs.any?
include.install Dir["#{include}/Bindings/Cpp/*.hpp"]