From 0c242b0703bc45be784de00defde2322528b22dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20De=20Keersmaeker?= <francois.dekeersmaeker@uclouvain.be> Date: Tue, 13 Aug 2024 14:34:47 +0000 Subject: [PATCH] Updated CMake config --- CMakeLists.txt | 3 --- src/CMakeLists.txt | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a74d5cc..1735580 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,9 +26,6 @@ add_compile_options(-Wall -Werror -Wno-unused-variable -O3) # Producti #add_compile_options(-Wall -Werror -Wno-unused-variable -g) # Without debug logging #add_compile_options(-Wall -Werror -Wno-unused-variable -DDEBUG -g) # With debug logging -# Custom parsers -set(PARSERS header dns dhcp http igmp ssdp coap) - # Subdirectories containing code add_subdirectory(src) IF( NOT (NO_TEST OR OPENWRT_CROSSCOMPILING) ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b097323..05a3b7f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,32 +22,36 @@ install(TARGETS packet_utils DESTINATION ${LIB_DIR}) add_library(header STATIC ${INCLUDE_DIR}/header.h header.c) target_include_directories(header PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR}) target_link_libraries(header packet_utils) +install(TARGETS header DESTINATION ${LIB_DIR}) # DNS parser add_library(dns STATIC ${INCLUDE_DIR}/dns.h dns.c) target_include_directories(dns PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR}) target_link_libraries(dns packet_utils dns_map) +install(TARGETS dns DESTINATION ${LIB_DIR}) # DHCP parser add_library(dhcp STATIC ${INCLUDE_DIR}/dhcp.h dhcp.c) target_include_directories(dhcp PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR}) +install(TARGETS dhcp DESTINATION ${LIB_DIR}) # HTTP parser add_library(http STATIC ${INCLUDE_DIR}/http.h http.c) target_include_directories(http PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR}) +install(TARGETS http DESTINATION ${LIB_DIR}) # IGMP parser add_library(igmp STATIC ${INCLUDE_DIR}/igmp.h igmp.c) target_include_directories(igmp PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR}) +install(TARGETS igmp DESTINATION ${LIB_DIR}) # SSDP parser add_library(ssdp STATIC ${INCLUDE_DIR}/ssdp.h ssdp.c) target_include_directories(ssdp PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR}) +install(TARGETS ssdp DESTINATION ${LIB_DIR}) # CoAP parser add_library(coap STATIC ${INCLUDE_DIR}/coap.h coap.c) target_include_directories(coap PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR}) target_link_libraries(coap http) +install(TARGETS coap DESTINATION ${LIB_DIR}) # DNS map add_library(dns_map STATIC ${INCLUDE_DIR}/dns_map.h dns_map.c) target_link_libraries(dns_map hashmap) target_include_directories(dns_map PRIVATE ${INCLUDE_DIR}) install(TARGETS dns_map DESTINATION ${LIB_DIR}) - -# Installation -install(TARGETS ${PARSERS} DESTINATION ${LIB_DIR}) -- GitLab