mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-23 16:43:49 +08:00
Snap: Update packaging for http dashboard
This commit is contained in:
committed by
Roger Light
parent
64fc17b689
commit
737a6ee413
+1
-5
@@ -22,10 +22,6 @@ apps:
|
||||
command: usr/bin/mosquitto_ctrl
|
||||
plugs: [home, network]
|
||||
|
||||
db_dump:
|
||||
command: usr/bin/mosquitto_db_dump
|
||||
plugs: [home]
|
||||
|
||||
pub:
|
||||
command: usr/bin/mosquitto_pub
|
||||
plugs: [home, network]
|
||||
@@ -70,7 +66,7 @@ parts:
|
||||
plugin: cmake
|
||||
cmake-parameters:
|
||||
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||
- -DHTTP_API_DIR=\\\"/snap/mosquitto/current/dashboard/\\\"
|
||||
- -DHTTP_API_DIR="/snap/mosquitto/current/dashboard/"
|
||||
- -DWITH_TESTS=OFF
|
||||
source: https://github.com/eclipse-mosquitto/mosquitto
|
||||
source-type: git
|
||||
|
||||
@@ -105,12 +105,17 @@ endif()
|
||||
|
||||
option(WITH_HTTP_API
|
||||
"Include http_api support for listeners?" ON)
|
||||
option(HTTP_API_DIR
|
||||
"Default http_api directory" "")
|
||||
if(WITH_HTTP_API)
|
||||
find_library(MICROHTTPD_LIBRARY NAMES microhttpd)
|
||||
if(MICROHTTPD_LIBRARY)
|
||||
target_sources(mosquitto PRIVATE http_api.c)
|
||||
target_compile_definitions(mosquitto PRIVATE "WITH_HTTP_API")
|
||||
target_link_libraries(mosquitto PRIVATE ${MICROHTTPD_LIBRARY})
|
||||
if(HTTP_API_DIR)
|
||||
target_compile_definitions(mosquitto PRIVATE "HTTP_API_DIR=\"${HTTP_API_DIR}\"")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user