You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.8 KiB
CMake
70 lines
1.8 KiB
CMake
if(CJSON_FOUND AND WITH_TLS)
|
|
add_definitions("-DWITH_CJSON")
|
|
|
|
set(CLIENT_INC
|
|
"${CJSON_INCLUDE_DIRS}"
|
|
"${OPENSSL_INCLUDE_DIR}"
|
|
"${STDBOOL_H_PATH}"
|
|
"${STDINT_H_PATH}"
|
|
"${mosquitto_SOURCE_DIR}"
|
|
"${mosquitto_SOURCE_DIR}/common"
|
|
"${mosquitto_SOURCE_DIR}/deps"
|
|
"${mosquitto_SOURCE_DIR}/include"
|
|
"${mosquitto_SOURCE_DIR}/lib"
|
|
"${mosquitto_SOURCE_DIR}/plugins/common"
|
|
"${mosquitto_SOURCE_DIR}/src"
|
|
)
|
|
|
|
set(CLIENT_DIR "${mosquitto_BINARY_DIR}/lib" "${CJSON_DIR}")
|
|
|
|
add_library(mosquitto_dynamic_security MODULE
|
|
acl.c
|
|
auth.c
|
|
../../common/base64_mosq.c ../../common/base64_mosq.h
|
|
clients.c
|
|
clientlist.c
|
|
config.c
|
|
config_init.c
|
|
control.c
|
|
default_acl.c
|
|
dynamic_security.h
|
|
groups.c
|
|
grouplist.c
|
|
hash.c
|
|
../../common/json_help.c ../../common/json_help.h
|
|
../../common/misc_mosq.c ../../common/misc_mosq.h
|
|
../../common/password_mosq.c ../../common/password_mosq.h
|
|
plugin.c
|
|
../common/plugin_common.c ../common/plugin_common.h
|
|
roles.c
|
|
rolelist.c
|
|
)
|
|
|
|
target_include_directories(mosquitto_dynamic_security PRIVATE
|
|
${CLIENT_INC}
|
|
)
|
|
if(WITH_BUNDLED_DEPS)
|
|
target_include_directories(mosquitto_dynamic_security PRIVATE
|
|
"${mosquitto_SOURCE_DIR}/deps"
|
|
)
|
|
endif()
|
|
link_directories(${CLIENT_DIR} "${mosquitto_SOURCE_DIR}")
|
|
|
|
set_target_properties(mosquitto_dynamic_security PROPERTIES
|
|
PREFIX ""
|
|
POSITION_INDEPENDENT_CODE 1
|
|
)
|
|
|
|
target_link_libraries(mosquitto_dynamic_security ${CJSON_LIBRARIES} ${OPENSSL_LIBRARIES})
|
|
if(WIN32)
|
|
target_link_libraries(mosquitto_dynamic_security mosquitto)
|
|
install(TARGETS mosquitto_dynamic_security
|
|
DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
|
else()
|
|
install(TARGETS mosquitto_dynamic_security
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
|
endif()
|
|
|
|
endif()
|