diff --git a/CMakeLists.txt b/CMakeLists.txt index b4993770..b12225ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,8 @@ auto_option(WIVRN_USE_X264 "Enable x264 software encoder" AUTO) auto_option(WIVRN_USE_PIPEWIRE "Enable pipewire backend" AUTO) auto_option(WIVRN_USE_PULSEAUDIO "Enable pulseaudio backend" AUTO) -set(OPENCOMPOSITE_SEARCH_PATH "/usr/local/lib:/usr/lib:/opt" CACHE STRING "List of places to search for OpenComposite, separated by :") +set(OPENCOMPOSITE_SEARCH_PATH "/usr/local/lib/OpenComposite:/usr/lib/OpenComposite:/opt/OpenComposite" + CACHE STRING "List of places to search for OpenComposite, separated by :") option(WIVRN_FEATURE_RENDERDOC "Support renderdoc" OFF) option(WIVRN_FEATURE_SOLARXR "Enable SolarXR driver" OFF) diff --git a/server/active_runtime.cpp b/server/active_runtime.cpp index 770b755c..10a7bb74 100644 --- a/server/active_runtime.cpp +++ b/server/active_runtime.cpp @@ -48,12 +48,11 @@ std::filesystem::path active_runtime::manifest_path() std::filesystem::path active_runtime::opencomposite_path() { - std::filesystem::path OpenComposite = "OpenComposite"; if (auto path = flatpak_key(flatpak::section::instance, "app-path")) - return *path / OpenComposite; + return std::filesystem::path(*path) / "OpenComposite"; for (auto path: std::ranges::split_view(std::string_view(OPENCOMPOSITE_SEARCH_PATH), std::string_view(":"))) { - if (auto res = std::string_view(path) / OpenComposite; std::filesystem::exists(res)) + if (auto res = std::string_view(path); std::filesystem::exists(res)) return res; } return {};