#
#  Copyright (C) 2008-2014 National Institute For Space Research (INPE) - Brazil.
#
#  This file is part of the TerraLib - a Framework for building GIS enabled applications.
#
#  TerraLib is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation, either version 3 of the License,
#  or (at your option) any later version.
#
#  TerraLib is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public License
#  along with TerraLib. See COPYING. If not, write to
#  TerraLib Team at <terralib-team@terralib.org>.
#
#
#  Description: Build configuration for the Qt Widgets Module.
#
#  Author: Gilberto Ribeiro de Queiroz <gribeiro@dpi.inpe.br>
#          Juan Carlos P. Garrido <juan@dpi.inpe.br>
#          Frederico Augusto T. Bede <frederico.bede@funcate.org.br>
#

include(${terralib_SOURCE_DIR}/terralib_conf.cmake)

#
# Set the source and ui files
#

file(GLOB TERRALIB_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/*.cpp)
file(GLOB TERRALIB_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/*.h)

# canvas
file(GLOB TERRALIB_CANVAS_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/canvas/*.cpp)
file(GLOB TERRALIB_CANVAS_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/canvas/*.h)
file(GLOB TERRALIB_CANVAS_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/canvas/ui/*.ui)

# ceditor
file(GLOB TERRALIB_CEDITOR_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/ceditor/*.cpp)
file(GLOB TERRALIB_CEDITOR_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/ceditor/*.h)

# charts
file(GLOB TERRALIB_CHARTS_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/charts/*.cpp)
file(GLOB TERRALIB_CHARTS_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/charts/*.h)
file(GLOB TERRALIB_CHARTS_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/charts/ui/*.ui)

# classification
file(GLOB TERRALIB_CLASSIFICATION_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/classification/*.cpp)
file(GLOB TERRALIB_CLASSIFICATION_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/classification/*.h)
file(GLOB TERRALIB_CLASSIFICATION_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/classification/ui/*.ui)

# colorbar
file(GLOB TERRALIB_COLORBAR_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/colorbar/*.cpp)
file(GLOB TERRALIB_COLORBAR_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/colorbar/*.h)
file(GLOB TERRALIB_COLORBAR_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/colorbar/ui/*.ui)

# dataset
file(GLOB TERRALIB_DATASET_EXPLORER_SRC_FILES  ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/dataset/explorer/*.cpp)
file(GLOB TERRALIB_DATASET_EXPLORER_HDR_FILES  ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/dataset/explorer/*.h)
file(GLOB TERRALIB_DATASET_SELECTOR_SRC_FILES  ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/dataset/selector/*.cpp)
file(GLOB TERRALIB_DATASET_SELECTOR_HDR_FILES  ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/dataset/selector/*.h)
file(GLOB TERRALIB_DATASET_UTILS_SRC_FILES  ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/dataset/utils/*.cpp)
file(GLOB TERRALIB_DATASET_UTILS_HDR_FILES  ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/dataset/utils/*.h)
file(GLOB TERRALIB_DATASET_SELECTOR_UI_FILES   ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/dataset/selector/ui/*.ui)

# datasource
file(GLOB TERRALIB_DATASOURCE_CONNECTOR_SRC_FILES  ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/datasource/connector/*.cpp)
file(GLOB TERRALIB_DATASOURCE_CONNECTOR_HDR_FILES  ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/datasource/connector/*.h)
file(GLOB TERRALIB_DATASOURCE_CORE_SRC_FILES       ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/datasource/core/*.cpp)
file(GLOB TERRALIB_DATASOURCE_CORE_HDR_FILES       ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/datasource/core/*.h)
file(GLOB TERRALIB_DATASOURCE_EXPLORER_SRC_FILES   ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/datasource/explorer/*.cpp)
file(GLOB TERRALIB_DATASOURCE_EXPLORER_HDR_FILES   ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/datasource/explorer/*.h)
file(GLOB TERRALIB_DATASOURCE_SELECTOR_SRC_FILES   ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/datasource/selector/*.cpp)
file(GLOB TERRALIB_DATASOURCE_SELECTOR_HDR_FILES   ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/datasource/selector/*.h)
file(GLOB TERRALIB_DATASOURCE_SELECTOR_UI_FILES    ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/datasource/selector/ui/*.ui)

# exchanger
file(GLOB TERRALIB_EXCHANGER_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/exchanger/*.cpp)
file(GLOB TERRALIB_EXCHANGER_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/exchanger/*.h)
file(GLOB TERRALIB_EXCHANGER_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/exchanger/ui/*.ui)

# externaltable
file(GLOB TERRALIB_EXTERNALTABLE_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/externalTable/*.cpp)
file(GLOB TERRALIB_EXTERNALTABLE_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/externalTable/*.h)
file(GLOB TERRALIB_EXTERNALTABLE_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/externalTable/ui/*.ui)

# help
file(GLOB TERRALIB_HELP_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/help/*.cpp)
file(GLOB TERRALIB_HELP_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/help/*.h)

# layer
file(GLOB TERRALIB_LAYER_EXPLORER_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/explorer/*.cpp)
file(GLOB TERRALIB_LAYER_EXPLORER_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/explorer/*.h)

file(GLOB TERRALIB_LAYER_INFO_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/info/*.cpp)
file(GLOB TERRALIB_LAYER_INFO_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/info/*.h)

file(GLOB TERRALIB_LAYER_SEARCH_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/search/*.cpp)
file(GLOB TERRALIB_LAYER_SEARCH_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/search/*.h)

file(GLOB TERRALIB_LAYER_SEARCH_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/search/ui/*.ui)

file(GLOB TERRALIB_LAYER_SELECTOR_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/selector/*.cpp)
file(GLOB TERRALIB_LAYER_SELECTOR_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/selector/*.h)

file(GLOB TERRALIB_LAYER_UTILS_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/utils/*.cpp)
file(GLOB TERRALIB_LAYER_UTILS_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/utils/*.h)
file(GLOB TERRALIB_LAYER_UTILS_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/layer/utils/ui/*.ui)

# log
file(GLOB TERRALIB_LOG_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/log/*.cpp)
file(GLOB TERRALIB_LOG_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/log/*.h)

# mapdisplay
file(GLOB TERRALIB_MAPDISPLAY_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/mapdisplay/*.cpp)
file(GLOB TERRALIB_MAPDISPLAY_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/mapdisplay/*.h)

# plugin
file(GLOB TERRALIB_PLUGIN_BUILDER_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/plugin/builder/*.cpp)
file(GLOB TERRALIB_PLUGIN_BUILDER_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/plugin/builder/*.h)

file(GLOB TERRALIB_PLUGIN_BUILDER_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/plugin/builder/ui/*.ui)

file(GLOB TERRALIB_PLUGIN_MANAGER_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/plugin/manager/*.cpp)
file(GLOB TERRALIB_PLUGIN_MANAGER_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/plugin/manager/*.h)

file(GLOB TERRALIB_PLUGIN_MANAGER_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/plugin/manager/ui/*.ui)

# progress
file(GLOB TERRALIB_PROGRESS_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/progress/*.cpp)
file(GLOB TERRALIB_PROGRESS_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/progress/*.h)

# property
file(GLOB TERRALIB_PROPERTY_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/property/*.cpp)
file(GLOB TERRALIB_PROPERTY_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/property/*.h)
file(GLOB TERRALIB_PROPERTY_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/property/ui/*.ui)

# propertybrowser
file(GLOB TERRALIB_PROPERTY_BROWSER_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/propertybrowser/*.cpp)
file(GLOB TERRALIB_PROPERTY_BROWSER_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/propertybrowser/*.h)

# query
file(GLOB TERRALIB_QUERY_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/query/*.cpp)
file(GLOB TERRALIB_QUERY_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/query/*.h)
file(GLOB TERRALIB_QUERY_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/query/ui/*.ui)

# rp
file(GLOB TERRALIB_RASTER_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/raster/*.cpp)
file(GLOB TERRALIB_RASTER_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/raster/*.h)
file(GLOB TERRALIB_RASTER_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/raster/ui/*.ui)

# rp
file(GLOB TERRALIB_RP_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/rp/*.cpp)
file(GLOB TERRALIB_RP_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/rp/*.h)
file(GLOB TERRALIB_RP_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/rp/ui/*.ui)

# se
file(GLOB TERRALIB_SE_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/se/*.cpp)
file(GLOB TERRALIB_SE_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/se/*.h)

file(GLOB TERRALIB_SE_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/se/ui/*.ui)

# srs
file(GLOB TERRALIB_SRS_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/srs/*.cpp)
file(GLOB TERRALIB_SRS_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/srs/*.h)
file(GLOB TERRALIB_SRS_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/srs/ui/*.ui)

# st
file(GLOB TERRALIB_ST_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/st/*.cpp)
file(GLOB TERRALIB_ST_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/st/*.h)

file(GLOB TERRALIB_ST_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/st/ui/*.ui)

# table
file(GLOB TERRALIB_TABLE_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/table/*.cpp)
file(GLOB TERRALIB_TABLE_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/table/*.h)
file(GLOB TERRALIB_TABLE_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/table/ui/*.ui)

# tools
file(GLOB TERRALIB_TOOLS_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/tools/*.cpp)
file(GLOB TERRALIB_TOOLS_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/tools/*.h)

# utils
file(GLOB TERRALIB_UTILS_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/utils/*.cpp)
file(GLOB TERRALIB_UTILS_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/utils/*.h)

file(GLOB TERRALIB_UTILS_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/utils/ui/*.ui)

# vector
file(GLOB TERRALIB_VECTOR_SRC_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/vector/*.cpp)
file(GLOB TERRALIB_VECTOR_HDR_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/vector/*.h)
file(GLOB TERRALIB_VECTOR_UI_FILES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/vector/ui/*.ui)

#
# Grouping the source  and ui files
#
source_group("Source Files"  FILES ${TERRALIB_SRC_FILES})
source_group("Header Files"  FILES ${TERRALIB_HDR_FILES})

# canvas
source_group("Source Files\\canvas"  FILES ${TERRALIB_CANVAS_SRC_FILES})
source_group("Header Files\\canvas"  FILES ${TERRALIB_CANVAS_HDR_FILES})
source_group("UI Files\\canvas"      FILES ${TERRALIB_CANVAS_UI_FILES})

# ceditor
source_group("Source Files\\ceditor"  FILES ${TERRALIB_CEDITOR_SRC_FILES})
source_group("Header Files\\ceditor"  FILES ${TERRALIB_CEDITOR_HDR_FILES})	 

# charts
source_group("Source Files\\charts"  FILES ${TERRALIB_CHARTS_SRC_FILES})
source_group("Header Files\\charts"  FILES ${TERRALIB_CHARTS_HDR_FILES})
source_group("UI Files\\charts"      FILES ${TERRALIB_CHARTS_UI_FILES})

# classification
source_group("Source Files\\classification"  FILES ${TERRALIB_CLASSIFICATION_SRC_FILES})
source_group("Header Files\\classification"  FILES ${TERRALIB_CLASSIFICATION_HDR_FILES})
source_group("UI Files\\classification"      FILES ${TERRALIB_CLASSIFICATION_UI_FILES})

# colorbar
source_group("Source Files\\colorbar"  FILES ${TERRALIB_COLORBAR_SRC_FILES})
source_group("Header Files\\colorbar"  FILES ${TERRALIB_COLORBAR_HDR_FILES})
source_group("UI Files\\colorbar"      FILES ${TERRALIB_COLORBAR_UI_FILES})

# explorer
source_group("Source Files\\dataset\\explorer"  FILES ${TERRALIB_DATASET_EXPLORER_SRC_FILES})
source_group("Header Files\\dataset\\explorer"  FILES ${TERRALIB_DATASET_EXPLORER_HDR_FILES})
source_group("Source Files\\dataset\\selector"  FILES ${TERRALIB_DATASET_SELECTOR_SRC_FILES})
source_group("Header Files\\dataset\\selector"  FILES ${TERRALIB_DATASET_SELECTOR_HDR_FILES})
source_group("Source Files\\dataset\\utils"  FILES ${TERRALIB_DATASET_UTILS_SRC_FILES})
source_group("Header Files\\dataset\\utils"  FILES ${TERRALIB_DATASET_UTILS_HDR_FILES})
source_group("UI Files\\dataset\\selector"      FILES ${TERRALIB_DATASET_SELECTOR_UI_FILES})

# datasource
source_group("Source Files\\datasource\\connector" FILES ${TERRALIB_DATASOURCE_CONNECTOR_SRC_FILES})
source_group("Header Files\\datasource\\connector" FILES ${TERRALIB_DATASOURCE_CONNECTOR_HDR_FILES})
source_group("Source Files\\datasource\\core"      FILES ${TERRALIB_DATASOURCE_CORE_SRC_FILES})
source_group("Header Files\\datasource\\core"      FILES ${TERRALIB_DATASOURCE_CORE_HDR_FILES})
source_group("Source Files\\datasource\\explorer"  FILES ${TERRALIB_DATASOURCE_EXPLORER_SRC_FILES})
source_group("Header Files\\datasource\\explorer"  FILES ${TERRALIB_DATASOURCE_EXPLORER_HDR_FILES})
source_group("Source Files\\datasource\\selector"  FILES ${TERRALIB_DATASOURCE_SELECTOR_SRC_FILES})
source_group("Header Files\\datasource\\selector"  FILES ${TERRALIB_DATASOURCE_SELECTOR_HDR_FILES})
source_group("UI Files\\datasource\\selector"      FILES ${TERRALIB_DATASOURCE_SELECTOR_UI_FILES})

# exchanger
source_group("Source Files\\exchanger"  FILES ${TERRALIB_EXCHANGER_SRC_FILES})
source_group("Header Files\\exchanger"  FILES ${TERRALIB_EXCHANGER_HDR_FILES})
source_group("UI Files\\exchanger"      FILES ${TERRALIB_EXCHANGER_UI_FILES})

# externaltable
source_group("Source Files\\externaltable"  FILES ${TERRALIB_EXTERNALTABLE_SRC_FILES})
source_group("Header Files\\externaltable"  FILES ${TERRALIB_EXTERNALTABLE_HDR_FILES})
source_group("UI Files\\externaltable"      FILES ${TERRALIB_EXTERNALTABLE_UI_FILES})

# help
source_group("Source Files\\help"  FILES ${TERRALIB_HELP_SRC_FILES})
source_group("Header Files\\help"  FILES ${TERRALIB_HELP_HDR_FILES})

# layer
source_group("Source Files\\layer\\explorer"  FILES ${TERRALIB_LAYER_EXPLORER_SRC_FILES})
source_group("Header Files\\layer\\explorer"  FILES ${TERRALIB_LAYER_EXPLORER_HDR_FILES})

source_group("Source Files\\layer\\info"  FILES ${TERRALIB_LAYER_INFO_SRC_FILES})
source_group("Header Files\\layer\\info"  FILES ${TERRALIB_LAYER_INFO_HDR_FILES})

source_group("Source Files\\layer\\search"  FILES ${TERRALIB_LAYER_SEARCH_SRC_FILES})
source_group("Header Files\\layer\\search"  FILES ${TERRALIB_LAYER_SEARCH_HDR_FILES})
source_group("UI Files\\layer\\search"      FILES ${TERRALIB_LAYER_SEARCH_UI_FILES})

source_group("Source Files\\layer\\selector"  FILES ${TERRALIB_LAYER_SELECTOR_SRC_FILES})
source_group("Header Files\\layer\\selector"  FILES ${TERRALIB_LAYER_SELECTOR_HDR_FILES})

source_group("Source Files\\layer\\utils"  FILES ${TERRALIB_LAYER_UTILS_SRC_FILES})
source_group("Header Files\\layer\\utils"  FILES ${TERRALIB_LAYER_UTILS_HDR_FILES})
source_group("UI Files\\layer\\utils"      FILES ${TERRALIB_LAYER_UTILS_UI_FILES})

# log
source_group("Source Files\\log"  FILES ${TERRALIB_LOG_SRC_FILES})
source_group("Header Files\\log"  FILES ${TERRALIB_LOG_HDR_FILES})

# mapdisplay
source_group("Source Files\\mapdisplay"  FILES ${TERRALIB_MAPDISPLAY_SRC_FILES})
source_group("Header Files\\mapdisplay"  FILES ${TERRALIB_MAPDISPLAY_HDR_FILES})

# plugin
source_group("Source Files\\plugin\\builder"  FILES ${TERRALIB_PLUGIN_BUILDER_SRC_FILES})
source_group("Header Files\\plugin\\builder"  FILES ${TERRALIB_PLUGIN_BUILDER_HDR_FILES})
source_group("UI Files\\plugin\\builder"      FILES ${TERRALIB_PLUGIN_BUILDER_UI_FILES})
source_group("Source Files\\plugin\\manager"  FILES ${TERRALIB_PLUGIN_MANAGER_SRC_FILES})
source_group("Header Files\\plugin\\manager"  FILES ${TERRALIB_PLUGIN_MANAGER_HDR_FILES})
source_group("UI Files\\plugin\\manager"      FILES ${TERRALIB_PLUGIN_MANAGER_UI_FILES})

# progress
source_group("Source Files\\progress"  FILES ${TERRALIB_PROGRESS_SRC_FILES})
source_group("Header Files\\progress"  FILES ${TERRALIB_PROGRESS_HDR_FILES})

# property
source_group("Source Files\\property"  FILES ${TERRALIB_PROPERTY_SRC_FILES})
source_group("Header Files\\property"  FILES ${TERRALIB_PROPERTY_HDR_FILES})
source_group("UI Files\\property"      FILES ${TERRALIB_PROPERTY_UI_FILES})

# propertybrowser
source_group("Source Files\\propertybrowser"  FILES ${TERRALIB_PROPERTY_BROWSER_SRC_FILES})
source_group("Header Files\\propertybrowser"  FILES ${TERRALIB_PROPERTY_BROWSER_HDR_FILES})

# query
source_group("Source Files\\query"  FILES ${TERRALIB_QUERY_SRC_FILES})
source_group("Header Files\\query"  FILES ${TERRALIB_QUERY_HDR_FILES})
source_group("UI Files\\query"      FILES ${TERRALIB_QUERY_UI_FILES})

# raster
source_group("Source Files\\raster"  FILES ${TERRALIB_RASTER_SRC_FILES})
source_group("Header Files\\raster"  FILES ${TERRALIB_RASTER_HDR_FILES})
source_group("UI Files\\raster"      FILES ${TERRALIB_RASTER_UI_FILES})

# rp
source_group("Source Files\\rp"  FILES ${TERRALIB_RP_SRC_FILES})
source_group("Header Files\\rp"  FILES ${TERRALIB_RP_HDR_FILES})
source_group("UI Files\\rp"      FILES ${TERRALIB_RP_UI_FILES})

# se
source_group("Source Files\\se"  FILES ${TERRALIB_SE_SRC_FILES})
source_group("Header Files\\se"  FILES ${TERRALIB_SE_HDR_FILES})
source_group("UI Files\\se"      FILES ${TERRALIB_SE_UI_FILES})

# srs
source_group("Source Files\\srs"  FILES ${TERRALIB_SRS_SRC_FILES})
source_group("Header Files\\srs"  FILES ${TERRALIB_SRS_HDR_FILES})
source_group("UI Files\\srs"      FILES ${TERRALIB_SRS_UI_FILES})

# st
source_group("Source Files\\st"  FILES ${TERRALIB_ST_SRC_FILES})
source_group("Header Files\\st"  FILES ${TERRALIB_ST_HDR_FILES})
source_group("UI Files\\st"      FILES ${TERRALIB_ST_UI_FILES})

# table
source_group("Source Files\\table"  FILES ${TERRALIB_TABLE_SRC_FILES})
source_group("Header Files\\table"  FILES ${TERRALIB_TABLE_HDR_FILES})
source_group("UI Files\\table"      FILES ${TERRALIB_TABLE_UI_FILES})

# temporal
source_group("Source Files\\temporal"  FILES ${TERRALIB_TEMPORAL_SRC_FILES})
source_group("Header Files\\temporal"  FILES ${TERRALIB_TEMPORAL_HDR_FILES})
source_group("UI Files\\temporal"      FILES ${TERRALIB_TEMPORAL_UI_FILES})

# tools
source_group("Source Files\\tools"  FILES ${TERRALIB_TOOLS_SRC_FILES})
source_group("Header Files\\tools"  FILES ${TERRALIB_TOOLS_HDR_FILES})

# utils
source_group("Source Files\\utils"  FILES ${TERRALIB_UTILS_SRC_FILES})
source_group("Header Files\\utils"  FILES ${TERRALIB_UTILS_HDR_FILES})
source_group("UI Files\\utils"  FILES ${TERRALIB_UTILS_UI_FILES})

# vector
source_group("Source Files\\vector"  FILES ${TERRALIB_VECTOR_SRC_FILES})
source_group("Header Files\\vector"  FILES ${TERRALIB_VECTOR_HDR_FILES})
source_group("UI Files\\vector"      FILES ${TERRALIB_VECTOR_UI_FILES})

TERRALIB_ADD_MODULE(TARGET terralib_mod_qt_widgets
                    QT
                    SOURCES  
                    ${TERRALIB_SRC_FILES} ${TERRALIB_HDR_FILES}
                    ${TERRALIB_CANVAS_SRC_FILES} ${TERRALIB_CANVAS_HDR_FILES} ${TERRALIB_CANVAS_UI_FILES}
                    ${TERRALIB_CEDITOR_SRC_FILES} ${TERRALIB_CEDITOR_HDR_FILES}
                    ${TERRALIB_CHARTS_SRC_FILES} ${TERRALIB_CHARTS_HDR_FILES} ${TERRALIB_CHARTS_UI_FILES}
                    ${TERRALIB_CLASSIFICATION_SRC_FILES} ${TERRALIB_CLASSIFICATION_HDR_FILES} ${TERRALIB_CLASSIFICATION_UI_FILES}
                    ${TERRALIB_COLORBAR_SRC_FILES} ${TERRALIB_COLORBAR_HDR_FILES} ${TERRALIB_COLORBAR_UI_FILES}
                    ${TERRALIB_DATASET_EXPLORER_SRC_FILES} ${TERRALIB_DATASET_EXPLORER_HDR_FILES}
                    ${TERRALIB_DATASET_SELECTOR_SRC_FILES} ${TERRALIB_DATASET_SELECTOR_HDR_FILES} ${TERRALIB_DATASET_SELECTOR_UI_FILES}
					${TERRALIB_DATASET_UTILS_SRC_FILES} ${TERRALIB_DATASET_UTILS_HDR_FILES}
                    ${TERRALIB_DATASOURCE_CONNECTOR_SRC_FILES} ${TERRALIB_DATASOURCE_CONNECTOR_HDR_FILES}
                    ${TERRALIB_DATASOURCE_CORE_SRC_FILES} ${TERRALIB_DATASOURCE_CORE_HDR_FILES}
                    ${TERRALIB_DATASOURCE_EXPLORER_SRC_FILES} ${TERRALIB_DATASOURCE_EXPLORER_HDR_FILES}
                    ${TERRALIB_DATASOURCE_SELECTOR_SRC_FILES} ${TERRALIB_DATASOURCE_SELECTOR_HDR_FILES} ${TERRALIB_DATASOURCE_SELECTOR_UI_FILES}
                    ${TERRALIB_EXCHANGER_SRC_FILES} ${TERRALIB_EXCHANGER_HDR_FILES} ${TERRALIB_EXCHANGER_UI_FILES}
                    ${TERRALIB_EXTERNALTABLE_SRC_FILES} ${TERRALIB_EXTERNALTABLE_HDR_FILES} ${TERRALIB_EXTERNALTABLE_UI_FILES}
                    ${TERRALIB_HELP_SRC_FILES} ${TERRALIB_HELP_HDR_FILES}
                    ${TERRALIB_LAYER_EXPLORER_SRC_FILES} ${TERRALIB_LAYER_EXPLORER_HDR_FILES}
                    ${TERRALIB_LAYER_INFO_SRC_FILES} ${TERRALIB_LAYER_INFO_HDR_FILES}
                    ${TERRALIB_LAYER_SEARCH_SRC_FILES} ${TERRALIB_LAYER_SEARCH_HDR_FILES} ${TERRALIB_LAYER_SEARCH_UI_FILES}
                    ${TERRALIB_LAYER_SELECTOR_SRC_FILES} ${TERRALIB_LAYER_SELECTOR_HDR_FILES}
                    ${TERRALIB_LAYER_UTILS_SRC_FILES} ${TERRALIB_LAYER_UTILS_HDR_FILES} ${TERRALIB_LAYER_UTILS_UI_FILES}
                    ${TERRALIB_LOG_SRC_FILES} ${TERRALIB_LOG_HDR_FILES}
                    ${TERRALIB_MAPDISPLAY_SRC_FILES} ${TERRALIB_MAPDISPLAY_HDR_FILES}
                    ${TERRALIB_PLUGIN_BUILDER_SRC_FILES} ${TERRALIB_PLUGIN_BUILDER_HDR_FILES} ${TERRALIB_PLUGIN_BUILDER_UI_FILES} ${TERRALIB_PLUGIN_MANAGER_SRC_FILES} ${TERRALIB_PLUGIN_MANAGER_HDR_FILES} ${TERRALIB_PLUGIN_MANAGER_UI_FILES}  
                    ${TERRALIB_PROGRESS_SRC_FILES} ${TERRALIB_PROGRESS_HDR_FILES}
                    ${TERRALIB_PROPERTY_SRC_FILES} ${TERRALIB_PROPERTY_HDR_FILES} ${TERRALIB_PROPERTY_UI_FILES}
                    ${TERRALIB_PROPERTY_BROWSER_SRC_FILES} ${TERRALIB_PROPERTY_BROWSER_HDR_FILES}
                    ${TERRALIB_QUERY_SRC_FILES} ${TERRALIB_QUERY_HDR_FILES} ${TERRALIB_QUERY_UI_FILES}
                    ${TERRALIB_RASTER_SRC_FILES} ${TERRALIB_RASTER_HDR_FILES} ${TERRALIB_RASTER_UI_FILES}
                    ${TERRALIB_RP_SRC_FILES} ${TERRALIB_RP_HDR_FILES} ${TERRALIB_RP_UI_FILES}
                    ${TERRALIB_SE_SRC_FILES} ${TERRALIB_SE_HDR_FILES} ${TERRALIB_SE_UI_FILES}
                    ${TERRALIB_SRS_SRC_FILES} ${TERRALIB_SRS_HDR_FILES} ${TERRALIB_SRS_UI_FILES}
                    ${TERRALIB_ST_SRC_FILES} ${TERRALIB_ST_HDR_FILES} ${TERRALIB_ST_UI_FILES}
                    ${TERRALIB_TABLE_SRC_FILES} ${TERRALIB_TABLE_HDR_FILES} ${TERRALIB_TABLE_UI_FILES}
                    ${TERRALIB_TEMPORAL_SRC_FILES} ${TERRALIB_TEMPORAL_HDR_FILES} ${TERRALIB_TEMPORAL_UI_FILES} 
                    ${TERRALIB_TOOLS_SRC_FILES} ${TERRALIB_TOOLS_HDR_FILES}
                    ${TERRALIB_UTILS_SRC_FILES} ${TERRALIB_UTILS_HDR_FILES} ${TERRALIB_UTILS_UI_FILES}
                    ${TERRALIB_VECTOR_SRC_FILES} ${TERRALIB_VECTOR_HDR_FILES} ${TERRALIB_VECTOR_UI_FILES}
                    INCLUDES ${TERRALIB_ABSOLUTE_ROOT_DIR}/src ${QWT_INCLUDE_DIR} ${QTPROPERTYBROWSER_INCLUDE_DIR} ${Qscintilla_INCLUDE_DIR}
                    DEPENDENCIES terralib_mod_common
                                 terralib_mod_core
                                 terralib_mod_filter
                                 terralib_mod_st
                                 terralib_mod_stmemory
                                 terralib_mod_statistics_core
                                 terralib_mod_statistics_qt
                                 terralib_mod_classification
                                 terralib_mod_dataaccess
                                 terralib_mod_datatype
                                 terralib_mod_raster
                                 terralib_mod_geometry
                                 terralib_mod_maptools
                                 terralib_mod_rp
                                 ${QWT_LIBRARY}
                                 ${QTPROPERTYBROWSER_LIBRARY}
                                 ${Qscintilla_LIBRARY}
                                 $<IF:${USE_Qt5},Qt5::Widgets,Qt4::QtGui>
								 $<IF:${USE_Qt5},Qt5::Svg,Qt4::QtSvg>
                                 $<${USE_Qt5}:Qt5::PrintSupport>
                    DEFINITIONS $<$<CXX_COMPILER_ID:MSVC>:TEQTWIDGETSDLL>
                                $<$<CXX_COMPILER_ID:MSVC>:QWT_DLL>
                                $<$<CXX_COMPILER_ID:MSVC>:QSCINTILLA_DLL>                                
                                $<$<CXX_COMPILER_ID:MSVC>:UNICODE>)

TERRALIB_CREATE_TRANSLATION("terralib_mod_qt_widgets"
                            "TE_TR"
                            "TE_TR"
                            "pt_BR"
                            "${TERRALIB_ABSOLUTE_ROOT_DIR}/src/terralib/qt/widgets/"
                            "${TERRALIB_ABSOLUTE_ROOT_DIR}/share/terralib/translations/")      
                          
TERRALIB_REGISTER_TRANSLATION("terralib_mod_qt_widgets"
                              "pt_BR"
                              "${TERRALIB_ABSOLUTE_ROOT_DIR}/share/terralib/translations"
                              "${CMAKE_BINARY_DIR}/share/terralib/translations")
                    