summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorkutayboz <kutayboz@gmail.com>2023-06-03 04:18:33 +0300
committerkutayboz <kutayboz@gmail.com>2023-06-03 04:18:33 +0300
commit2374721c6840f56c07c31abcfddd6bd385d97d8b (patch)
tree356e47e92f88c842c145d78181cc645c93c247e1 /CMakeLists.txt
parent8eec887bad2b821079e15d653fbbe6d6ccaceaf2 (diff)
downloadcelnetmon-2374721c6840f56c07c31abcfddd6bd385d97d8b.tar.gz
Added GPIO control. Seperated functions into libs
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
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/)