Closed jbeich closed 10 months ago
Yes, did that so that even if it's not found through pkg-config, we can still add it through the subproject. Should I try adding it conditionally with SDBUS
using if
?
Why not add_library(PkgConifg::SDBUS ALIAS sdbus-c++)
under if(NOT SDBUS_FOUND)
?
Didn't know about that, thanks! I'll add it now.
https://github.com/hyprwm/xdg-desktop-portal-hyprland/commit/df8c154f5793e71796e76004812f2a03eba67e88 seems to work on Nix, I hope it also works for you.
I confirm, builds fine.
Affects FreeBSD and other BSDs. Not sure why Nix isn't affected given it uses different prefix for each package. To reproduce install
sdbus-cpp
outside of/usr
and/usr/local
thus not part of default C compiler search path.Looks like
target_link_libraries
uses plainsdbus-c++
instead of the imported target: https://github.com/hyprwm/xdg-desktop-portal-hyprland/blob/c0b606460a099efdea48347aeb40b01af3d9af1c/CMakeLists.txt#L45 https://github.com/hyprwm/xdg-desktop-portal-hyprland/blob/c0b606460a099efdea48347aeb40b01af3d9af1c/CMakeLists.txt#L61