File: FindCurses.cmake

package info (click to toggle)
cmake 2.4.5-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 16,804 kB
  • ctags: 18,861
  • sloc: cpp: 84,497; ansic: 84,379; yacc: 3,136; sh: 1,970; lex: 1,004; lisp: 119; makefile: 89; xml: 88; perl: 60; tcl: 55; python: 25; php: 25; ruby: 22; java: 20; f90: 19; fortran: 3
file content (56 lines) | stat: -rw-r--r-- 941 bytes parent folder | download
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
44
45
46
47
48
49
50
51
52
53
54
55
56
# - Find the curses include file and library
#

FIND_PATH(CURSES_INCLUDE_PATH 
  curses.h
  /usr/local/include 
  /usr/include
)

FIND_LIBRARY(CURSES_LIBRARY 
  NAMES curses ncurses
  PATHS 
    /usr/local/lib 
    /usr/lib 
    /lib
)

FIND_LIBRARY(CURSES_EXTRA_LIBRARY 
  cur_colr
  PATHS 
    /usr/local/lib 
    /usr/lib 
    /lib
)

FIND_LIBRARY(FORM_LIBRARY 
  form
  PATHS 
    /usr/local/lib 
    /usr/lib 
    /lib
)

# Need to provide the *_LIBRARIES
SET(CURSES_LIBRARIES ${CURSES_LIBRARY})

IF(CURSES_EXTRA_LIBRARY)
  SET(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_EXTRA_LIBRARY})
ENDIF(CURSES_EXTRA_LIBRARY)

IF(FORM_LIBRARY)
  SET(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${FORM_LIBRARY})
ENDIF(FORM_LIBRARY)

# Proper name is *_INCLUDE_DIR
SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})

MARK_AS_ADVANCED(
  CURSES_INCLUDE_PATH
  CURSES_LIBRARY
  CURSES_EXTRA_LIBRARY
  FORM_LIBRARY
  CURSES_LIBRARIES
  CURSES_INCLUDE_DIR
  )