default_pre_build &&

tar xf $SOURCE_CACHE/$SOURCE2

OPTS+=" -DLAPACK_LIBRARIES=/usr/lib/liblapack.so;/usr/lib/libblas.so;/usr/lib/libcblas.so \
        -DLAPACK_CBLAS_H=/usr/include/lapack/cblas.h \
        -DLAPACK_LAPACKE_H=/usr/include/lapack/lapacke.h"

sed -i 's/add_definitions(${Qt${QT_VERSION_MAJOR}${dt_dep}_DEFINITIONS})/link_libraries(${Qt${QT_VERSION_MAJOR}${dt_dep}})/' modules/highgui/CMakeLists.txt
#This is temporary until they provide a way to choose which qt(5,6) to use.
#With both installed it defaults to qt6 and the compile tanks.
if in_depends $MODULE qt5 || module_installed qt6-base ; then
  OPTS+=" -DWITH_QT=ON"
fi

if in_depends $MODULE libpng ; then
  OPTS+=" -DPNG_PNG_INCLUDE_DIR=/usr/include/libpng16"
fi

if module_installed libglvnd ; then
  OTPS+=" -DOpenGL_GL_PREFERENCE=GLVND"
fi
