(ref #215) fix libedit include pathes
This commit is contained in:
parent
9b226afd1f
commit
90542fad8b
|
@ -4,8 +4,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/contrib/10.rea
|
||||||
|
|
||||||
find_package(Libedit)
|
find_package(Libedit)
|
||||||
if (Libedit_FOUND)
|
if (Libedit_FOUND)
|
||||||
add_definitions(${Libedit_DEFINITIONS} -DPIC_READLINE_FOUND=1)
|
add_definitions(${Libedit_DEFINITIONS} -DPIC_READLINE_FOUND=1 -DPIC_READLINE_INCLUDE_DIR_SUFFIX=${Libedit_INCLUDE_DIR_SUFFIX})
|
||||||
add_definitions(${Libedit_DEFINITIONS} -DPIC_READLINE_INCLUDE_DIR_SUFFIX=${Libedit_INCLUDE_DIR_SUFFIX})
|
|
||||||
include_directories(${Libedit_INCLUDE_DIR})
|
include_directories(${Libedit_INCLUDE_DIR})
|
||||||
|
|
||||||
file(GLOB PICRIN_READLINE_SOURCES ${PROJECT_SOURCE_DIR}/contrib/10.readline/src/*.c)
|
file(GLOB PICRIN_READLINE_SOURCES ${PROJECT_SOURCE_DIR}/contrib/10.readline/src/*.c)
|
||||||
|
@ -15,4 +14,4 @@ if (Libedit_FOUND)
|
||||||
list(APPEND PICRIN_CONTRIB_SOURCES ${PICRIN_READLINE_SOURCES})
|
list(APPEND PICRIN_CONTRIB_SOURCES ${PICRIN_READLINE_SOURCES})
|
||||||
add_custom_target(test-readline for test in ${PROJECT_SOURCE_DIR}/contrib/10.readline/t/*.scm \; do bin/picrin "$$test" \; done DEPENDS repl)
|
add_custom_target(test-readline for test in ${PROJECT_SOURCE_DIR}/contrib/10.readline/t/*.scm \; do bin/picrin "$$test" \; done DEPENDS repl)
|
||||||
set(CONTRIB_TESTS ${CONTRIB_TESTS} test-readline)
|
set(CONTRIB_TESTS ${CONTRIB_TESTS} test-readline)
|
||||||
endif()
|
endif(Libedit_FOUND)
|
||||||
|
|
|
@ -32,16 +32,14 @@ else (Libedit_LIBRARIES AND Libedit_INCLUDE_DIRS)
|
||||||
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||||
find_path(Libedit_EDITLINE_INCLUDE_DIR
|
find_path(Libedit_EDITLINE_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
readline.h
|
editline/readline.h
|
||||||
history.h
|
editline/history.h
|
||||||
PATHS
|
PATHS
|
||||||
${_Libedit_INCLUDEDIR}
|
${_Libedit_INCLUDEDIR}
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
/sw/include
|
/sw/include
|
||||||
PATH_SUFFIXES
|
|
||||||
editline
|
|
||||||
)
|
)
|
||||||
if (Libedit_EDITLINE_INCLUDE_DIR)
|
if (Libedit_EDITLINE_INCLUDE_DIR)
|
||||||
set(Libedit_INCLUDE_DIR_SUFFIX editline)
|
set(Libedit_INCLUDE_DIR_SUFFIX editline)
|
||||||
|
@ -49,15 +47,13 @@ else (Libedit_LIBRARIES AND Libedit_INCLUDE_DIRS)
|
||||||
else (Libedit_EDITLINE_INCLUDE_DIR)
|
else (Libedit_EDITLINE_INCLUDE_DIR)
|
||||||
find_path(Libedit_READLINE_INCLUDE_DIR
|
find_path(Libedit_READLINE_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
readline.h
|
readline/readline.h
|
||||||
history.h
|
readline/history.h
|
||||||
PATHS
|
PATHS
|
||||||
/usr/include/edit
|
/usr/include/edit
|
||||||
/usr/local/include/edit
|
/usr/local/include/edit
|
||||||
/opt/local/include/edit
|
/opt/local/include/edit
|
||||||
/sw/include/edit
|
/sw/include/edit
|
||||||
PATH_SUFFIXES
|
|
||||||
readline
|
|
||||||
)
|
)
|
||||||
if (Libedit_READLINE_INCLUDE_DIR)
|
if (Libedit_READLINE_INCLUDE_DIR)
|
||||||
set(Libedit_INCLUDE_DIR_SUFFIX readline)
|
set(Libedit_INCLUDE_DIR_SUFFIX readline)
|
||||||
|
@ -97,7 +93,7 @@ else (Libedit_LIBRARIES AND Libedit_INCLUDE_DIRS)
|
||||||
|
|
||||||
if (Libedit_FOUND)
|
if (Libedit_FOUND)
|
||||||
if (NOT Libedit_FIND_QUIETLY)
|
if (NOT Libedit_FIND_QUIETLY)
|
||||||
message(STATUS "Found libedit: ${Libedit_LIBRARY}")
|
message(STATUS "Found libedit: ${Libedit_LIBRARY}, ${Libedit_INCLUDE_DIR}")
|
||||||
endif (NOT Libedit_FIND_QUIETLY)
|
endif (NOT Libedit_FIND_QUIETLY)
|
||||||
else (Libedit_FOUND)
|
else (Libedit_FOUND)
|
||||||
if (Libedit_FIND_REQUIRED)
|
if (Libedit_FIND_REQUIRED)
|
||||||
|
|
Loading…
Reference in New Issue