
if(NOT JSON_FOUND)

find_package(jsoncpp REQUIRED)
link_libraries(${JSONCPP_LIBRARIES})
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp/lib)
# target_link_libraries(data_publish paho-mqtt3a paho-mqttpp3)
#target_link_libraries(data_publish PahoMqttCpp::paho-mqttpp3)
find_path(Jsoncpp_INCLUDE_DIR
  NAMES json/features.h
  PATH_SUFFIXES jsoncpp
  PATHS ${Jsoncpp_PKGCONF_INCLUDE_DIRS} # /usr/include/jsoncpp/json
)
endif(NOT JSON_FOUND)