FindPhysFS.cmake 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 PHYSFS_LIBRARY, the name of
  7. the library to link against PHYSFS_FOUND, if false, do not try to link
  8. to PHYSFS PHYSFS_INCLUDE_DIR, where to find physfs.h
  9. $PHYSFSDIR is an environment variable that would correspond to the
  10. ./configure --prefix=$PHYSFSDIR used in building PHYSFS.
  11. Created by Eric Wing.
  12. #]=======================================================================]
  13. find_path(PHYSFS_INCLUDE_DIR physfs.h
  14. HINTS
  15. ENV PHYSFSDIR
  16. PATH_SUFFIXES include/physfs include
  17. PATHS
  18. ~/Library/Frameworks
  19. /Library/Frameworks
  20. /opt
  21. )
  22. find_library(PHYSFS_LIBRARY
  23. NAMES physfs
  24. HINTS
  25. ENV PHYSFSDIR
  26. PATH_SUFFIXES lib
  27. PATHS
  28. ~/Library/Frameworks
  29. /Library/Frameworks
  30. /opt
  31. )
  32. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  33. FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)