Skip to content
Snippets Groups Projects
Select Git revision
  • cd864a63a4a6803e992dc1a1578730931f238e4a
  • master default protected
  • deanonimzer
  • v2 protected
  • v1 protected
  • develop protected
6 results

ner_replacer.py

Blame
  • FindLibXML2.cmake 2.52 KiB
    # - Try to find libxml2
    # Once done this will define
    #
    #  LibXML2_FOUND - system has xml2
    #  LibXML2_INCLUDE_DIRS - the xml2 include directory
    #  LibXML2_LIBRARIES - Link these to use xml2
    #  LibXML2_DEFINITIONS - Compiler switches required for using xml2
    #
    #  Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
    #  Modified for other libraries by Lasse Kärkkäinen <tronic>
    #
    #  Redistribution and use is allowed according to the terms of the New
    #  BSD license.
    #  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
    #
    
    
    if (LibXML2_LIBRARIES AND LibXML2_INCLUDE_DIRS)
      # in cache already
      set(LibXML2_FOUND TRUE)
    else (LibXML2_LIBRARIES AND LibXML2_INCLUDE_DIRS)
      # use pkg-config to get the directories and then use these values
      # in the FIND_PATH() and FIND_LIBRARY() calls
      if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
        include(UsePkgConfig)
        pkgconfig(libxml-2.0 _LibXML2_INCLUDEDIR _LibXML2_LIBDIR _LibXML2_LDFLAGS _LibXML2_CFLAGS)
      else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
        find_package(PkgConfig)
        if (PKG_CONFIG_FOUND)
          pkg_check_modules(_LIBXML2 libxml-2.0)
        endif (PKG_CONFIG_FOUND)
      endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
      find_path(LibXML2_INCLUDE_DIR
        NAMES
          libxml/xpath.h
        PATHS
          ${_LibXML2_INCLUDEDIR}
          /usr/include
          /usr/local/include
          /opt/local/include
          /sw/include
        PATH_SUFFIXES
          libxml2
      )
      
      find_library(LibXML2_LIBRARY
        NAMES
          xml2
        PATHS
          ${_LibXML2_LIBDIR}
          /usr/lib
          /usr/local/lib
          /opt/local/lib
          /sw/lib
      )
    
      if (LibXML2_LIBRARY)
        set(LibXML2_FOUND TRUE)
      endif (LibXML2_LIBRARY)
    
      set(LibXML2_INCLUDE_DIRS
        ${LibXML2_INCLUDE_DIR}
      )
    
      if (LibXML2_FOUND)
        set(LibXML2_LIBRARIES
          ${LibXML2_LIBRARIES}
          ${LibXML2_LIBRARY}
        )
      endif (LibXML2_FOUND)