FindPhysFS.cmake 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. # Copyright 2005-2009 Kitware, Inc.
  14. #
  15. # Distributed under the OSI-approved BSD License (the "License");
  16. # see accompanying file Copyright.txt for details.
  17. #
  18. # This software is distributed WITHOUT ANY WARRANTY; without even the
  19. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  20. # See the License for more information.
  21. #=============================================================================
  22. # (To distribute this file outside of CMake, substitute the full
  23. # License text for the above reference.)
  24. FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
  25. HINTS
  26. $ENV{PHYSFSDIR}
  27. PATH_SUFFIXES include/physfs include
  28. PATHS
  29. ~/Library/Frameworks
  30. /Library/Frameworks
  31. /usr/local
  32. /usr
  33. /sw # Fink
  34. /opt/local # DarwinPorts
  35. /opt/csw # Blastwave
  36. /opt
  37. )
  38. FIND_LIBRARY(PHYSFS_LIBRARY
  39. NAMES physfs
  40. HINTS
  41. $ENV{PHYSFSDIR}
  42. PATH_SUFFIXES lib64 lib
  43. PATHS
  44. ~/Library/Frameworks
  45. /Library/Frameworks
  46. /usr/local
  47. /usr
  48. /sw
  49. /opt/local
  50. /opt/csw
  51. /opt
  52. )
  53. # handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
  54. # all listed variables are TRUE
  55. INCLUDE(FindPackageHandleStandardArgs)
  56. FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)