Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
cmake/Modules/FindLibEdit.cmake
Show All 15 Lines | |||||
find_package(PkgConfig QUIET) | find_package(PkgConfig QUIET) | ||||
pkg_check_modules(PC_LIBEDIT QUIET libedit) | pkg_check_modules(PC_LIBEDIT QUIET libedit) | ||||
find_path(LibEdit_INCLUDE_DIRS NAMES histedit.h HINTS ${PC_LIBEDIT_INCLUDE_DIRS}) | find_path(LibEdit_INCLUDE_DIRS NAMES histedit.h HINTS ${PC_LIBEDIT_INCLUDE_DIRS}) | ||||
find_library(LibEdit_LIBRARIES NAMES edit HINTS ${PC_LIBEDIT_LIBRARY_DIRS}) | find_library(LibEdit_LIBRARIES NAMES edit HINTS ${PC_LIBEDIT_LIBRARY_DIRS}) | ||||
include(CheckIncludeFile) | include(CheckIncludeFile) | ||||
if(LibEdit_INCLUDE_DIRS AND EXISTS "${LibEdit_INCLUDE_DIRS}/histedit.h") | if(LibEdit_INCLUDE_DIRS AND EXISTS "${LibEdit_INCLUDE_DIRS}/histedit.h") | ||||
include(CMakePushCheckState) | |||||
cmake_push_check_state() | cmake_push_check_state() | ||||
list(APPEND CMAKE_REQUIRED_INCLUDES ${LibEdit_INCLUDE_DIRS}) | list(APPEND CMAKE_REQUIRED_INCLUDES ${LibEdit_INCLUDE_DIRS}) | ||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LibEdit_LIBRARIES}) | list(APPEND CMAKE_REQUIRED_LIBRARIES ${LibEdit_LIBRARIES}) | ||||
check_include_file(histedit.h HAVE_HISTEDIT_H) | check_include_file(histedit.h HAVE_HISTEDIT_H) | ||||
cmake_pop_check_state() | cmake_pop_check_state() | ||||
if (HAVE_HISTEDIT_H) | if (HAVE_HISTEDIT_H) | ||||
file(STRINGS "${LibEdit_INCLUDE_DIRS}/histedit.h" | file(STRINGS "${LibEdit_INCLUDE_DIRS}/histedit.h" | ||||
libedit_major_version_str | libedit_major_version_str | ||||
Show All 34 Lines |