File: FindLibIDN.cmake

package info (click to toggle)
jreen 1.2.0%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,932 kB
  • sloc: cpp: 31,281; makefile: 14
file content (28 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (5)
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( )
	FIND_PATH( LIBIDN_INCLUDE_DIR stringprep.h )
	FIND_LIBRARY( LIBIDN_LIBRARIES idn )
endif( )

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 )