TEMPLATE = app
CONFIG += no_main

# Enable the testlib module
QT += testlib #core-private

# Define a test-specific flag
DEFINES += QT_TESTS

TARGET = tests

SOURCES += $$files($$PWD/*.cpp, true)
HEADERS += $$files($$PWD/*.h, true)

# Prevent tests from being built in release mode (optional)
# CONFIG(debug, debug|release) {
#     message("Including test files in Debug mode")
# } else {
#     SOURCES -= autotest_cod5.cpp
# }

LIBS += \
    #-L$$PWD/../third_party/devil_sdk/lib/ -lDevIL -lILU -lILUT \
    #-L$$PWD/../third_party/zlib/lib/ -lzlib \
    #-L$$PWD/../third_party/xbox_sdk/lib -lxcompress64 \
    -L$$OUT_PWD/../libs/ -lcore \
    -L$$OUT_PWD/../libs/ -lxassets\
    -L$$OUT_PWD/../libs/ -lcompression \
    -L$$OUT_PWD/../libs/ -lencryption \
    -L$$OUT_PWD/../libs/ -lfastfile \
    -L$$OUT_PWD/../libs/ -lddsfile \
    -L$$OUT_PWD/../libs/ -lipakfile \
    -L$$OUT_PWD/../libs/ -liwifile \
    -L$$OUT_PWD/../libs/ -lzonefile

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/encryption \
    $$PWD/../libs/fastfile \
    $$PWD/../libs/ddsfile \
    $$PWD/../libs/ipakfile \
    $$PWD/../libs/iwifile \
    $$PWD/../libs/xassets \
    $$PWD/../libs/zonefile

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/encryption \
    $$PWD/../libs/fastfile \
    $$PWD/../libs/ddsfile \
    $$PWD/../libs/ipakfile \
    $$PWD/../libs/iwifile \
    $$PWD/../libs/xassets \
    $$PWD/../libs/zonefile


win32 {
    QMAKE_POST_LINK =
    QMAKE_POST_LINK += for /D %%G in (\"$$PWD/../third_party/*/lib\") do copy /Y \"%%~G\*.dll\" \"$$OUT_PWD/$$DESTDIR/\" >NUL $$escape_expand(\\n\\t)
}
