File: FindIConv.cmake

package info (click to toggle)
supercollider 1%3A3.13.0%2Brepack-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 80,304 kB
  • sloc: cpp: 476,363; lisp: 84,680; ansic: 77,685; sh: 25,509; python: 7,909; makefile: 3,440; perl: 1,964; javascript: 974; xml: 826; java: 677; yacc: 314; lex: 175; objc: 152; ruby: 136
file content (43 lines) | stat: -rw-r--r-- 1,233 bytes parent folder | download | duplicates (11)
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
40
41
42
43
# Find iconv library
#
# Author: Eddy Xu <eddyxu at gmail.com>
#
# Released under BSD license
#
#  ICONV_INCLUDE_DIRS   - where to find iconv.h, etc
#  ICONV_LIBRARIES      - Lists of libraries when using iconv
#  ICONV_FOUND          - True if iconv found


# Look for the header file
FIND_PATH( ICONV_INCLUDE_DIR NAMES iconv.h )
MARK_AS_ADVANCED( ICONV_INCLUDE_DIR )

# Look for the library
FIND_LIBRARY( ICONV_LIBRARY NAMES iconv )
MARK_AS_ADVANCED( ICONV_LIBRARY )

# Copy the result to output variables
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)
  SET(ICONV_FOUND 1)
  SET(ICONV_LIBRARIES ${ICONV_LIBRARY})
  SET(ICONV_INCLUDE_DIRS ${ICONV_INCLUDE_DIR})
ELSE(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)
  SET(ICONV_FOUND 0)
  SET(ICONV_LIBRARIES)
  SET(ICONV_INCLUDE_DIRS)
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)

# Report results
IF(NOT ICONV_FOUND)
  SET(ICONV_DIR_MESSAGE
    "Iconv was not found. Make sure ICONV_LIBRARY and ICONV_INCLUDE_DIR are
set.")
    IF(NOT ICONV_FIND_QUIETLY)
      MESSAGE(STATUS ${ICONV_DIR_MESSAGE})
    ELSE(NOT ICONV_FIND_QUIETLY)
      IF(ICONV_FIND_REQUIRED)
        MESSAGE(FETAL_ERROR ${ICONV_DIR_MESSAGE})
      ENDIF(ICONV_FIND_REQUIRED)
    ENDIF(NOT ICONV_FIND_QUIETLY)
ENDIF(NOT ICONV_FOUND)