set(MGL_HAVE_QT4 1)
set(MGL_QT4_LIBS)
if(enable-json-sample)
set(MGL_QT4_LIBS_FIND QtCore QtGui QtNetwork QtWebKit QtOpenGL)
else(enable-json-sample)
set(MGL_QT4_LIBS_FIND QtCore QtGui QtOpenGL)
endif(enable-json-sample)

FIND_PACKAGE(Qt4 4.8 REQUIRED ${MGL_QT4_LIBS_FIND})

if(NOT QT4_FOUND)
	message(SEND_ERROR "Couldn't find Qt4 library.")
endif(NOT QT4_FOUND)

set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

foreach(mgl_qt4_lib ${MGL_QT4_LIBS_FIND})
        set(MGL_QT4_LIBS ${MGL_QT4_LIBS} Qt4::${mgl_qt4_lib})
endforeach(mgl_qt4_lib)
