I’m new to both CMake and the Torizoncore in VScode.
I’m trying to create an application to receive via udp and deserialize a bitstream and relay to the uart port.
I’m using the libraries:
Ncurses, Boost and libserial.
Here’s is my CMakeLists.txt
cmake_minimum_required (VERSION 2.8)
project (gnsspvt-monitor-uart CXX C)
set (CMAKE_CXX_STANDARD 11)
include_directories(${CMAKE_SOURCE_DIR})
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
set(CURSES_NEED_NCURSES TRUE)
set(Curses_NO_SYSTEM_PATHS TRUE)
set(CURSES_USE_MULTITHREADED ON)
find_package(CURSES REQUIRED)
include_directories(${CURSES_INCLUDE_DIRS})
find_package(LIBSERIAL REQUIRED)
add_library(monitoring_lib ${CMAKE_SOURCE_DIR}/monitor_pvt_udp_source.cc)
add_executable(gnsspvt-monitor-uart ${CMAKE_SOURCE_DIR}/main.cc)
target_include_directories(gnsspvt-monitor-uart PRIVATE Boost::headers Boost::asio Boost::filesystem
Boost::system Boost::serialization)
target_link_libraries(gnsspvt-monitor-uart monitoring_lib ${Boost_LIBRARIES} ${LIBSERIAL_LIBRARIES} ${CURSES_LIBRARIES})
target_link_libraries(gnsspvt-monitor-uart -lpthread -lserial)
And the Error msg:
in devpackage: libserial-dev:#%platform.debian-arch%# libboost-all-dev:#%platform.debian-arch%# libncurses-dev:#%platform.debian-arch%# ncurses-libmenu:#%platform.debian-arch%# ncurses-libform:#%platform.debian-arch%# libboost1.74-dev:arm64
in extrapackage: libncurses-dev libboost-all-dev libboost-dev libboost-system-dev libprotobuf-dev libncurses5-dev libserial1
Question 1: How do i add the curses library and the libserial, build and run in the torizoncore?
Question 2: How do i run the code as debug mode with CMake? i’ve tried but received a error msg: Error Executing preLaunchTask.