FindLibXslt.cmake 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # - Try to find the LibXslt library
  2. # Once done this will define
  3. #
  4. # LIBXSLT_FOUND - system has LibXslt
  5. # LIBXSLT_INCLUDE_DIR - the LibXslt include directory
  6. # LIBXSLT_LIBRARIES - Link these to LibXslt
  7. # LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt
  8. #=============================================================================
  9. # Copyright 2006-2009 Kitware, Inc.
  10. # Copyright 2006 Alexander Neundorf <[email protected]>
  11. #
  12. # Distributed under the OSI-approved BSD License (the "License");
  13. # see accompanying file Copyright.txt for details.
  14. #
  15. # This software is distributed WITHOUT ANY WARRANTY; without even the
  16. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. # See the License for more information.
  18. #=============================================================================
  19. # (To distribute this file outside of CMake, substitute the full
  20. # License text for the above reference.)
  21. # use pkg-config to get the directories and then use these values
  22. # in the FIND_PATH() and FIND_LIBRARY() calls
  23. FIND_PACKAGE(PkgConfig)
  24. PKG_CHECK_MODULES(PC_LIBXSLT libxslt)
  25. SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER})
  26. FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h
  27. HINTS
  28. ${PC_LIBXSLT_INCLUDEDIR}
  29. ${PC_LIBXSLT_INCLUDE_DIRS}
  30. )
  31. FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt
  32. HINTS
  33. ${PC_LIBXSLT_LIBDIR}
  34. ${PC_LIBXSLT_LIBRARY_DIRS}
  35. )
  36. # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
  37. # all listed variables are TRUE
  38. INCLUDE(FindPackageHandleStandardArgs)
  39. FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
  40. MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES)