hunting/utils/FxHttpServer
2024-02-27 22:08:38 -08:00
..
include Add:FxHttpServer module. 2024-02-27 22:08:38 -08:00
src Add:FxHttpServer module. 2024-02-27 22:08:38 -08:00
CMakeLists.txt Add:FxHttpServer module. 2024-02-27 22:08:38 -08:00
README.md Add:FxHttpServer module. 2024-02-27 22:08:38 -08:00

1. httpserver组件库

使用/external/httpserver.h-master/src/CMakeLists.txt文件编译的开源库二次封装接口给到应用层使用。

1.1. 注意事项

  1. 编译libhttpsrv时可能会提示 ragel 工具未安装,需要安装 ragel 工具:
$ sudo apt install ragel
  1. 对开源库的CMakeLists.txt文件增加拷贝命令
message("${PLATFORM_PATH}/cmake-shell/external${SUBMODULE_PATH_OF_IPC_SDK}/httpserver.h-master/src/libhttpsrv.a")
add_custom_command(
    TARGET httpsrv
    POST_BUILD
    COMMAND cp ${PLATFORM_PATH}/cmake-shell${SUBMODULE_PATH_OF_IPC_SDK}/external/httpserver.h-master/src/libhttpsrv.a ${EXTERNAL_LIBS_OUTPUT_PATH}
    WORKING_DIRECTORY ${PLATFORM_PATH}/cmake-shell/
)
  1. 取消开源库的CMakeLists.txt文件debug配置未知会产生什么不良后果
PUBLIC $<$<CONFIG:DEBUG>:-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all>