You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(c++): Improve CMakeLists.txt for portable library distribution and installation #810
rel: #806
The current CMakeLists.txt in GraphAr does not fully support robust distribution and installation of the library. This issue proposes a comprehensive update to:
Generate install targets for library components and headers
Export CMake config files for find_package support in downstream projects
Ensure headers, artifacts, and dependencies are correctly installed
Facilitate use in various build systems and package managers
These enhancements will improve the adoption and packaging of GraphAr for both users and external contributors.
Add proper CMake install() rules for libraries and public headers
Export targets and generate CMake config files to support find_package(GraphAr)
Validate installation and usage from a minimal downstream project
Hi @tanmoyPaul12 , thanks for claiming this!
While working on the CMake configuration, could you please consider the following linking strategy to ensure the distribution is robust?
Hybrid Linking:
Dependencies built from source (bundled) should ideally be statically linked (e.g., by forcing BUILD_SHARED_LIBS=OFF for those targets). This keeps the installation self-contained.
System dependencies can remain dynamic (or whatever the system provides).
RPATH Configuration:
For dynamic linking, please ensure CMAKE_INSTALL_RPATH is correctly set (e.g., using $ORIGIN on Linux) so that users don't need to manually configure LD_LIBRARY_PATH to run the installed library.
The following is the ideal rendering proposed by @Sober7135
@yangxk1 Thanks for the detailed guidance and the draft. I’ll follow the hybrid linking approach you suggested and make sure the RPATH is set correctly
Activity
tanmoyPaul12 commentedon Dec 28, 2025
Hi! I’m interested in working on this issue
Planned approach:
Please let me know if this works for you. Thanks!
yangxk1 commentedon Dec 29, 2025
Hi @tanmoyPaul12 , thanks for claiming this!
While working on the CMake configuration, could you please consider the following linking strategy to ensure the distribution is robust?
The following is the ideal rendering proposed by @Sober7135
I also wrote a draft, hope it helps. https://github.com/yangxk1/incubator-graphar/blob/810-improve-cmakelist-library-distribution/cpp/CMakeLists.txt
cc @Sober7135
tanmoyPaul12 commentedon Dec 29, 2025
@yangxk1 Thanks for the detailed guidance and the draft. I’ll follow the hybrid linking approach you suggested and make sure the RPATH is set correctly