]> git.mxchange.org Git - flightgear.git/blob - CMakeModules/FindALUT.cmake
48e6e0425e145091a16aa7046f50adbdb73559d7
[flightgear.git] / CMakeModules / FindALUT.cmake
1 # Locate ALUT
2 # This module defines
3 # ALUT_LIBRARY
4 # ALUT_FOUND, if false, do not try to link to ALUT 
5 # ALUT_INCLUDE_DIR, where to find the headers
6 #
7 # $ALUTDIR is an environment variable that would
8 # correspond to the ./configure --prefix=$ALUTDIR
9 # used in building ALUT.
10 #
11 # Created by James Turner. This was influenced by the FindOpenAL.cmake module.
12
13 #=============================================================================
14 # Copyright 2005-2009 Kitware, Inc.
15 #
16 # Distributed under the OSI-approved BSD License (the "License");
17 # see accompanying file Copyright.txt for details.
18 #
19 # This software is distributed WITHOUT ANY WARRANTY; without even the
20 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 # See the License for more information.
22 #=============================================================================
23 # (To distributed this file outside of CMake, substitute the full
24 #  License text for the above reference.)
25
26 # Per my request, CMake should search for frameworks first in
27 # the following order:
28 # ~/Library/Frameworks/OpenAL.framework/Headers
29 # /Library/Frameworks/OpenAL.framework/Headers
30 # /System/Library/Frameworks/OpenAL.framework/Headers
31 #
32 # On OS X, this will prefer the Framework version (if found) over others.
33 # People will have to manually change the cache values of 
34 # OPENAL_LIBRARY to override this selection or set the CMake environment
35 # CMAKE_INCLUDE_PATH to modify the search paths.
36
37 FIND_LIBRARY(ALUT_LIBRARY 
38   NAMES ALUT alut
39   HINTS
40   $ENV{ALUTDIR}
41   PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
42   PATHS
43   ~/Library/Frameworks
44   /Library/Frameworks
45   /usr/local
46   /usr
47   /opt
48 )
49
50 FIND_PATH(ALUT_INCLUDE_DIR 
51   NAMES ALUT/alut.h alut.h
52   HINTS
53   $ENV{ALUTDIR}
54   PATH_SUFFIXES include/AL include
55   PATHS
56   ~/Library/Frameworks
57   /Library/Frameworks
58   /usr/local
59   /usr
60   /opt
61 )
62
63 include(FindPackageHandleStandardArgs)
64 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT  DEFAULT_MSG  ALUT_LIBRARY ALUT_INCLUDE_DIR)
65
66 MARK_AS_ADVANCED(ALUT_LIBRARY ALUT_INCLUDE_DIR)
67