shivendra-dev54 opened a new pull request, #890:
URL: https://github.com/apache/incubator-graphar/pull/890

   ### Reason for this PR
   This PR addresses #810 to improve the portability and installation of the 
GraphAr C++ library. The current setup makes it difficult for downstream 
projects to use `find_package(graphar)`, which this update resolves by 
modernizing the CMake export logic.
   
   ### What changes are included in this PR?
   - **Modern CMake Targets:** Added support for the `graphar::graphar` 
namespace via `install(EXPORT)`.
   - **Hybrid Linking Strategy:** Updated dependencies (Arrow/Parquet) to 
`PUBLIC` visibility to ensure proper propagation to consumers.
   - **Relocatable Installation:** - Integrated `GNUInstallDirs` for 
standard-compliant paths.
     - Set `CMAKE_INSTALL_RPATH` using `$ORIGIN` (Linux) and `@loader_path` 
(macOS) to ensure the library is relocatable.
   - **Config File Modernization:** Updated `graphar-config.in.cmake` using 
`@PACKAGE_INIT@` and `find_dependency` for robust downstream resolution.
   - **Backward Compatibility:** Preserved the legacy `GRAPHAR_LIBRARIES` and 
`GRAPHAR_INCLUDE_DIR` variables.
   
   ### Are these changes tested?
   - [x] Verified that all 20 existing C++ unit tests pass (`ctest`).
   - [x] Confirmed that `make install` generates a valid relocatable file 
structure.
   - [x] Successfully linked a separate "Hello World" project using 
`find_package(graphar REQUIRED)`.
   
   ### Are there any user-facing changes?
   Yes. Users can now integrate GraphAr into their own projects using the 
standard CMake pattern:
   ```cmake
   find_package(graphar REQUIRED)
   target_link_libraries(my_app PRIVATE graphar::graphar)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to