From 2374721c6840f56c07c31abcfddd6bd385d97d8b Mon Sep 17 00:00:00 2001 From: kutayboz Date: Sat, 3 Jun 2023 04:18:33 +0300 Subject: Added GPIO control. Seperated functions into libs --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a9a7334..c2bf1ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,4 +8,12 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g -O0") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O2") add_executable(network_monitor ./src/main.c) +add_library(gpio STATIC ./src/gpio.c ./include/gpio.h) +target_link_libraries(gpio gpiod) + +add_library(serial STATIC ./src/serial.c ./include/serial.h) + +target_include_directories(network_monitor PUBLIC ./include) +target_link_libraries(network_monitor gpio serial) + install(TARGETS network_monitor DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/bin/) -- cgit v1.3