From 1d06554fc6e00fdf8a6f15db9f56ec965cabeef9 Mon Sep 17 00:00:00 2001 From: nega <1098-nega@users.noreply.gitlab.kitware.com> Date: Tue, 28 Mar 2023 18:48:59 -0400 Subject: Tests: Fix FindOpenAL test for macOS framework - Use framework-style includes. - Hush deprecation warnings when compiling test. --- Tests/FindOpenAL/Test/CMakeLists.txt | 6 ++++++ Tests/FindOpenAL/Test/main.cxx | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Tests/FindOpenAL/Test/CMakeLists.txt b/Tests/FindOpenAL/Test/CMakeLists.txt index fa3e263..6479df6 100644 --- a/Tests/FindOpenAL/Test/CMakeLists.txt +++ b/Tests/FindOpenAL/Test/CMakeLists.txt @@ -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() diff --git a/Tests/FindOpenAL/Test/main.cxx b/Tests/FindOpenAL/Test/main.cxx index bb45faf..1396c60 100644 --- a/Tests/FindOpenAL/Test/main.cxx +++ b/Tests/FindOpenAL/Test/main.cxx @@ -1,5 +1,10 @@ -#include -#include +#ifdef __APPLE__ +# include "OpenAL/al.h" +# include "OpenAL/alc.h" +#else +# include +# include +#endif #include int main() -- cgit v0.12