FindPhysFS.cmake 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
  13. PATHS
  14. $ENV{PHYSFSDIR}
  15. NO_DEFAULT_PATH
  16. PATH_SUFFIXES include
  17. )
  18. FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
  19. PATHS
  20. ~/Library/Frameworks
  21. /Library/Frameworks
  22. /usr/local
  23. /usr
  24. /sw # Fink
  25. /opt/local # DarwinPorts
  26. /opt/csw # Blastwave
  27. /opt
  28. PATH_SUFFIXES include/physfs include
  29. )
  30. FIND_LIBRARY(PHYSFS_LIBRARY
  31. NAMES physfs
  32. PATHS
  33. $ENV{PHYSFSDIR}
  34. NO_DEFAULT_PATH
  35. PATH_SUFFIXES lib64 lib
  36. )
  37. FIND_LIBRARY(PHYSFS_LIBRARY
  38. NAMES physfs
  39. PATHS
  40. ~/Library/Frameworks
  41. /Library/Frameworks
  42. /usr/local
  43. /usr
  44. /sw
  45. /opt/local
  46. /opt/csw
  47. /opt
  48. PATH_SUFFIXES lib64 lib
  49. )
  50. SET(PHYSFS_FOUND "NO")
  51. IF(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR)
  52. SET(PHYSFS_FOUND "YES")
  53. ENDIF(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR)