File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ if(WIN32)
4545 add_compile_definitions (/w26812)
4646 endif ()
4747else ()
48- set (library_filename "${library_name} .so" )
48+ set (library_filename "../lib ${library_name} .so" )
4949endif (WIN32 )
5050
5151configure_file (
Original file line number Diff line number Diff line change 77#include " layer.hpp"
88#include " layer_config.hpp"
99#include < stdexcept>
10+ #include < string.h>
1011
1112OpenXRLayer* OpenXRLayer::this_layer = nullptr ;
1213std::vector<const char *> OpenXRLayer::extensions{};
@@ -18,14 +19,13 @@ void OpenXRLayer::SetEnabledExtensions(const std::vector<const char*>& extension
1819
1920bool OpenXRLayer::IsExtensionEnabled (const char * extensionName)
2021{
21- const auto iterator = std::find_if (extensions.begin (),
22- extensions.end (),
23- [extensionName](const char * enabled_extension)
24- {
25- return 0 == strcmp (extensionName, enabled_extension);
26- });
27-
28- return iterator != extensions.end ();
22+ for (const auto ext : extensions)
23+ {
24+ if (!strcmp (ext, extensionName))
25+ return true ;
26+ }
27+
28+ return false ;
2929}
3030
3131OpenXRLayer::OpenXRLayer (PFN_xrGetInstanceProcAddr nextLayerGetInstanceProcAddr) :
Original file line number Diff line number Diff line change 1111#define XR_OS_WINDOWS
1212#define WIN32_LEAN_AND_MEAN
1313#define NOMINMAX
14- #include < Windows.h>
14+ #include < windows.h>
15+ #elif defined __linux__
16+ // openxr loader recommends using secure_getenv, which was introduced in glibc 2.17
17+ #include < stdlib.h>
18+ #define XR_OS_LINUX
19+ #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 17
20+ #define HAVE_SECURE_GETENV
21+ #endif
1522#endif
1623
1724#include " openxr/openxr_platform_defines.h"
You can’t perform that action at this time.
0 commit comments