diff options
author | Brad King <brad.king@kitware.com> | 2015-12-10 14:14:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-12-10 14:18:48 (GMT) |
commit | 39abbaed7756ac9b4d1d2e7f44575ae85388aaf6 (patch) | |
tree | 43e94867b5efba8f7dc997bc703067abaa18b138 /Modules/FindOpenAL.cmake | |
parent | dc873f6eef1e6f952cf3d09be7568b03fbf8c6d3 (diff) | |
download | CMake-39abbaed7756ac9b4d1d2e7f44575ae85388aaf6.zip CMake-39abbaed7756ac9b4d1d2e7f44575ae85388aaf6.tar.gz CMake-39abbaed7756ac9b4d1d2e7f44575ae85388aaf6.tar.bz2 |
FindOpenAL: Detect Windows architecture-specific installation
Some OpenAL implementations on Windows provide both Win32 and Win64
binaries. Search the location of the matching architecture.
Author: George "Zogzer@GitHub" <insertlogic@gmail.com>
Diffstat (limited to 'Modules/FindOpenAL.cmake')
-rw-r--r-- | Modules/FindOpenAL.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake index 8150ff2..eb63cef 100644 --- a/Modules/FindOpenAL.cmake +++ b/Modules/FindOpenAL.cmake @@ -79,11 +79,17 @@ find_path(OPENAL_INCLUDE_DIR al.h [HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir] ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(_OpenAL_ARCH_DIR libs/Win64) +else() + set(_OpenAL_ARCH_DIR libs/Win32) +endif() + find_library(OPENAL_LIBRARY NAMES OpenAL al openal OpenAL32 HINTS ENV OPENALDIR - PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64 + PATH_SUFFIXES lib64 lib libs64 libs ${_OpenAL_ARCH_DIR} PATHS ~/Library/Frameworks /Library/Frameworks @@ -94,6 +100,7 @@ find_library(OPENAL_LIBRARY [HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir] ) +unset(_OpenAL_ARCH_DIR) # handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if # all listed variables are TRUE |