File: FindLIBICONV.cmake

package info (click to toggle)
insighttoolkit4 4.13.3withdata-dfsg2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 491,256 kB
  • sloc: cpp: 557,600; ansic: 180,546; fortran: 34,788; python: 16,572; sh: 2,187; lisp: 2,070; tcl: 993; java: 362; perl: 200; makefile: 133; csh: 81; pascal: 69; xml: 19; ruby: 10
file content (39 lines) | stat: -rw-r--r-- 1,095 bytes parent folder | download | duplicates (9)
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
32
33
34
35
36
37
38
39
# Find iconv library
#
# Released under BSD license
#
#  LIBICONV_INCLUDE_DIRS - where to find iconv.h, etc
#  LIBICONV_LIBRARIES    - Lists of libraries when using iconv
#  LIBICONV_FOUND        - True if iconv found

INCLUDE(FindPackageHandleStandardArgs)

# Look for the header file
if(NOT LIBICONV_INCLUDE_DIR)
  FIND_PATH(LIBICONV_INCLUDE_DIR NAMES iconv.h)
endif()
MARK_AS_ADVANCED(LIBICONV_INCLUDE_DIR)

# Look for the library
SET(LIBICONV_LIBS iconv)

if(NOT LIBICONV_LIBRARY)
  FIND_LIBRARY(LIBICONV_LIBRARY NAMES ${LIBICONV_LIBS})
endif()
MARK_AS_ADVANCED(LIBICONV_LIBRARY)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBICONV REQUIRED_VARS LIBICONV_LIBRARY LIBICONV_INCLUDE_DIR)

# Copy the result to output variables
IF(LIBICONV_FOUND)
  SET(LIBICONV_LIBRARIES ${LIBICONV_LIBRARY})
  SET(LIBICONV_INCLUDE_DIRS ${LIBICONV_INCLUDE_DIR})
  include_directories(${LIBICONV_INCLUDE_DIR})
  link_directories(${LIBICONV_LIBDIR})
ELSE(LIBICONV_FOUND)
  SET(LIBICONV_LIBS)
  SET(LIBICONV_LIBRARY)
  SET(LIBICONV_LIBRARIES)
  SET(LIBICONV_INCLUDE_DIR)
  SET(LIBICONV_INCLUDE_DIRS)
ENDIF(LIBICONV_FOUND)