XPlor/app/app.pro
njohnson a2b8f69bb1
Some checks failed
CI Build / build-macos (push) Failing after 27s
CI Build / build-windows (push) Failing after 7m43s
Fix macOS build: make Windows-only libraries conditional
- DevIL, bundled zlib, and xcompress64 only linked on Windows
- macOS/Linux use system zlib (-lz)
- DLL deployment only on Windows

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 14:37:52 -05:00

83 lines
2.7 KiB
Prolog

QT += core widgets gui multimedia network
SUBDIRS += app
CONFIG += c++latest
RC_ICONS = app.ico
# Load API token from .env file at build time
ENV_FILE = $$PWD/../.env
exists($$ENV_FILE) {
ENV_CONTENTS = $$cat($$ENV_FILE, lines)
for(line, ENV_CONTENTS) {
# Parse GITEA_ACCESS_TOKEN=value
contains(line, "GITEA_ACCESS_TOKEN=.*") {
TOKEN = $$replace(line, "GITEA_ACCESS_TOKEN=", "")
DEFINES += GITEA_ACCESS_TOKEN=\\\"$$TOKEN\\\"
}
}
}
SOURCES += $$files($$PWD/*.cpp)
HEADERS += $$files($$PWD/*.h)
FORMS += $$files($$PWD/*.ui)
RESOURCES += ../data/Data.qrc
# Core libraries (all platforms)
LIBS += \
-L$$OUT_PWD/../libs/ -lcore \
-L$$OUT_PWD/../libs/ -lcompression \
-L$$OUT_PWD/../libs/ -ldsl \
-L$$OUT_PWD/../libs/ -lencryption
# Windows-only: DevIL, bundled zlib, Xbox SDK
win32 {
LIBS += -L$$PWD/../third_party/devil_sdk/lib/ -lDevIL -lILU -lILUT
LIBS += -L$$PWD/../third_party/zlib/lib/ -lzlib
LIBS += -L$$PWD/../third_party/xbox_sdk/lib -lxcompress64
}
# macOS/Linux: use system zlib
unix {
LIBS += -lz
}
INCLUDEPATH += \
$$PWD/../third_party/devil_sdk/include/ \
$$PWD/../third_party/zlib/include \
$$PWD/../third_party/xbox_sdk/include \
$$PWD/../libs/core \
$$PWD/../libs/compression \
$$PWD/../libs/dsl \
$$PWD/../libs/encryption
DEPENDPATH += \
$$PWD/../third_party/devil_sdk/include/ \
$$PWD/../third_party/zlib/include \
$$PWD/../third_party/xbox_sdk/include \
$$PWD/../libs/core \
$$PWD/../libs/compression \
$$PWD/../libs/dsl \
$$PWD/../libs/encryption
CONFIG(debug, debug|release) {
FULL_OUT_DIR = $$OUT_PWD/debug
} CONFIG(release, debug|release) {
FULL_OUT_DIR = $$OUT_PWD/release
}
defs_install.path = $$FULL_OUT_DIR/definitions
defs_install.files = $$PWD/../definitions/*
scripts_install.path = $$FULL_OUT_DIR/scripts
scripts_install.files = $$PWD/../scripts/*
INSTALLS += defs_install scripts_install
# Windows-only: deploy DLLs
win32 {
dll_install.path = $$FULL_OUT_DIR
dll_install.files = $$PWD/../third_party/xbox_sdk/lib/xcompress64.dll
INSTALLS += dll_install
}