#
# qmake configuration for INTEGRITY Qualcomm SA8155P ADP
#

load(device_config)

include(../../common/ghs-integrity-armv8.conf)

QT_QPA_DEFAULT_PLATFORM  = eglfs
EGLFS_DEVICE_INTEGRATION = eglfs_openwfd

qc_multimedia_inc_directory = $$(QC_MULTIMEDIA_INC_DIR)
isEmpty(qc_multimedia_inc_directory): \
    error("This makespec requires the environment variable QC_MULTIMEDIA_INC_DIR to be set.")

QMAKE_INCDIR            += $$(QC_MULTIMEDIA_INC_DIR)

QMAKE_LIBS_EGL          += -lESXEGL_Adreno -lESXGLESv2_Adreno -ladreno_utils -lGSLUser -lOSUser -lpanel -livfs -lposix -lpmem -ltzbsp -lpaged_alloc -lglnext-llvm -lopenwfd -lplanedef -llogger -lnet -lsocket -lrfs_client -lshm_client -lmmosalrfs -lmmosalfile -lOSAbstraction

QMAKE_LIBS_OPENGL_ES2   += $${QMAKE_LIBS_EGL}

QMAKE_CFLAGS            += -DINTEGRITY
QMAKE_CXXFLAGS          += -DINTEGRITY

QMAKE_CFLAGS            += -bigswitch
QMAKE_CXXFLAGS          += -bigswitch
QMAKE_LFLAGS            += -bigswitch

dirs = $$(GL_INC_DIR)
isEmpty(dirs): \
    error("This makespec requires the environment variable GL_INC_DIR to be set.")

QMAKE_INCDIR_EGL = $$split(dirs, $$QMAKE_DIRLIST_SEP)
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_EGL

dirs = $$(GL_LIB_DIR)
isEmpty(dirs): \
    error("This makespec requires the environment variable GL_LIB_DIR to be set.")

QMAKE_LIBDIR_EGL = $$split(dirs, $$QMAKE_DIRLIST_SEP)
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_EGL

load(qt_config)
