Tests: Fix FindOpenAL test for macOS framework
- Use framework-style includes. - Hush deprecation warnings when compiling test.
This commit is contained in:
parent
5f5476ee31
commit
1d06554fc6
@ -12,3 +12,9 @@ add_executable(test_var main.cxx)
|
||||
target_include_directories(test_var PRIVATE ${OPENAL_INCLUDE_DIR})
|
||||
target_link_libraries(test_var PRIVATE ${OPENAL_LIBRARY})
|
||||
add_test(NAME test_var COMMAND test_var)
|
||||
|
||||
# OpenAL has been deprecated on macOS since Catalina (10.15)
|
||||
if(APPLE)
|
||||
target_compile_options(test_tgt PRIVATE "-Wno-deprecated-declarations")
|
||||
target_compile_options(test_var PRIVATE "-Wno-deprecated-declarations")
|
||||
endif()
|
||||
|
@ -1,5 +1,10 @@
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#ifdef __APPLE__
|
||||
# include "OpenAL/al.h"
|
||||
# include "OpenAL/alc.h"
|
||||
#else
|
||||
# include <AL/al.h>
|
||||
# include <AL/alc.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
|
Loading…
Reference in New Issue
Block a user