mirror of
https://github.com/digarok/gsplus.git
synced 2024-05-28 13:41:31 +00:00
auto-select readline library by default.
This commit is contained in:
parent
817792f94d
commit
f9a86eed8a
|
@ -48,7 +48,7 @@ option(WITH_HOST_FST "Enable host fst support" ON)
|
|||
option(TOGGLE_STATUS "Enable F10 Toggle Status support (win32/x11)" OFF)
|
||||
option(WITH_RAWNET "Enable Uthernet emulation" OFF)
|
||||
option(WITH_ATBRIDGE "Enable AT Bridge" OFF)
|
||||
set(READLINE "NONE" CACHE STRING "Readline library (NONE, READLINE, LIBEDIT")
|
||||
set(READLINE "AUTO" CACHE STRING "Readline library (AUTO, NONE, READLINE, LIBEDIT)")
|
||||
|
||||
set(generated_headers 8inst_c.h 16inst_c.h 8inst_s.h 16inst_s.h size_c.h size_s.h 8size_s.h 16size_s.h)
|
||||
add_custom_command(
|
||||
|
@ -155,6 +155,14 @@ endif()
|
|||
# SET_SOURCE_FILES_PROPERTIES(vmnet_helper PROPERTIES MACOSX_PACKAGE_LOCATION MacOS)
|
||||
|
||||
add_library(x_readline readline.c)
|
||||
if (READLINE MATCHES "AUTO")
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD|OpenBSD|NetBSD)")
|
||||
set(READLINE "LIBEDIT")
|
||||
endif()
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
set(READLINE "READLINE")
|
||||
endif()
|
||||
endif()
|
||||
if(READLINE MATCHES "READLINE")
|
||||
target_compile_definitions(x_readline PRIVATE USE_READLINE)
|
||||
target_link_libraries(x_readline PUBLIC history readline)
|
||||
|
|
Loading…
Reference in New Issue
Block a user