# Remove some stuff from the default settings in mkspecs
CONFIG -= debug
CONFIG -= release
CONFIG -= debug_and_release
CONFIG -= debug_and_release_target
CONFIG += qt warn_on release

# CONFIG += console
TARGET    =  RadarVolumeExplorer

win32 {
   UI_DIR        = .ui
   MOC_DIR       = .moc
   OBJECTS_DIR   = obj
   DEFINES      += WIN32 _CRT_SECURE_NO_DEPRECATE

   # define warning level (-W3 is Qt default, increase it using -W4 or -Wall)
   QMAKE_CXXFLAGS_WARN_ON -= -W3
   QMAKE_CXXFLAGS_WARN_ON += -W3

   # treat some warnings as errors 
   QMAKE_CXXFLAGS += -we4130 -we4239 -we4712 -we4715
}

greaterThan(QT_MAJOR_VERSION, 4): {
   # warn about old QT4 stuff
   DEFINES += QT_DEPRECATED_WARNINGS
   DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040000
} else {
   # warn about old QT3 stuff
   DEFINES += QT3_SUPPORT_WARNINGS
   DEFINES += Q_DECL_OVERRIDE=
   QT += gui
}

# PKG libraries: (use with $$...)
PKG_HDF5   = hdf5-1.8.9
PKG_PROJ4  = proj-4

SOURCES += \
           RveHDF5/RveHDF5Attribute.cpp       \
           RveHDF5/RveHDF5Compound.cpp        \
           RveHDF5/RveHDF5Dataset.cpp         \
           RveHDF5/RveHDF5Group.cpp           \
           RveHDF5/RveHDF5Link.cpp            \
           RveHDF5/RveHDF5Object.cpp          \
           RveGisData/RveGisData.cpp          \
           RveGisData/RveShpFile.cpp          \
           RveGisData/RveShp.cpp              \
           RveGisData/RveShpPolygon.cpp       \
           RveGisData/RveShpPoint.cpp         \
           RveGisData/RveDbfFile.cpp          \
           RveGisData/RveDbfField.cpp         \
           RveGisData/RveDbfRecord.cpp        \
           RadarVolumeExplorer.cpp            \
           RveRawdata.cpp                     \
           RveLayersGuiHandler.cpp            \
           RveLayersGuiOverlayItemHandler.cpp \
           RveMap.cpp                         \
           RveModel.cpp                       \
           RveParameters.cpp                  \
           RveFlatModel.cpp                   \
           RveFlatParameters.cpp              \
           RveCartesianModel.cpp              \
           RveCartesianParameters.cpp         \
           RveIsoModel.cpp                    \
           RveIsoParameters.cpp               \
           RveIsoParameterEntry.cpp           \
           Polygonise.cpp                     \
           GLWidget.cpp                       \
           MainWindow.cpp                     \
           RveProjPnt.cpp                     \
           RveDem.cpp                         \
           RveGLSprite.cpp                    \
           RveGLTexture.cpp                   \
           RveAboutDialog.cpp                 \
           RveShapeFileSettings.cpp           \
           RveRawdataSettings.cpp             \
           main.cpp

HEADERS += \
           RveGisData/RveGisData.h          \
           RveGisData/RveShpFile.h          \
           RveGisData/RveShp.h              \
           RveGisData/RveShpPolygon.h       \
           RveGisData/RveShpPoint.h         \
           RveGisData/RveDbfFile.h          \
           RveGisData/RveDbfField.h         \
           RveGisData/RveDbfRecord.h        \
           RveHDF5/RveHDF5Attribute.h       \
           RveHDF5/RveHDF5Compound.h        \
           RveHDF5/RveHDF5Dataset.h         \
           RveHDF5/RveHDF5Group.h           \
           RveHDF5/RveHDF5Link.h            \
           RveHDF5/RveHDF5Object.h          \
           RadarVolumeExplorer.h            \
           RveRawdata.h                     \
           RveLayersGuiHandler.h            \
           RveLayersGuiOverlayItemHandler.h \
           RveMap.h                         \
           RveModel.h                       \
           RveParameters.h                  \
           RveFlatModel.h                   \
           RveFlatParameters.h              \
           RveCartesianModel.h              \
           RveCartesianParameters.h         \
           RveIsoModel.h                    \
           RveIsoParameters.h               \
           RveIsoParameterEntry.h           \
           GLWidget.h                       \
           RveProjPnt.h                     \
           RveDem.h                         \
           RveGLSprite.h                    \
           RveGLTexture.h                   \
           RveAboutDialog.h                 \
           RveShapeFileSettings.h           \
           RveRawdataSettings.h             \
           MainWindow.h

FORMS = RadarVolumeExplorerGui.ui  \
        RveAboutDialogGui.ui       \
        RveShapeFileSettingsGui.ui \
        RveRawdataSettingsGui.ui

DESTDIR   =  ./RadarVolumeExplorer/bin
TEMPLATE  = app
CONFIG   += libcheck

QMAKE_LIBDIR  += ./RadarVolumeExplorer/lib
LIBS += \
       -lhdf5        \
       -lhdf5_cpp    \
       -lproj

unix:LIBS  += -lnordrad -lGL -lGLU -lsz -lz
win32:LIBS += -lWs2_32 -lopengl32 -lglu32 -lszlib -lzlib
win32:RC_FILE = RadarVolumeExplorer.rc

INCLUDEPATH += ../../../lib \
               ./pkg/proj-4.7.0/src \
               ./pkg/$$PKG_HDF5/src/ \
               ./pkg/$$PKG_HDF5/c++/src

win32::INCLUDEPATH += ./pkg/$$PKG_HDF5/windows/src/

QT += network xml opengl

greaterThan(QT_MAJOR_VERSION, 4): {
   QT += widgets
} else {
   #disable deprecated stuff in Qt4.x
   DEFINES += QT_NO_DEPRECATED
}

DEFINES += H5_USE_16_API_DEFAULT
