diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-29 16:08:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-29 16:08:28 +0300 |
commit | b2c707747da9f930a05499e98874c35d9aee7193 (patch) | |
tree | 6e687689e15cb2e9e769e5e0379695848ec27186 /build_files/cmake/platform | |
parent | 987b3abeb456fea55d14c8646b6dc253c7eb356c (diff) |
CMake: Comply with include path reported by FindOpenGL.cmake
The script clearly states:
This makes the presumption that you are include al.h like
#include "al.h"
and not
#include <AL/al.h>
The reason for this is that the latter is not entirely portable.
Windows/Creative Labs does not by default put their headers in AL/ and
OS X uses the convention <OpenAL/al.h>.
This commit makes default precompiled OpenAL to be properly detected
and also removes hack on MacOS which was finding the OpenAL package but
then was overwriting include directory.
Note, that new audaspace in 2.8 is using expected #include <al.h>.
Diffstat (limited to 'build_files/cmake/platform')
-rw-r--r-- | build_files/cmake/platform/platform_apple.cmake | 1 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index faed0cf25fc..b9c898e60d8 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -43,7 +43,6 @@ if(WITH_OPENAL) find_package(OpenAL) if(OPENAL_FOUND) set(WITH_OPENAL ON) - set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include") else() set(WITH_OPENAL OFF) endif() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 1460808038d..07dc3ec0671 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -556,7 +556,7 @@ set(WINTAB_INC ${LIBDIR}/wintab/include) if(WITH_OPENAL) set(OPENAL ${LIBDIR}/openal) set(OPENALDIR ${LIBDIR}/openal) - set(OPENAL_INCLUDE_DIR ${OPENAL}/include) + set(OPENAL_INCLUDE_DIR ${OPENAL}/include/AL) set(OPENAL_LIBPATH ${OPENAL}/lib) if(MSVC) set(OPENAL_LIBRARY ${OPENAL_LIBPATH}/openal32.lib) |