File: FindLIBIDN.cmake

package info (click to toggle)
ettercap 1%3A0.8.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,108 kB
  • sloc: ansic: 57,711; yacc: 313; lex: 204; makefile: 120; sh: 83; xml: 69
file content (31 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# - Try to find LIBIDN
# Find LIBIDN headers, libraries and the answer to all questions.
#
#  LIBIDN_FOUND               True if libidn got found
#  LIBIDN_INCLUDE_DIR        Location of libidn headers
#  LIBIDN_LIBRARIES           List of libaries to use libidn
#
# Copyright (c) 2009 Nigmatullin Ruslan <euroelessar@gmail.com>
#
#  Redistribution and use is allowed according to the terms of the New
#  BSD license.
#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#

if(WIN32)
  find_path(LIBIDN_INCLUDE_DIR stringprep.h $ENV{INCLUDE})
  find_library(LIBIDN_LIBRARIES libidn $ENV{LIB})
else()
  find_path(LIBIDN_INCLUDE_DIR stringprep.h)
  find_library(LIBIDN_LIBRARIES idn)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBIDN DEFAULT_MSG LIBIDN_LIBRARIES LIBIDN_INCLUDE_DIR)

if(LIBIDN_FOUND)
  set(LIBIDN_LIBRARY ${LIBIDN_LIBRARIES})
  set(LIBIDN_INCLUDE_DIRS ${LIBIDN_INCLUDE_DIR})
endif()

mark_as_advanced(LIBIDN_LIBRARIES LIBIDN_INCLUDE_DIRS)