mirror of
https://github.com/eclipse/mosquitto.git
synced 2025-05-09 01:01:11 +08:00

- Broker will log warnings if sensitive files are world readable/writable, or if the owner/group is not the same as the user/group the broker is running as. In future versions the broker will refuse to open these files.
50 lines
1.4 KiB
CMake
50 lines
1.4 KiB
CMake
if (WITH_TLS AND CJSON_FOUND)
|
|
add_definitions("-DWITH_CJSON")
|
|
|
|
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/include
|
|
${mosquitto_SOURCE_DIR}/lib ${mosquitto_SOURCE_DIR}/src
|
|
${OPENSSL_INCLUDE_DIR} ${STDBOOL_H_PATH} ${STDINT_H_PATH}
|
|
${CJSON_INCLUDE_DIRS} ${mosquitto_SOURCE_DIR}/apps/mosquitto_passwd)
|
|
|
|
link_directories(${CJSON_DIR})
|
|
|
|
add_executable(mosquitto_ctrl
|
|
mosquitto_ctrl.c mosquitto_ctrl.h
|
|
client.c
|
|
dynsec.c
|
|
dynsec_client.c
|
|
dynsec_group.c
|
|
dynsec_role.c
|
|
../mosquitto_passwd/get_password.c ../mosquitto_passwd/get_password.h
|
|
../../lib/memory_mosq.c ../../lib/memory_mosq.h
|
|
../../lib/misc_mosq.c ../../lib/misc_mosq.h
|
|
../../src/memory_public.c
|
|
options.c
|
|
../../src/password_mosq.c ../../src/password_mosq.h
|
|
)
|
|
|
|
if (WITH_STATIC_LIBRARIES)
|
|
target_link_libraries(mosquitto_ctrl libmosquitto_static)
|
|
else()
|
|
target_link_libraries(mosquitto_ctrl libmosquitto)
|
|
endif()
|
|
|
|
if (UNIX)
|
|
if (APPLE)
|
|
target_link_libraries(mosquitto_ctrl dl)
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
|
#
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
|
#
|
|
elseif(QNX)
|
|
#
|
|
else(APPLE)
|
|
target_link_libraries(mosquitto_ctrl dl)
|
|
endif (APPLE)
|
|
endif (UNIX)
|
|
|
|
target_link_libraries(mosquitto_ctrl ${OPENSSL_LIBRARIES} ${CJSON_LIBRARIES})
|
|
|
|
install(TARGETS mosquitto_ctrl RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
|
endif (WITH_TLS AND CJSON_FOUND)
|