FindPhysFS.cmake 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. /sw # Fink
  32. /opt/local # DarwinPorts
  33. /opt/csw # Blastwave
  34. /opt
  35. )
  36. find_library(PHYSFS_LIBRARY
  37. NAMES physfs
  38. HINTS
  39. $ENV{PHYSFSDIR}
  40. PATH_SUFFIXES lib64 lib
  41. PATHS
  42. ~/Library/Frameworks
  43. /Library/Frameworks
  44. /sw
  45. /opt/local
  46. /opt/csw
  47. /opt
  48. )
  49. # handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
  50. # all listed variables are TRUE
  51. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  52. FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)