1# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2# file Copyright.txt or https://cmake.org/licensing for details.
3
4#[=======================================================================[.rst:
5FindPhysFS
6----------
7
8
9
10Locate PhysFS library This module defines PHYSFS_LIBRARY, the name of
11the library to link against PHYSFS_FOUND, if false, do not try to link
12to PHYSFS PHYSFS_INCLUDE_DIR, where to find physfs.h
13
14$PHYSFSDIR is an environment variable that would correspond to the
15./configure --prefix=$PHYSFSDIR used in building PHYSFS.
16
17Created by Eric Wing.
18#]=======================================================================]
19
20find_path(PHYSFS_INCLUDE_DIR physfs.h
21  HINTS
22    ENV PHYSFSDIR
23  PATH_SUFFIXES include/physfs include
24  PATHS
25  ~/Library/Frameworks
26  /Library/Frameworks
27  /opt
28)
29
30find_library(PHYSFS_LIBRARY
31  NAMES physfs
32  HINTS
33    ENV PHYSFSDIR
34  PATH_SUFFIXES lib
35  PATHS
36  ~/Library/Frameworks
37  /Library/Frameworks
38  /opt
39)
40
41include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
42FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
43