Debian Codegraph @

cmake_modules/FindNUTClient.cmake

raw
1 # - Try to find nutclient library (version 2) and include files
2 # Once done this will define
3 #
4 # NUTCLIENT_FOUND - system has NUTCLIENT
5 # NUTCLIENT_INCLUDE_DIR - the NUTCLIENT include directory
6 # NUTCLIENT_LIBRARIES - Link these to use NUTCLIENT
7
8 # Redistribution and use is allowed according to the terms of the BSD license.
9 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
10
11 if (NUTCLIENT_INCLUDE_DIR AND NUTCLIENT_LIBRARIES)
12
13 # in cache already
14 set(NUTCLIENT_FOUND TRUE)
15 message(STATUS "Found libnutclient: ${NUTCLIENT_LIBRARIES}")
16
17 else (NUTCLIENT_INCLUDE_DIR AND NUTCLIENT_LIBRARIES)
18
19 find_path(NUTCLIENT_INCLUDE_DIR nutclient.h
20 PATH_SUFFIXES nutclient
21 ${_obIncDir}
22 ${GNUWIN32_DIR}/include
23 )
24
25 find_library(NUTCLIENT_LIBRARIES NAMES nutclient
26 PATHS
27 ${_obLinkDir}
28 ${GNUWIN32_DIR}/lib
29 )
30
31 if(NUTCLIENT_INCLUDE_DIR AND NUTCLIENT_LIBRARIES)
32 set(NUTCLIENT_FOUND TRUE)
33 else (NUTCLIENT_INCLUDE_DIR AND NUTCLIENT_LIBRARIES)
34 set(NUTCLIENT_FOUND FALSE)
35 endif(NUTCLIENT_INCLUDE_DIR AND NUTCLIENT_LIBRARIES)
36
37
38 if (NUTCLIENT_FOUND)
39 if (NOT NUTCLIENT_FIND_QUIETLY)
40 message(STATUS "Found NUTCLIENT: ${NUTCLIENT_LIBRARIES}")
41 endif (NOT NUTCLIENT_FIND_QUIETLY)
42 else (NUTCLIENT_FOUND)
43 if (NUTCLIENT_FIND_REQUIRED)
44 message(FATAL_ERROR "NUTCLIENT not found. Please install libnutclient development package.")
45 endif (NUTCLIENT_FIND_REQUIRED)
46 endif (NUTCLIENT_FOUND)
47
48 mark_as_advanced(NUTCLIENT_INCLUDE_DIR NUTCLIENT_LIBRARIES)
49
50 endif (NUTCLIENT_INCLUDE_DIR AND NUTCLIENT_LIBRARIES)