]> git.jsancho.org Git - lugaru.git/commitdiff
Use pkgconfig for cross-compiling to detect OpenAL
authorNeal Gompa <ngompa13@gmail.com>
Sat, 19 Nov 2016 01:39:25 +0000 (20:39 -0500)
committerNeal Gompa <ngompa13@gmail.com>
Sat, 19 Nov 2016 01:39:25 +0000 (20:39 -0500)
CMakeLists.txt

index 62531a933f0a708099953bbaeb1d15ed90abc265..a1ee5c868569de05e6d6a0078e8323ecdd8c20e1 100644 (file)
@@ -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()