uniba-swt / swtbahn-cli

A client-server command line interface for the SWTbahn.
GNU General Public License v3.0
7 stars 3 forks source link

Merge include-paths-bidib (and onion) CMake integration update #72

Closed BLuedtke closed 2 years ago

BLuedtke commented 2 years ago

This updates the CMake setup of this project to look for libbidib and libonion using pkg-config. This change is motivated by the fact that the current integration is (at least partially) hardcoded, and thus a bit annoying to set up on new dev machines.

With this change, we do require use of the most recent changes in libonion (link). The previous versions of onion only installed the non-static version with pkg-config.

The most important changes in the CMakeLists.txt are thus:

Due to how bidib is installed, the include paths in .h and .c files of the swtbahn-cli server must be adjusted. Previously, bidib.h was located in e.g. /usr/local/include (on KUbuntu 22.04 in this case). With the update to libbidib pkg-config use, it is now installed to (again, Kubuntu 22.04)/usr/local/include/bidib/ - so the #include statements must change from to <bidib/bidib.h>. This is consistent with how onion has to be included (<onion/onion.h>).

I've not been able to test the onion pkg-config integration for Apple machines so far. I'd be great if @eyip002 could test whether it works and adjust that part of the CMakeLists.txt accordingly. The changes in the include paths are likely to not work for Apple/Mac users otherwise (the current semi-hardcoded inclusion of onion could be adjusted to fix that however).

Closes #69