[cmake] add ncurses dependency (#4971)

This is required on OpenWRT.
This commit is contained in:
Yakun Xu
2020-05-18 09:36:55 -07:00
committed by GitHub
parent 132ba9d3fb
commit 7d1934202f
5 changed files with 19 additions and 6 deletions
+4 -2
View File
@@ -76,7 +76,7 @@ jobs:
- name: Bootstrap
run: |
sudo apt update
sudo apt --no-install-recommends install -y ninja-build
sudo apt --no-install-recommends install -y ninja-build libreadline-dev libncurses-dev
- name: Package
run: |
script/test package
@@ -147,7 +147,7 @@ jobs:
- name: Bootstrap
run: |
sudo apt update
sudo apt --no-install-recommends install -y gcc-${{ matrix.gcc_ver }} g++-${{ matrix.gcc_ver }} ninja-build
sudo apt --no-install-recommends install -y gcc-${{ matrix.gcc_ver }} g++-${{ matrix.gcc_ver }} ninja-build libreadline-dev libncurses-dev
- name: Build
run: |
script/check-simulation-build
@@ -169,8 +169,10 @@ jobs:
- uses: actions/checkout@v2
- name: Bootstrap
run: |
sudo dpkg --add-architecture i386
sudo apt update
sudo apt --no-install-recommends install -y clang-${{ matrix.clang_ver }} clang++-${{ matrix.clang_ver }} g++-multilib ninja-build
sudo apt --no-install-recommends install -y libreadline-dev:i386 libncurses-dev:i386
- name: Build
run: |
script/check-posix-build
+2 -2
View File
@@ -148,7 +148,7 @@ jobs:
- uses: actions/checkout@v2
- name: Bootstrap
run: |
sudo apt --no-install-recommends install -y expect ninja-build
OT_OPTIONS=-DOT_READLINE=OFF sudo apt --no-install-recommends install -y expect ninja-build
- name: Run
run: |
./script/test build expect
@@ -156,7 +156,7 @@ jobs:
uses: codecov/codecov-action@v1
- name: Run RCP Mode
run: |
VIRTUAL_TIME=0 NODE_MODE=rcp ./script/test clean build expect
OT_OPTIONS=-DOT_READLINE=OFF VIRTUAL_TIME=0 NODE_MODE=rcp ./script/test clean build expect
- name: Codecov
uses: codecov/codecov-action@v1
+11
View File
@@ -39,6 +39,17 @@ set_property(CACHE OT_READLINE PROPERTY STRINGS "readline" "edit" "no")
if(OT_READLINE)
find_library(READLINE ${OT_READLINE})
if (NOT READLINE)
message(FATAL_ERROR "Failed to find ${OT_READLINE}")
endif()
find_library(NCURSES ncurses)
if (NOT NCURSES)
message(FATAL_ERROR "Failed to find ncurses")
endif()
list(APPEND READLINE_LINK_LIBRARIES "${READLINE}" "${NCURSES}")
endif()
if(OT_DAEMON)
+1 -1
View File
@@ -79,7 +79,7 @@ target_compile_options(ot-ctl PRIVATE
target_link_libraries(ot-ctl
openthread-platform
$<$<BOOL:${READLINE}>:${OT_READLINE}>
${READLINE_LINK_LIBRARIES}
)
target_include_directories(ot-ctl PRIVATE ${COMMON_INCLUDES})
+1 -1
View File
@@ -57,7 +57,7 @@ target_link_libraries(ot-cli
${OT_PLATFORM_LIB}
mbedcrypto
openthread-ncp-ftd
$<$<BOOL:${READLINE}>:${OT_READLINE}>
${READLINE_LINK_LIBRARIES}
)
add_executable(ot-ncp