mirror of https://github.com/mgba-emu/mgba.git
Detect libedit
This commit is contained in:
parent
4fe48ad820
commit
e88aed2597
|
@ -70,13 +70,17 @@ endif()
|
|||
|
||||
set(DEBUGGER_SRC "${CMAKE_SOURCE_DIR}/src/debugger/debugger.c;${CMAKE_SOURCE_DIR}/src/debugger/memory-debugger.c")
|
||||
|
||||
if(USE_CLI_DEBUGGER AND NOT WIN32)
|
||||
# Win32 doesn't have a usable command line, nor libedit, so this is useless on Windows
|
||||
add_definitions(-DUSE_CLI_DEBUGGER)
|
||||
list(APPEND DEBUGGER_SRC "${CMAKE_SOURCE_DIR}/src/debugger/cli-debugger.c")
|
||||
list(APPEND DEBUGGER_SRC "${CMAKE_SOURCE_DIR}/src/debugger/parser.c")
|
||||
pkg_search_module(EDIT libedit REQUIRED)
|
||||
set(DEBUGGER_LIB ${EDIT_LIBRARIES})
|
||||
if(USE_CLI_DEBUGGER)
|
||||
pkg_search_module(EDIT libedit)
|
||||
if(EDIT_FOUND)
|
||||
add_definitions(-DUSE_CLI_DEBUGGER)
|
||||
list(APPEND DEBUGGER_SRC "${CMAKE_SOURCE_DIR}/src/debugger/cli-debugger.c")
|
||||
list(APPEND DEBUGGER_SRC "${CMAKE_SOURCE_DIR}/src/debugger/parser.c")
|
||||
set(DEBUGGER_LIB ${EDIT_LIBRARIES})
|
||||
else()
|
||||
message(WARNING "Could not find libedit for CLI debugger support")
|
||||
set(USE_CLI_DEBUGGER OFF)
|
||||
endif()
|
||||
else()
|
||||
set(DEBUGGER_LIB "")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue