[FIXED] something wrong

This commit is contained in:
xudx 2024-11-21 13:52:16 +08:00
parent 0cb40428b6
commit a6a8df1bc2
1 changed files with 15 additions and 7 deletions

View File

@ -87,13 +87,17 @@ add_executable(${ProjectName}
target_compile_options(${ProjectName} PRIVATE -fno-stack-protector) target_compile_options(${ProjectName} PRIVATE -fno-stack-protector)
# #
find_library(LIB_PTHREAD NAMES pthread PATHS /usr/aarch64-linux-gnu/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_SQLITE3 NAMES sqlite3 PATHS lib/libsqlite3/lib)
find_library(LIB_XML2 NAMES xml2 PATHS lib/libxml2/lib) find_library(LIB_XML2 NAMES xml2 PATHS lib/libxml2/lib)
find_library(LIB_SSL NAMES ssl PATHS lib/libssl/lib) find_library(LIB_SSL NAMES ssl PATHS lib/libssl/lib)
find_library(LIB_CRYPTO NAMES crypto 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_CJSON NAMES cjson PATHS lib/libcjson/lib)
find_library(LIB_MODBUS NAMES modbus PATHS lib/libmodbus/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 target_link_libraries(${ProjectName} PRIVATE
@ -104,6 +108,10 @@ target_link_libraries(${ProjectName} PRIVATE
${LIB_CRYPTO} ${LIB_CRYPTO}
${LIB_CJSON} ${LIB_CJSON}
${LIB_MODBUS} ${LIB_MODBUS}
${LIB_MQTT3A}
${LIB_MQTT3AS}
${LIB_MQTT3C}
${LIB_MQTT3CS}
) )
if(NOT LIB_PTHREAD) if(NOT LIB_PTHREAD)