eclipse-iceoryx / iceoryx

Eclipse iceoryx™ - true zero-copy inter-process-communication
https://iceoryx.io
Apache License 2.0
1.69k stars 393 forks source link

Use a Findacl.cmake to setup the dependency to libacl #2343

Open guill-delacourt opened 2 months ago

guill-delacourt commented 2 months ago

Brief feature description

The build process of iceoryx could be improved by using find_package to setup the dependency to libacl, allowing to detect if it is installed. Since libacl doesn't provide CMake config scripts, iceoryx could provide a Findacl.cmake instead (and add its directory to its list of CMAKE_MODULE_PATH).

Detailed information

Currently, the build script of iceoryx expects that libacl is installed on the system through the package manager. While this should be the prefered way to install acl, it's not always possible to do this, notably if the user don't have administrative rights to the system or when cross-compiling iceoryx for a sysroot that should be kept cleared. In that case, the libacl is installed in another directory. When using find_package to setup the dependency, the directory in which libacl is installed can be search with the CMAKE_STAGING_PREFIX or CMAKE_INSTALL_PREFIX. Currently, the directory should be listed though compiler flags.

elBoberido commented 2 months ago

@guill-delacourt would be great. Can you create a pull request?

guill-delacourt commented 2 months ago

I don't have a patch ready, nor the greenlight to contribute one. However, if I have to patch iceoryx for something else (I'm thinking of the workaround indicated in the issue #1176 ), this situation could change.