github的一些开源项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.3 KiB

  1. # from http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/FindReadline.cmake
  2. # http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/COPYING-CMAKE-SCRIPTS
  3. # --> BSD licensed
  4. #
  5. # GNU Readline library finder
  6. if(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
  7. set(READLINE_FOUND TRUE)
  8. else(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
  9. FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h
  10. /usr/include/readline
  11. )
  12. # 2008-04-22 The next clause used to read like this:
  13. #
  14. # FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
  15. # FIND_LIBRARY(NCURSES_LIBRARY NAMES ncurses )
  16. # include(FindPackageHandleStandardArgs)
  17. # FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG NCURSES_LIBRARY READLINE_INCLUDE_DIR READLINE_LIBRARY )
  18. #
  19. # I was advised to modify it such that it will find an ncurses library if
  20. # required, but not if one was explicitly given, that is, it allows the
  21. # default to be overridden. PH
  22. FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
  23. include(FindPackageHandleStandardArgs)
  24. FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARY )
  25. MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
  26. endif(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)