FindPhysFS.cmake 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. Locate PhysFS library This module defines:
  7. ``PHYSFS_LIBRARY``
  8. the name of the library to link against
  9. ``PHYSFS_FOUND``
  10. if false, do not try to link to PHYSFS
  11. ``PHYSFS_INCLUDE_DIR``
  12. where to find physfs.h
  13. ``$PHYSFSDIR`` is an environment variable that would correspond to::
  14. ./configure --prefix=$PHYSFSDIR
  15. used in building PHYSFS.
  16. #]=======================================================================]
  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. /opt
  25. )
  26. find_library(PHYSFS_LIBRARY
  27. NAMES physfs
  28. HINTS
  29. ENV PHYSFSDIR
  30. PATH_SUFFIXES lib
  31. PATHS
  32. ~/Library/Frameworks
  33. /Library/Frameworks
  34. /opt
  35. )
  36. include(FindPackageHandleStandardArgs)
  37. find_package_handle_standard_args(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)