FindEXPAT.cmake 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # - Find expat
  2. # Find the native EXPAT headers and libraries.
  3. #
  4. # EXPAT_INCLUDE_DIRS - where to find expat.h, etc.
  5. # EXPAT_LIBRARIES - List of libraries when using expat.
  6. # EXPAT_FOUND - True if expat found.
  7. #=============================================================================
  8. # Copyright 2006-2009 Kitware, Inc.
  9. #
  10. # Distributed under the OSI-approved BSD License (the "License");
  11. # see accompanying file Copyright.txt for details.
  12. #
  13. # This software is distributed WITHOUT ANY WARRANTY; without even the
  14. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. # See the License for more information.
  16. #=============================================================================
  17. # (To distributed this file outside of CMake, substitute the full
  18. # License text for the above reference.)
  19. # Look for the header file.
  20. FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
  21. # Look for the library.
  22. FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat)
  23. # handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
  24. # all listed variables are TRUE
  25. INCLUDE(FindPackageHandleStandardArgs)
  26. FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT DEFAULT_MSG EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
  27. # Copy the results to the output variables.
  28. IF(EXPAT_FOUND)
  29. SET(EXPAT_LIBRARIES ${EXPAT_LIBRARY})
  30. SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR})
  31. ELSE(EXPAT_FOUND)
  32. SET(EXPAT_LIBRARIES)
  33. SET(EXPAT_INCLUDE_DIRS)
  34. ENDIF(EXPAT_FOUND)
  35. MARK_AS_ADVANCED(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)