~ubuntu-branches/ubuntu/wily/weechat/wily

« back to all changes in this revision

Viewing changes to cmake/FindNcurses.cmake

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bouthenot
  • Date: 2014-09-28 17:41:10 UTC
  • mfrom: (29.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140928174110-bwlsn7gqmqfftnmb
Tags: 1.0.1-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# along with WeeChat.  If not, see <http://www.gnu.org/licenses/>.
18
18
#
19
19
 
20
 
IF(NCURSES_FOUND)
21
 
  SET(NCURSES_FIND_QUIETLY TRUE)
22
 
ENDIF(NCURSES_FOUND)
 
20
if(NCURSES_FOUND)
 
21
  set(NCURSES_FIND_QUIETLY TRUE)
 
22
endif()
23
23
 
24
 
FIND_PATH(NCURSES_INCLUDE_PATH
 
24
find_path(NCURSES_INCLUDE_PATH
25
25
  NAMES ncurses.h curses.h
26
26
  PATHS /usr/include/ncursesw /usr/include/ncurses /usr/include
27
27
  /usr/local/include/ncursesw /usr/local/include/ncurses /usr/local/include
28
28
  /usr/pkg/include/ncursesw /usr/pkg/include/ncurses /usr/pkg/include
29
29
)
30
30
 
31
 
FIND_LIBRARY(NCURSESW_LIBRARY
 
31
find_library(NCURSESW_LIBRARY
32
32
  NAMES ncursesw
33
33
  PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
34
34
)
35
35
 
36
 
IF (NCURSESW_LIBRARY)
37
 
  SET(NCURSES_LIBRARY ${NCURSESW_LIBRARY})
38
 
ELSE(NCURSESW_LIBRARY)
39
 
  FIND_LIBRARY(NCURSES_LIBRARY
 
36
if(NCURSESW_LIBRARY)
 
37
  set(NCURSES_LIBRARY ${NCURSESW_LIBRARY})
 
38
else()
 
39
  find_library(NCURSES_LIBRARY
40
40
    NAMES ncurses
41
41
    PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
42
42
  )
43
 
  IF (NCURSES_LIBRARY)
44
 
    MESSAGE("*** WARNING:\n"
 
43
  if(NCURSES_LIBRARY)
 
44
    message("*** WARNING:\n"
45
45
      "*** ncursesw library not found! Falling back to \"ncurses\"\n"
46
46
      "*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.")
47
 
  ENDIF(NCURSES_LIBRARY)
48
 
ENDIF(NCURSESW_LIBRARY)
49
 
 
50
 
IF (NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY)
51
 
  SET(NCURSES_FOUND TRUE)
52
 
ENDIF(NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY)
53
 
 
54
 
MARK_AS_ADVANCED(
 
47
  endif()
 
48
endif()
 
49
 
 
50
if(NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY)
 
51
  set(NCURSES_FOUND TRUE)
 
52
endif()
 
53
 
 
54
mark_as_advanced(
55
55
  NCURSES_INCLUDE_PATH
56
56
  NCURSES_LIBRARY
57
57
)