FindPhysFS.cmake 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #.rst:
  2. # FindPhysFS
  3. # ----------
  4. #
  5. #
  6. #
  7. # Locate PhysFS library This module defines PHYSFS_LIBRARY, the name of
  8. # the library to link against PHYSFS_FOUND, if false, do not try to link
  9. # to PHYSFS PHYSFS_INCLUDE_DIR, where to find physfs.h
  10. #
  11. # $PHYSFSDIR is an environment variable that would correspond to the
  12. # ./configure --prefix=$PHYSFSDIR used in building PHYSFS.
  13. #
  14. # Created by Eric Wing.
  15. #=============================================================================
  16. # Copyright 2005-2009 Kitware, Inc.
  17. #
  18. # Distributed under the OSI-approved BSD License (the "License");
  19. # see accompanying file Copyright.txt for details.
  20. #
  21. # This software is distributed WITHOUT ANY WARRANTY; without even the
  22. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  23. # See the License for more information.
  24. #=============================================================================
  25. # (To distribute this file outside of CMake, substitute the full
  26. # License text for the above reference.)
  27. find_path(PHYSFS_INCLUDE_DIR physfs.h
  28. HINTS
  29. ENV PHYSFSDIR
  30. PATH_SUFFIXES include/physfs include
  31. PATHS
  32. ~/Library/Frameworks
  33. /Library/Frameworks
  34. /sw # Fink
  35. /opt/local # DarwinPorts
  36. /opt/csw # Blastwave
  37. /opt
  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. # handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
  53. # all listed variables are TRUE
  54. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  55. FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)