From ac54909d55d25f3fda640e67f7ebc0ca342853d4 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Fri, 18 Nov 2016 20:39:25 -0500 Subject: [PATCH] Use pkgconfig for cross-compiling to detect OpenAL --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62531a9..a1ee5c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,7 +200,11 @@ option (LUGARU_FORCE_INTERNAL_OPENAL "Force internal libOpenAL, even if there's if (NOT LUGARU_FORCE_INTERNAL_OPENAL) # FIXME: We should remove bundled libs and allow building OpenAL from source, for all platforms if (WIN32) + if(CMAKE_CROSSCOMPILING) + pkg_check_modules(OpenAL openal) + else(CMAKE_CROSSCOMPILING) find_package(OpenAL) + endif(CMAKE_CROSSCOMPILING) else (WIN32) find_package(OpenAL REQUIRED) endif() -- 2.39.5