diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fe705ee63da0590b55f28e30d6f29cf4c9b2d25..17355806ca87230eb88461de6d685758f0edc4cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,11 +26,8 @@ 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 OPENWRT_CROSSCOMPILING )
+IF( NOT (NO_TEST OR OPENWRT_CROSSCOMPILING) )
     add_subdirectory(test)
 ENDIF()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b097323301d1b1d1b0d1768b4efd22053695b804..05a3b7ff9f8996396ae8f7001bdc9eb238f3cc5f 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})