2016-11-05 00:06:43 +00:00
|
|
|
# - Try to find NSL
|
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# NSL_FOUND - system has NSL
|
|
|
|
# NSL_INCLUDES - the NSL include directory
|
2019-11-25 05:56:32 +00:00
|
|
|
# NSL_LIBRARIES - the libraries needed to use NSL
|
2016-11-05 00:06:43 +00:00
|
|
|
#
|
2019-05-13 00:59:14 +00:00
|
|
|
# Copyright (c) 2016-2019, Ivailo Monev, <xakepa10@gmail.com>
|
2016-11-05 00:06:43 +00:00
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
|
|
|
|
if(NSL_INCLUDES AND NSL_LIBRARIES)
|
|
|
|
set(NSL_FIND_QUIETLY TRUE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# NSL does not provide pkg-config files
|
|
|
|
|
|
|
|
find_path(NSL_INCLUDES
|
|
|
|
NAMES
|
|
|
|
rpcsvc/ypclnt.h
|
|
|
|
HINTS
|
|
|
|
$ENV{NSLDIR}/include
|
|
|
|
${INCLUDE_INSTALL_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
find_library(NSL_LIBRARIES
|
|
|
|
NAMES
|
|
|
|
nsl c
|
|
|
|
HINTS
|
|
|
|
$ENV{NSLDIR}/lib
|
|
|
|
${LIB_INSTALL_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2019-07-30 12:04:33 +00:00
|
|
|
find_package_handle_standard_args(NSL
|
|
|
|
REQUIRED_VARS NSL_INCLUDES NSL_LIBRARIES
|
|
|
|
)
|
2016-11-05 00:06:43 +00:00
|
|
|
|
|
|
|
mark_as_advanced(NSL_INCLUDES NSL_LIBRARIES)
|