Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Modules / FindLibXslt.cmake
blob95c6819f82a9186cf3a7a34daeac6a87722b2b4d
1 # - Try to find LibXslt
2 # Once done this will define
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
9 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
11 # Redistribution and use is allowed according to the terms of the BSD license.
12 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
15 IF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES)
16    # in cache already
17    SET(LibXslt_FIND_QUIETLY TRUE)
18 ENDIF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES)
20 IF (NOT WIN32)
21    # use pkg-config to get the directories and then use these values
22    # in the FIND_PATH() and FIND_LIBRARY() calls
23    INCLUDE(UsePkgConfig)
24    PKGCONFIG(libxslt _LibXsltIncDir _LibXsltLinkDir _LibXsltLinkFlags _LibXsltCflags)
25    SET(LIBXSLT_DEFINITIONS ${_LibXsltCflags})
26 ENDIF (NOT WIN32)
28 FIND_PATH(LIBXSLT_INCLUDE_DIR libxslt/xslt.h
29     ${_LibXsltIncDir}
30   )
32 FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt
33     PATHS
34     ${_LibXsltLinkDir}
35   )
37 INCLUDE(FindPackageHandleStandardArgs)
39 # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if 
40 # all listed variables are TRUE
41 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
44 MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES)