Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to conditionally build manual selector node #397

Merged
merged 2 commits into from
Jun 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ option(BUILD_SAMPLES "Build sample nodes" ON)
option(BUILD_UNIT_TESTS "Build the unit tests" ON)
option(BUILD_TOOLS "Build commandline tools" ON)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(BUILD_MANUAL_SELECTOR "Build manual selector node" ON)
option(ENABLE_COROUTINES "Enable boost coroutines" ON)

#---- Include boost to add coroutines ----
Expand Down Expand Up @@ -166,14 +167,17 @@ list(APPEND BT_SOURCE
3rdparty/minitrace/minitrace.cpp
)

find_package(Curses QUIET)

if(CURSES_FOUND)
list(APPEND BT_SOURCE
src/controls/manual_node.cpp
)
list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES ${CURSES_LIBRARIES})
add_definitions(-DNCURSES_FOUND)
if(BUILD_MANUAL_SELECTOR)
find_package(Curses QUIET)
if(CURSES_FOUND)
list(APPEND BT_SOURCE
src/controls/manual_node.cpp
)
list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES ${CURSES_LIBRARIES})
add_definitions(-DNCURSES_FOUND)
else()
message(WARNING "NCurses NOT found. Skipping the build of manual selector node.")
endif()
endif()


Expand Down