summaryrefslogtreecommitdiff
path: root/decoders/http/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'decoders/http/CMakeLists.txt')
-rw-r--r--decoders/http/CMakeLists.txt20
1 files changed, 12 insertions, 8 deletions
diff --git a/decoders/http/CMakeLists.txt b/decoders/http/CMakeLists.txt
index 7e49755..9a278d2 100644
--- a/decoders/http/CMakeLists.txt
+++ b/decoders/http/CMakeLists.txt
@@ -1,14 +1,18 @@
add_definitions(-fPIC)
+include_directories(${CMAKE_BINARY_DIR}/vendor/llhttp/include)
+include_directories(${CMAKE_BINARY_DIR}/vendor/brotli/include)
+include_directories(${CMAKE_SOURCE_DIR}/deps)
-set(HTTP_SRC ${DEPS_SRC} http_decoder.cpp http_decoder_utils.cpp http_decoder_half.cpp
+set(HTTP_SRC http_decoder.cpp http_decoder_utils.cpp http_decoder_half.cpp
http_decoder_table.cpp http_decoder_string.cpp http_content_decompress.cpp
http_decoder_result_queue.cpp http_decoder_stat.cpp http_decoder_tunnel.cpp)
-add_library(http_decoder STATIC ${HTTP_SRC})
-set_target_properties(http_decoder PROPERTIES LINK_FLAGS "-Wl,--version-script=${PROJECT_SOURCE_DIR}/src/version.map")
-target_include_directories(http_decoder PUBLIC ${CMAKE_SOURCE_DIR}/deps/)
-target_link_libraries(http_decoder z llhttp-static fieldstat4)
-target_link_libraries(http_decoder brotli-dec-static brotli-common-static )
-set_target_properties(http_decoder PROPERTIES PREFIX "")
+add_library(http STATIC ${HTTP_SRC})
+add_library(http_dyn SHARED ${HTTP_SRC})
+set_target_properties(http PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/version.map")
+target_include_directories(http PUBLIC ${CMAKE_SOURCE_DIR}/deps/)
+target_link_libraries(http z llhttp-static fieldstat4 brotli-dec-static brotli-common-static nmx_pool toml)
+set_target_properties(http PROPERTIES PREFIX "")
-#install(TARGETS http_decoder LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/plugin/${lib_name} COMPONENT LIBRARIES) \ No newline at end of file
+set_target_properties(http_dyn PROPERTIES PREFIX "")
+target_link_libraries(http_dyn z llhttp-static fieldstat4 brotli-dec-static brotli-common-static nmx_pool toml) \ No newline at end of file