File: FindREADLINE.cmake

package info (click to toggle)
fluidsynth 2.1.7-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,052 kB
  • sloc: ansic: 39,171; xml: 706; cpp: 151; sh: 46; makefile: 21
file content (22 lines) | stat: -rw-r--r-- 925 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Try to find the READLINE library
#  HAVE_READLINE - system has READLINE
#  READLINE_INCLUDE_DIR - READLINE include directory
#  READLINE_LIBRARIES - Libraries needed to use READLINE

if ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )
    set ( READLINE_FIND_QUIETLY TRUE )
endif ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )

find_path ( READLINE_INCLUDE_DIR NAMES history.h readline/history.h )
find_library ( READLINE_LIBRARIES NAMES readline )

if ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )
    set ( HAVE_READLINE TRUE CACHE BOOL "Found readline header and lib" FORCE )
endif ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )

include ( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( READLINE DEFAULT_MSG 
                                   READLINE_INCLUDE_DIR 
                                   READLINE_LIBRARIES )

mark_as_advanced( READLINE_INCLUDE_DIR READLINE_LIBRARIES HAVE_READLINE )