GrabBag/Device/GalaxyDevice/GalaxyDevice.pro
2025-12-20 16:18:12 +08:00

93 lines
2.2 KiB
Prolog
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# GalaxyDevice.pro
# 大恒Galaxy工业相机设备封装库
CONFIG -= qt
TEMPLATE = lib
CONFIG += staticlib
DEFINES += GALAXYDEVICE_LIBRARY
CONFIG += c++17
# 支持 UTF-8 编码
win32-msvc {
QMAKE_CXXFLAGS += /utf-8
QMAKE_CFLAGS += /utf-8
}
# 头文件路径
INCLUDEPATH += ./Inc
INCLUDEPATH += ./_Inc
INCLUDEPATH += $$PWD/../../VrCommon/Inc
INCLUDEPATH += $$PWD/../../VrUtils/Inc
# 源文件
SOURCES += \
Src/GalaxyDevice.cpp \
Src/GalaxySDKManager.cpp
# 头文件
HEADERS += \
Inc/IGalaxyDevice.h \
Inc/GalaxyDevice_global.h \
_Inc/GalaxyDevice.h \
_Inc/GalaxySDKManager.h
# Windows平台库链接
win32:CONFIG(debug, debug|release) {lVrTCPServer
LIBS += -L../../VrUtils/debug -lVrUtils
}else:win32:CONFIG(release, debug|release){
LIBS += -L../../VrUtils/release -lVrUtils
}else:unix:!macx {
# Unix/Linux平台库链接(包括交叉编译)
LIBS += -L../../VrUtils -lVrUtils
# Galaxy SDK GalaxyDevice 的依赖)
LIBS += -L$$PWD/../../../SDK/Galaxy/aarch64/lib/armv8 -lgxiapi
# 添加系统库依赖
LIBS += -lpthread
}
# Galaxy SDK 头文件路径
INCLUDEPATH += $$PWD/../../SDK/Galaxy/Windows/inc
# Galaxy SDK 库链接
win32:CONFIG(release, debug|release): {
LIBS += -L$$PWD/../../SDK/Galaxy/Windows/lib/x64
LIBS += -L$$PWD/../../SDK/Galaxy/Windows/bin/Win64
LIBS += -lGxIAPICPPEx
}
else:win32:CONFIG(debug, debug|release): {
LIBS += -L$$PWD/../../SDK/Galaxy/Windows/lib/x64
LIBS += -L$$PWD/../../SDK/Galaxy/Windows/bin/Win64
LIBS += -lGxIAPICPPEx
}
else:unix:!macx: {
# Linux/ARM 平台
INCLUDEPATH += $$PWD/../../SDK/Galaxy/aarch64/inc
LIBS += -L$$PWD/../../SDK/Galaxy/aarch64/lib/armv8
LIBS += -lgxiapi
}
# Windows 系统库依赖
win32 {
LIBS += -lws2_32
}
# Unix/Linux 平台设置
unix:!macx {
message("build GalaxyDevice for unix")
# 生成位置无关代码
QMAKE_CXXFLAGS += -fPIC
# 添加系统库依赖
LIBS += -ldl -lpthread -lrt
target.path = /usr/lib
}
!isEmpty(target.path): INSTALLS += target