Warning, /frameworks/kdelibs4support/cmake/modules/FindHUpnp.cmake is written in an unsupported language. File is not indexed.

0001 # - Try to find HUPnP library
0002 #  Once done this will define
0003 #
0004 #  HUPNP_FOUND - system has HUPnP
0005 #  HUPNP_INCLUDE_DIR - the LIBHUpnp include directory
0006 #  HUPNP_LIBS - the LIBHUpnp libraries
0007 #  HUPNP_VERSION_STRING - The version of HUpnp
0008 #  HUPNP_VERSION_MAJOR - The major version of HUpnp
0009 #  HUPNP_VERSION_MINOR - The minor version of HUpnp
0010 #  HUPNP_VERSION_PATCH - The patch version of HUpnp
0011 #
0012 # Copyright (c) 2010, Paulo Romulo Alves Barros <paulo.romulo@kdemail.net>
0013 
0014 # The minimum HUpnp version we require
0015 if(NOT HUpnp_FIND_VERSION)
0016     set(HUpnp_FIND_VERSION "0.9.1")
0017 endif()
0018 
0019 find_path( HUPNP_INCLUDE_DIR HUpnpCore/HUpnp )
0020 
0021 find_library( HUPNP_LIBS NAMES HUpnp HUpnp1 )
0022 
0023 if( HUPNP_INCLUDE_DIR AND EXISTS "${HUPNP_INCLUDE_DIR}/HUpnpCore/public/hupnpinfo.h" )
0024     file( STRINGS "${HUPNP_INCLUDE_DIR}/HUpnpCore/public/hupnpinfo.h" HUPNP_INFO_H REGEX "^#define HUPNP_CORE_.*_VERSION .*$" )
0025     string( REGEX REPLACE ".*HUPNP_CORE_MAJOR_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_MAJOR "${HUPNP_INFO_H}" )
0026     string( REGEX REPLACE ".*HUPNP_CORE_MINOR_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_MINOR "${HUPNP_INFO_H}" )
0027     string( REGEX REPLACE ".*HUPNP_CORE_PATCH_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_PATCH "${HUPNP_INFO_H}" )
0028 
0029     set( HUPNP_VERSION_STRING "${HUPNP_VERSION_MAJOR}.${HUPNP_VERSION_MINOR}.${HUPNP_VERSION_PATCH}" )
0030 endif()
0031 
0032 include( FindPackageHandleStandardArgs )
0033 find_package_handle_standard_args( HUpnp REQUIRED_VARS HUPNP_INCLUDE_DIR HUPNP_LIBS
0034                                          VERSION_VAR HUPNP_VERSION_STRING )
0035 
0036 mark_as_advanced( HUPNP_INCLUDE_DIR HUPNP_LIBS )