Imported Upstream version 2.8.10.2
[platform/upstream/cmake.git] / Modules / FindPhysFS.cmake
1 # Locate PhysFS library
2 # This module defines
3 # PHYSFS_LIBRARY, the name of the library to link against
4 # PHYSFS_FOUND, if false, do not try to link to PHYSFS
5 # PHYSFS_INCLUDE_DIR, where to find physfs.h
6 #
7 # $PHYSFSDIR is an environment variable that would
8 # correspond to the ./configure --prefix=$PHYSFSDIR
9 # used in building PHYSFS.
10 #
11 # Created by Eric Wing.
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 distribute this file outside of CMake, substitute the full
24 #  License text for the above reference.)
25
26 find_path(PHYSFS_INCLUDE_DIR physfs.h
27   HINTS
28     ENV PHYSFSDIR
29   PATH_SUFFIXES include/physfs include
30   PATHS
31   ~/Library/Frameworks
32   /Library/Frameworks
33   /sw # Fink
34   /opt/local # DarwinPorts
35   /opt/csw # Blastwave
36   /opt
37 )
38
39 find_library(PHYSFS_LIBRARY
40   NAMES physfs
41   HINTS
42     ENV PHYSFSDIR
43   PATH_SUFFIXES lib
44   PATHS
45   ~/Library/Frameworks
46   /Library/Frameworks
47   /sw
48   /opt/local
49   /opt/csw
50   /opt
51 )
52
53 # handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
54 # all listed variables are TRUE
55 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
56 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
57