enwi / hueplusplus

A simple C++ library to control Philips Hue lights on Linux, MacOS, Windows, Espressif ESP32 SDK and Arduino. Full documentation at
https://enwi.github.io/hueplusplus/
GNU Lesser General Public License v3.0
53 stars 22 forks source link

[FR] Allow linking against external mbedtsl #90

Open werdahias opened 1 year ago

werdahias commented 1 year ago

Hi,

I started packaging this library for debian as prerequisite for openrgb. I encountered a few issues stemming from the embedding dependencies. No package in debian should depend/ship external libraries.

dpkg-shlibdeps: warning: symbol mbedtls_ctr_drbg_random used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries
dpkg-shlibdeps: warning: symbol mbedtls_entropy_func used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries
dpkg-shlibdeps: warning: symbol mbedtls_timing_set_delay used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries
dpkg-shlibdeps: warning: symbol mbedtls_timing_get_delay used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries
dpkg-shlibdeps: warning: symbol mbedtls_x509_crt_init used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries
dpkg-shlibdeps: warning: symbol mbedtls_entropy_free used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries
dpkg-shlibdeps: warning: symbol mbedtls_ctr_drbg_init used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries
dpkg-shlibdeps: warning: symbol mbedtls_entropy_init used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries
dpkg-shlibdeps: warning: symbol mbedtls_ctr_drbg_seed used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries
dpkg-shlibdeps: warning: symbol mbedtls_ctr_drbg_free used by debian/libhueplusplus-dev/usr/lib/libhueplusplusshared.so found in none of the libraries

because the mbdedtls library from debian isn't picked up (and linked).

The tests aren't buildable offline either. I'd appreciate if you could employ a similar check because gtest and gmock are both in debian.

Jojo-1000 commented 1 year ago

Hi, I implemented find_package for external libraries on the external-deps branch. Could you please test that it correctly links to the external dependencies? I only tested that it still works without installed libraries.

werdahias commented 1 year ago

awesome, thank you! Unfortunately the version of mbedtls in debian is to old so I can't test the build. Once that gets updated I'll report back.

werdahias commented 5 months ago

since mbedtls 3.x is available in debian I will test this soon