File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ # CMake module to search for iconv library
2+ #
3+ # If it's found it sets ICONV_FOUND to TRUE
4+ # and following variables are set:
5+ # ICONV_INCLUDE_DIR
6+ # ICONV_LIBRARY
7+
8+ # FIND_PATH and FIND_LIBRARY normally search standard locations
9+ # before the specified paths. To search non-standard paths first,
10+ # FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
11+ # and then again with no specified paths to search the default
12+ # locations. When an earlier FIND_* succeeds, subsequent FIND_*s
13+ # searching for the same item do nothing.
14+ FIND_PATH (ICONV_INCLUDE_DIR iconv.h
15+ "$ENV{LIB_DIR} /include"
16+ #mingw
17+ c:/msys/local/include
18+ NO_DEFAULT_PATH
19+ )
20+ FIND_PATH (ICONV_INCLUDE_DIR iconv.h)
21+
22+ FIND_LIBRARY (ICONV_LIBRARY NAMES iconv PATHS
23+ "$ENV{LIB_DIR} /lib"
24+ #mingw
25+ c:/msys/local/lib
26+ NO_DEFAULT_PATH
27+ )
28+
29+ IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARY)
30+ SET (ICONV_FOUND TRUE )
31+ ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARY)
32+
33+ IF (ICONV_FOUND)
34+ IF (NOT ICONV_FIND_QUIETLY)
35+ MESSAGE (STATUS "Found Iconv: ${ICONV_LIBRARY} " )
36+ ENDIF (NOT ICONV_FIND_QUIETLY)
37+ ELSE (ICONV_FOUND)
38+ IF (ICONV_FIND_REQUIRED)
39+ MESSAGE (FATAL_ERROR "Could not find Iconv" )
40+ ENDIF (ICONV_FIND_REQUIRED)
41+ ENDIF (ICONV_FOUND)
You can’t perform that action at this time.
0 commit comments