[FIXED] something wrong
This commit is contained in:
parent
0cb40428b6
commit
a6a8df1bc2
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue