### PLUGIN

add_library(http src/http_entry.cpp src/http_half.cpp src/http_convert.cpp)
target_include_directories(http PRIVATE include/internal)
target_include_directories(http PUBLIC incluce/external)

target_link_libraries(http common)
target_link_libraries(http http-parser-static)
target_link_libraries(http libevent-static)
target_link_libraries(http z)
target_link_libraries(http brotlienc-static brotlidec-static)
target_link_libraries(http MESA_prof_load)

### UNITTEST CASE
add_executable(test-http-half test/test_http_half.cpp)
target_include_directories(test-http-half PRIVATE include/internal)
target_link_libraries(test-http-half gtest common http)

add_executable(test-http-convert test/test_http_convert.cpp)
target_include_directories(test-http-convert PRIVATE include/internal)
target_link_libraries(test-http-convert gtest common http)

add_executable(test-http-entry test/test_http_convert.cpp)
target_include_directories(test-http-entry PRIVATE include/internal)
target_link_libraries(test-http-entry gtest common http)

include(GoogleTest)
gtest_discover_tests(test-http-half)
gtest_discover_tests(test-http-convert)
gtest_discover_tests(test-http-entry)
