2016-10-16 21:13:18 +00:00
|
|
|
# - Try to find resolv
|
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# RESOLV_FOUND - system has resolv
|
|
|
|
# RESOLV_INCLUDES - the resolv include directory
|
2019-11-25 05:56:32 +00:00
|
|
|
# RESOLV_LIBRARIES - the libraries needed to use resolv
|
2016-10-16 21:13:18 +00:00
|
|
|
#
|
2020-01-28 18:56:52 +00:00
|
|
|
# Copyright (c) 2016-2020, Ivailo Monev, <xakepa10@gmail.com>
|
2016-10-16 21:13:18 +00:00
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
|
|
|
|
# resolv does not provide pkg-config files
|
|
|
|
|
|
|
|
find_path(RESOLV_INCLUDES
|
2020-02-10 21:21:33 +00:00
|
|
|
NAMES resolv.h
|
|
|
|
HINTS $ENV{RESOLVDIR}/include
|
2016-10-16 21:13:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
find_library(RESOLV_LIBRARIES
|
2020-02-10 21:21:33 +00:00
|
|
|
NAMES resolv c
|
|
|
|
HINTS $ENV{RESOLVDIR}/lib
|
2016-10-16 21:13:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2019-07-30 12:04:33 +00:00
|
|
|
find_package_handle_standard_args(Resolv
|
2019-12-25 18:29:33 +00:00
|
|
|
REQUIRED_VARS RESOLV_LIBRARIES RESOLV_INCLUDES
|
2019-07-30 12:04:33 +00:00
|
|
|
)
|
2016-10-16 21:13:18 +00:00
|
|
|
|
|
|
|
mark_as_advanced(RESOLV_INCLUDES RESOLV_LIBRARIES)
|