diff --git a/libraries/shared/src/GLMHelpers.h b/libraries/shared/src/GLMHelpers.h index cfb4bb6398..c74820e4a0 100644 --- a/libraries/shared/src/GLMHelpers.h +++ b/libraries/shared/src/GLMHelpers.h @@ -212,9 +212,11 @@ T toNormalizedDeviceScale(const T& value, const T& size) { #define ROLL(euler) euler.z // float - linear interpolate +#if !defined(DONT_REDEFINE_LERP) inline float lerp(float x, float y, float a) { return x * (1.0f - a) + (y * a); } +#endif // vec2 lerp - linear interpolate template diff --git a/plugins/openxr/CMakeLists.txt b/plugins/openxr/CMakeLists.txt index 9316a77f63..c54d5efcc2 100644 --- a/plugins/openxr/CMakeLists.txt +++ b/plugins/openxr/CMakeLists.txt @@ -22,6 +22,9 @@ include_hifi_library_headers(script-engine) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") # Silence GCC warnings target_compile_options(openxr PRIVATE -Wno-missing-field-initializers) + + # Fix build issue where lerp is already defined on C++20 / GCC + target_compile_definitions(openxr PRIVATE -DDONT_REDEFINE_LERP) endif() set_property(TARGET openxr PROPERTY CXX_STANDARD 20) \ No newline at end of file