FindPhysFS.cmake 1.1 KB

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