File: FindLibIDN.cmake

package info (click to toggle)
ettercap 1:0.8.2-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,468 kB
  • ctags: 6,333
  • sloc: ansic: 47,337; yacc: 310; lex: 204; makefile: 121; xml: 31; sh: 24
file content (28 lines) | stat: -rw-r--r-- 977 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
# - 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(WIN32)
   FIND_PATH(LIBIDN_INCLUDE_DIR stringprep.h)
   FIND_LIBRARY(LIBIDN_LIBRARIES idn)
endif(WIN32)

if(LIBIDN_LIBRARIES AND LIBIDN_INCLUDE_DIR)
   message(STATUS "Found libidn: ${LIBIDN_LIBRARIES}")
   set(LIBIDN_FOUND true)
else(LIBIDN_LIBRARIES AND LIBIDN_INCLUDE_DIR)
   message(STATUS "Could NOT find libidn")
endif(LIBIDN_LIBRARIES AND LIBIDN_INCLUDE_DIR)