mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-25 15:35:58 +01:00
CMake: sdbus through pkg-config, fallback to subproject
This commit is contained in:
parent
bd110073cf
commit
f46cff1df2
1 changed files with 6 additions and 1 deletions
|
@ -30,7 +30,6 @@ add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value
|
|||
-fpermissive -Wno-address-of-temporary)
|
||||
|
||||
message(STATUS "Checking deps...")
|
||||
add_subdirectory(subprojects/sdbus-cpp)
|
||||
add_subdirectory(hyprland-share-picker)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
@ -38,6 +37,12 @@ find_package(Threads REQUIRED)
|
|||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-client wayland-protocols libpipewire-0.3 libspa-0.2 libdrm gbm hyprlang>=0.2.0)
|
||||
|
||||
# check whether we can find sdbus-c++ through pkg-config
|
||||
pkg_check_modules(SDBUS IMPORTED_TARGET sdbus-c++)
|
||||
if(NOT SDBUS_FOUND)
|
||||
add_subdirectory(subprojects/sdbus-cpp)
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
||||
add_executable(xdg-desktop-portal-hyprland ${SRCFILES})
|
||||
target_link_libraries(xdg-desktop-portal-hyprland PRIVATE rt sdbus-c++ Threads::Threads PkgConfig::deps)
|
||||
|
|
Loading…
Reference in a new issue