]> git.mxchange.org Git - flightgear.git/blob - CMakeModules/FindALUT.cmake
CMake header support for XCode/Visual Studio
[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_PATH(ALUT_INCLUDE_DIR alut.h
38   HINTS
39   $ENV{ALUTDIR}
40   PATH_SUFFIXES include/AL include/ALUT include
41   PATHS
42   ~/Library/Frameworks
43   /Library/Frameworks
44   /usr/local
45   /usr
46   /opt
47 )
48
49 FIND_LIBRARY(ALUT_LIBRARY 
50   NAMES ALUT alut
51   HINTS
52   $ENV{ALUTDIR}
53   PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
54   PATHS
55   ~/Library/Frameworks
56   /Library/Frameworks
57   /usr/local
58   /usr
59   /opt
60 )
61
62
63 SET(ALUT_FOUND "NO")
64 IF(ALUT_LIBRARY AND ALUT_INCLUDE_DIR)
65   SET(ALUT_FOUND "YES")
66 ENDIF(ALUT_LIBRARY AND ALUT_INCLUDE_DIR)
67