Explicit full path for OpenComposite search
This commit is contained in:
+2
-1
@@ -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)
|
||||
|
||||
@@ -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 {};
|
||||
|
||||
Reference in New Issue
Block a user