85 lines
2.3 KiB
Prolog
Raw Normal View History

2025-03-12 11:08:50 +08:00
QT -= gui
QT += sql
#CONFIG -= qt
CONFIG += c++11 console
CONFIG -= app_bundle
# 默认不开启oatpp的压缩由nginx压缩更灵活且避免潜在问题
#CONFIG += enable_oatpp_zlib
if(CONFIG(enable_oatpp_zlib)) {
#代码中以此条件编译
DEFINES += ENABLE_OATPP_ZLIB
}
TEMPLATE = app
#注意修改文件名时需同步修改module.pri
TARGET = web_server
#连接模块静态库
2025-03-12 18:14:45 +08:00
LIBS += -lmodule_alarm -lmodule_general -lmodule_realTimeData -lmodule_user -lmodule_trend -lmodule_app -lmodule_operate -lmodule_statistics
2025-03-12 11:08:50 +08:00
#oatpp-websocket要写在oatpp之前否则连接器报错
LIBS += -loatpp-websocket -loatpp
if(CONFIG(enable_oatpp_zlib)) {
LIBS += -loatpp-zlib -lz
}
2025-03-12 18:14:45 +08:00
LIBS += -lboost_regex -lboost_chrono -lboost_system -lboost_program_options -lboost_date_time -lboost_thread -llog4cplus -lboost_locale \
2025-03-12 11:08:50 +08:00
-lpub_logger_api -lpub_utility_api -lpub_sysinfo_api \
-lsys_proc_mng_api -lsys_node_mng_api -ldb_api_ex -ltsdb_api -lrdb_api -lrdb_net_api \
-lnet_msg_bus_api -lalarm_server_api -ldp_chg_data_api -lperm_mng_api \
-ldb_his_query_api
2025-03-12 18:14:45 +08:00
2025-03-12 11:08:50 +08:00
win32{
LIBS += -lbcrypt
}
else{
LIBS += -lpthread
}
include($$PWD/../../../idl_files/idl_files.pri)
LIBS += -lprotobuf-lite -lprotobuf
HEADERS += ../include/BaseModule.h \
../include/ServerApi.h \
../include/SessionApi.h
HEADERS += GlobalMng.h \
SimpleSrvThread.h \
AsyncSrvThread.h \
WebServer.h \
WebSrvRedunSw.h \
auth/AuthInterceptor.h \
auth/AuthDtos.hpp \
auth/SesssionApiImpl.h \
auth/AuthRdbUtil.h
SOURCES += GlobalMng.cpp \
Main.cpp \
SimpleSrvThread.cpp \
AsyncSrvThread.cpp \
WebServer.cpp \
WebSrvRedunSw.cpp \
auth/AuthInterceptor.cpp \
auth/SesssionApiImpl.cpp \
auth/AuthRdbUtil.cpp \
auth/SessionApi.cpp
#-------------------------------------------------------------------
COMMON_PRI=$$PWD/../../../common.pri
exists($$COMMON_PRI) {
include($$COMMON_PRI)
}else {
error("FATAL error: can not find common.pri")
}
#模块的静态库生成在临时目录写在common.pri之后
LIBS += -L$$SRC_ROOT_PATH/temp/$${TARGET}_modules/$$DIR_DEBUG_RELEASE/