Allow using glib instead of sd-bus to get the pretty hostname
This commit is contained in:
+13
-1
@@ -26,7 +26,8 @@ include("cmake/AutoOption.cmake")
|
||||
option(WIVRN_USE_SYSTEM_FREETYPE "Use system FreeType" ON)
|
||||
auto_option(WIVRN_USE_SYSTEM_BOOST "Use system Boost headers" AUTO)
|
||||
auto_option(WIVRN_USE_SYSTEM_OPENXR "Use system OpenXR headers" AUTO)
|
||||
auto_option(WIVRN_USE_SYSTEMD "Use libsystemd, required to show pretty hostname" AUTO)
|
||||
auto_option(WIVRN_USE_SYSTEMD "Use libsystemd, either libsystemd or glib is required to show pretty hostname" AUTO)
|
||||
auto_option(WIVRN_USE_GLIB "Use glib, required to show pretty hostname inside a flatpak container" OFF)
|
||||
option(WIVRN_USE_ANDROID_VALIDATION_LAYER "Download the android version of the Vulkan validation layer" OFF)
|
||||
option(WIVRN_BUILD_CLIENT "Build WiVRn client" OFF)
|
||||
option(WIVRN_BUILD_SERVER "Build WiVRn server" ON)
|
||||
@@ -140,6 +141,17 @@ if (WIVRN_BUILD_SERVER)
|
||||
find_package(Eigen3 REQUIRED)
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
find_package(CLI11 REQUIRED)
|
||||
|
||||
if (WIVRN_USE_GLIB STREQUAL "AUTO")
|
||||
pkg_check_modules(glib2 IMPORTED_TARGET glib-2.0 gio-2.0)
|
||||
if(glib2_FOUND)
|
||||
set(WIVRN_USE_GLIB ON)
|
||||
else()
|
||||
set(WIVRN_USE_GLIB OFF)
|
||||
endif()
|
||||
elseif (WIVRN_USE_GLIB)
|
||||
pkg_check_modules(glib2 REQUIRED IMPORTED_TARGET glib-2.0 gio-2.0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIVRN_BUILD_CLIENT AND NOT ANDROID)
|
||||
|
||||
Reference in New Issue
Block a user