Skip to content

[cmake] Improve the Find package for Alberta

Simon Praetorius requested to merge feature/alberta-cmake-improvements into master

Summary

Add a search path via cmake parameters and Alberta_ROOT and provide a mechanism to search for debug libraries

Details

Use the following cmake options to influence the search path and search strategy

cmake -DAlberta_ROOT=<prefix> -DAlberta_DEBUG=[0|1]

Assume you have installed alberta into the prefix dir /usr/local/alberta/3.1.0 then it is expected that you find sub directories lib/ and include/ and in the lib directory there is the pkgconfig directory, i.e., lib/pkgconfig/ with alberta-grid_[n]d.pc. An alternative to the Alberta_ROOT parameter is to extend the environmental variable PKG_CONFIG_PATH.

The flag -DAlberta_DEBUG activates search for debug configurations. Those are pkg-config files with the postfix _debug, e.g., alberta-utilities_debug.pc and describe corresponding libraries with debug symbols. If the debug version is not found, it searches as fallback also for the non-debug pkg-config files.

Merge request reports