mirror of https://github.com/bjornbytes/lovr.git
Handle openvr-specific warnings more precisely;
Instead of disabling a warning for the entire project, it is only disabled while processing the OpenVR header.
This commit is contained in:
parent
1b4a97035a
commit
842efe36c7
|
@ -449,9 +449,6 @@ if(LOVR_ENABLE_HEADSET)
|
|||
if(LOVR_USE_OPENVR)
|
||||
add_definitions(-DLOVR_USE_OPENVR)
|
||||
target_sources(lovr PRIVATE src/modules/headset/headset_openvr.c)
|
||||
if(UNIX)
|
||||
target_compile_options(lovr PRIVATE -Wno-typedef-redefinition)
|
||||
endif()
|
||||
endif()
|
||||
if(LOVR_USE_OPENXR)
|
||||
add_definitions(-DLOVR_USE_OPENXR)
|
||||
|
|
|
@ -9,7 +9,6 @@ CFLAGS += -I$(ROOT)/src/modules
|
|||
CFLAGS += -fvisibility=hidden
|
||||
CFLAGS += -Wall -Wextra
|
||||
CFLAGS += -Wno-unused-parameter
|
||||
CFLAGS_@(OPENVR) += -Wno-typedef-redefinition
|
||||
CFLAGS_@(STRICT) += -Werror
|
||||
FLAGS_@(DEBUG) += -g
|
||||
FLAGS_@(OPTIMIZE) += -Oz
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#undef EXTERN_C
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtypedef-redefinition"
|
||||
#include <openvr_capi.h>
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
// From openvr_capi.h
|
||||
extern intptr_t VR_InitInternal(EVRInitError *peError, EVRApplicationType eType);
|
||||
|
|
Loading…
Reference in New Issue