From a6a8df1bc23c58599d98237eccb13bbc85db4a1c Mon Sep 17 00:00:00 2001 From: xudx Date: Thu, 21 Nov 2024 13:52:16 +0800 Subject: [PATCH] [FIXED] something wrong --- CMakeLists.txt | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dcb0a1..40579a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,13 +87,17 @@ add_executable(${ProjectName} target_compile_options(${ProjectName} PRIVATE -fno-stack-protector) # 添加库路径 -find_library(LIB_PTHREAD NAMES pthread PATHS /usr/aarch64-linux-gnu/lib) -find_library(LIB_SQLITE3 NAMES sqlite3 PATHS lib/libsqlite3/lib) -find_library(LIB_XML2 NAMES xml2 PATHS lib/libxml2/lib) -find_library(LIB_SSL NAMES ssl PATHS lib/libssl/lib) -find_library(LIB_CRYPTO NAMES crypto PATHS lib/libssl/lib) -find_library(LIB_CJSON NAMES cjson PATHS lib/libcjson/lib) -find_library(LIB_MODBUS NAMES modbus PATHS lib/libmodbus/lib) +find_library(LIB_PTHREAD NAMES pthread PATHS /usr/aarch64-linux-gnu/lib) +find_library(LIB_SQLITE3 NAMES sqlite3 PATHS lib/libsqlite3/lib) +find_library(LIB_XML2 NAMES xml2 PATHS lib/libxml2/lib) +find_library(LIB_SSL NAMES ssl PATHS lib/libssl/lib) +find_library(LIB_CRYPTO NAMES crypto PATHS lib/libssl/lib) +find_library(LIB_CJSON NAMES cjson PATHS lib/libcjson/lib) +find_library(LIB_MODBUS NAMES modbus PATHS lib/libmodbus/lib) +find_library(LIB_MQTT3A NAMES paho-mqtt3a PATHS lib/libpaho-mqtt/lib) +find_library(LIB_MQTT3AS NAMES paho-mqtt3as PATHS lib/libpaho-mqtt/lib) +find_library(LIB_MQTT3C NAMES paho-mqtt3c PATHS lib/libpaho-mqtt/lib) +find_library(LIB_MQTT3CS NAMES paho-mqtt3cs PATHS lib/libpaho-mqtt/lib) # 添加链接库 target_link_libraries(${ProjectName} PRIVATE @@ -104,6 +108,10 @@ target_link_libraries(${ProjectName} PRIVATE ${LIB_CRYPTO} ${LIB_CJSON} ${LIB_MODBUS} + ${LIB_MQTT3A} + ${LIB_MQTT3AS} + ${LIB_MQTT3C} + ${LIB_MQTT3CS} ) if(NOT LIB_PTHREAD)