#
# Name of project
#
PROJECT (Brain)

#
# Need XML from Qt
#
SET(QT_DONT_USE_QTGUI)

#
# Add QT for includes
#
if(Qt6_FOUND)
    include_directories(${Qt6Core_INCLUDE_DIRS})
    include_directories(${Qt6Core5Compat_INCLUDE_DIRS})
    include_directories(${Qt6Network_INCLUDE_DIRS})
    include_directories(${Qt6Gui_INCLUDE_DIRS})
endif()
if(Qt5_FOUND)
    include_directories(${Qt5Core_INCLUDE_DIRS})
    include_directories(${Qt5Network_INCLUDE_DIRS})
    include_directories(${Qt5Gui_INCLUDE_DIRS})
endif()

#
# Create the brain library
#
ADD_LIBRARY(Brain
AnnotationArrangerExecutor.h
AnnotationArrangerInputs.h
AnnotationClipboard.h
AnnotationManager.h
AnnotationTextSubstitutionLayer.h
AnnotationTextSubstitutionLayerSet.h
BorderDrawingTypeEnum.h
Brain.h
BrainOpenGL.h
BrainOpenGLAnnotationDrawingFixedPipeline.h
BrainOpenGLChartDrawingInterface.h
BrainOpenGLChartDrawingFixedPipeline.h
BrainOpenGLChartTwoDrawingFixedPipeline.h
BrainOpenGLChartTwoDrawingInterface.h
BrainOpenGLFixedPipeline.h
BrainOpenGLFociDrawing.h
BrainOpenGLHistologySliceDrawing.h
BrainOpenGLIdentificationDrawing.h
BrainOpenGLMediaCoordinateDrawing.h
BrainOpenGLMediaDrawing.h
BrainOpenGLPrimitiveDrawing.h
BrainOpenGLShape.h
BrainOpenGLShapeCone.h
BrainOpenGLShapeCube.h
BrainOpenGLShapeCylinder.h
BrainOpenGLShapeRing.h
BrainOpenGLShapeSphere.h
BrainOpenGLTextRenderInterface.h
BrainOpenGLViewportContent.h
BrainOpenGLVolumeMprThreeDrawing.h
BrainOpenGLVolumeMprTwoDrawing.h
BrainOpenGLVolumeObliqueSliceDrawing.h
BrainOpenGLVolumeSliceDrawing.h
BrainOpenGLVolumeSurfaceClippedOutlineDrawing.h
BrainOpenGLVolumeSurfaceOutlineDrawing.h
BrainOpenGLWindowContent.h
BrainStructure.h
BrainStructureNodeAttributes.h
BrowserTabContent.h
BrowserWindowContent.h
ChartTwoOverlay.h
ChartTwoOverlayActiveModeEnum.h
ChartTwoOverlaySet.h
ChartTwoOverlaySetArray.h
ChartingDataManager.h
CiftiConnectivityMatrixDataFileManager.h
CiftiFiberTrajectoryManager.h
ClippingPlaneGroup.h
ClippingPlanePanningModeEnum.h
DataToolTipsManager.h
DisplayProperties.h
DisplayPropertiesAnnotation.h
DisplayPropertiesAnnotationTextSubstitution.h
DisplayPropertiesBorders.h
DisplayPropertiesCziImages.h
DisplayPropertiesFiberOrientation.h
DisplayPropertiesFoci.h
DisplayPropertiesImages.h
DisplayPropertiesLabels.h
DisplayPropertiesSamples.h
DisplayPropertiesSurface.h
DisplayPropertiesVolume.h
DisplayPropertyDataBoolean.h
DisplayPropertyDataEnum.h
DisplayPropertyDataFloat.h
DrawingViewportContent.h
DrawingViewportContentManager.h
DrawingViewportContentSurface.h
DrawingViewportContentTypeEnum.h
DrawingViewportContentVolumeSlice.h
DummyFontTextRenderer.h
EventAnnotationBarsGet.h
EventAnnotationGetBeingDrawnInWindow.h
EventBrainReset.h
EventBrainStructureGetAll.h
EventBrowserTabGet.h
EventBrowserTabGetAll.h
EventBrowserTabGetAllViewed.h
EventBrowserTabGetAtWindowXY.h
EventBrowserTabIndexGetWindowIndex.h
EventBrowserTabReopenAvailable.h
EventBrowserTabValidate.h
EventBrowserWindowContent.h
EventBrowserWindowGetTabs.h
EventCaretMappableDataFilesAndMapsInDisplayedOverlays.h
EventChartTwoOverlayValidate.h
EventDataFileAdd.h
EventDataFileDelete.h
EventDataFileRead.h
EventDataFileReload.h
EventDataFileReloadAll.h
EventDrawingViewportContentAdd.h
EventDrawingViewportContentClear.h
EventDrawingViewportContentGet.h
EventGetBrainOpenGLTextRenderer.h
EventIdentificationHighlightLocation.h
EventImageCapture.h
EventModelAdd.h
EventModelDelete.h
EventModelGetAll.h
EventModelGetAllDisplayed.h
EventModelSurfaceGet.h
EventNodeDataFilesGet.h
EventNodeIdentificationColorsGetFromCharts.h
EventOverlayValidate.h
EventSceneActive.h
EventSpacerTabGet.h
EventSpecFileReadDataFiles.h
EventSurfacesGet.h
EventUserInputModeGet.h
FeatureColoringTypeEnum.h
FiberOrientationSamplesLoader.h
FiberOrientationSamplesVector.h
FiberOrientationSymbolTypeEnum.h
FociDrawingProjectionTypeEnum.h
FociDrawingTypeEnum.h
FtglFontTextRenderer.h
GapsAndMargins.h
HistologyOverlay.h
HistologyOverlaySet.h
HistologyOverlaySetArray.h
HistologySliceSettings.h
IdentificationFilter.h
IdentificationFilterTabSelectionEnum.h
IdentificationFormattedTextGenerator.h
IdentificationHistoryManager.h
IdentificationHistoryRecord.h
IdentificationManager.h
IdentificationSimpleTextGenerator.h
IdentificationStringBuilder.h
IdentificationSymbolSizeTypeEnum.h
IdentificationWithColor.h
IdentifiedItemBase.h
IdentifiedItemNode.h
IdentifiedItemUniversal.h
IdentifiedItemUniversalTypeEnum.h
IdentifiedItemVoxel.h
ImageDepthPositionEnum.h
MediaOverlay.h
MediaOverlaySet.h
MediaOverlaySetArray.h
Model.h
ModelChart.h
ModelChartTwo.h
ModelHistology.h
ModelMedia.h
ModelSurface.h
ModelSurfaceMontage.h
ModelSurfaceSelector.h
ModelTypeEnum.h
ModelVolume.h
ModelWholeBrain.h
MouseEvent.h
MouseLeftDragModeEnum.h
MovieRecorder.h
MovieRecorderCaptureRegionTypeEnum.h
MovieRecorderModeEnum.h
MovieRecorderVideoFormatTypeEnum.h
MovieRecorderVideoResolutionTypeEnum.h
OffScreenSceneRendererBase.h
OffScreenSceneRendererOSMesa.h
OffScreenSceneRendererOpenGLWindow.h
Overlay.h
OverlaySet.h
OverlaySetArray.h
OverlaySetInitializer.h
ProjectionViewTypeEnum.h
SamplesDrawingModeEnum.h
SamplesDrawingSettings.h
SamplesMetaDataManager.h
SelectionItemDataTypeEnum.h
SelectionItem.h
SelectionItemAnnotation.h
SelectionItemBorderSurface.h
SelectionItemChartDataSeries.h
SelectionItemChartFrequencySeries.h
SelectionItemChartMatrix.h
SelectionItemChartTimeSeries.h
SelectionItemChartTwoHistogram.h
SelectionItemChartTwoLabel.h
SelectionItemChartTwoLineLayer.h
SelectionItemChartTwoLineLayerVerticalNearest.h
SelectionItemChartTwoLineSeries.h
SelectionItemChartTwoMatrix.h
SelectionItemCiftiConnectivityMatrixRowColumn.h
SelectionItemFocusSurface.h
SelectionItemFocus.h
SelectionItemHistologyCoordinate.h
SelectionItemImageControlPoint.h
SelectionItemMediaLogicalCoordinate.h
SelectionItemMediaPlaneCoordinate.h
SelectionItemSurfaceNode.h
SelectionItemSurfaceTriangle.h
SelectionItemUniversalIdentificationSymbol.h
SelectionItemVolumeMprCrosshair.h
SelectionItemVoxel.h
SelectionItemVoxelEditing.h
SelectionManager.h
SessionManager.h
SpacerTabContent.h
Surface.h
SurfaceDrawingTypeEnum.h
SurfaceMontageConfigurationAbstract.h
SurfaceMontageConfigurationCerebellar.h
SurfaceMontageConfigurationCerebral.h
SurfaceMontageConfigurationFlatMaps.h
SurfaceMontageConfigurationHippocampus.h
SurfaceMontageConfigurationHippocampusFlatMaps.h
SurfaceMontageConfigurationTypeEnum.h
SurfaceMontageLayoutOrientationEnum.h
SurfaceMontageViewport.h
SurfaceNodeColoring.h
SurfaceSelectionModel.h
TabContentBase.h
UserInputModeEnum.h
ViewingTransformationToFitRegion.h
ViewingTransformations.h
ViewingTransformationsCerebellum.h
ViewingTransformationsMedia.h
ViewingTransformationsUndoCommand.h
ViewingTransformationsVolume.h
VolumeMprOrientationModeEnum.h
VolumeMprSettings.h
VolumeMontageSliceOrderModeEnum.h
VolumeMprViewModeEnum.h
VolumeMprViewportSlice.h
VolumeMprVirtualSliceView.h
VolumeMontageCoordinateTextAlignmentEnum.h
VolumeSliceDrawingTypeEnum.h
VolumeSliceInterpolationEdgeEffectsMaskingEnum.h
VolumeSliceSettings.h
VolumeSurfaceOutlineColorOrTabModel.h
VolumeSurfaceOutlineDrawingModeEnum.h
VolumeSurfaceOutlineModel.h
VolumeSurfaceOutlineModelCacheKey.h
VolumeSurfaceOutlineModelCacheValue.h
VolumeSurfaceOutlineSetModel.h
WholeBrainSurfaceSettings.h
WholeBrainVoxelDrawingMode.h
WindowTabAspectRatios.h

AnnotationArrangerExecutor.cxx
AnnotationArrangerInputs.cxx
AnnotationClipboard.cxx
AnnotationManager.cxx
AnnotationTextSubstitutionLayer.cxx
AnnotationTextSubstitutionLayerSet.cxx
BorderDrawingTypeEnum.cxx
Brain.cxx
BrainOpenGL.cxx
BrainOpenGLAnnotationDrawingFixedPipeline.cxx
BrainOpenGLChartDrawingFixedPipeline.cxx
BrainOpenGLChartTwoDrawingFixedPipeline.cxx
BrainOpenGLFixedPipeline.cxx
BrainOpenGLFociDrawing.cxx
BrainOpenGLHistologySliceDrawing.cxx
BrainOpenGLIdentificationDrawing.cxx
BrainOpenGLMediaCoordinateDrawing.cxx
BrainOpenGLMediaDrawing.cxx
BrainOpenGLPrimitiveDrawing.cxx
BrainOpenGLShape.cxx
BrainOpenGLShapeCone.cxx
BrainOpenGLShapeCube.cxx
BrainOpenGLShapeCylinder.cxx
BrainOpenGLShapeRing.cxx
BrainOpenGLShapeSphere.cxx
BrainOpenGLTextRenderInterface.cxx
BrainOpenGLViewportContent.cxx
BrainOpenGLVolumeMprThreeDrawing.cxx
BrainOpenGLVolumeMprTwoDrawing.cxx
BrainOpenGLVolumeObliqueSliceDrawing.cxx
BrainOpenGLVolumeSliceDrawing.cxx
BrainOpenGLVolumeSurfaceClippedOutlineDrawing.cxx
BrainOpenGLVolumeSurfaceOutlineDrawing.cxx
BrainOpenGLWindowContent.cxx
BrainStructure.cxx
BrainStructureNodeAttributes.cxx
BrowserTabContent.cxx
BrowserWindowContent.cxx
ChartTwoOverlay.cxx
ChartTwoOverlayActiveModeEnum.cxx
ChartTwoOverlaySet.cxx
ChartTwoOverlaySetArray.cxx
ChartingDataManager.cxx
CiftiConnectivityMatrixDataFileManager.cxx
CiftiFiberTrajectoryManager.cxx
ClippingPlaneGroup.cxx
ClippingPlanePanningModeEnum.cxx
DataToolTipsManager.cxx
DisplayProperties.cxx
DisplayPropertiesAnnotation.cxx
DisplayPropertiesAnnotationTextSubstitution.cxx
DisplayPropertiesBorders.cxx
DisplayPropertiesCziImages.cxx
DisplayPropertiesFiberOrientation.cxx
DisplayPropertiesFoci.cxx
DisplayPropertiesImages.cxx
DisplayPropertiesLabels.cxx
DisplayPropertiesSamples.cxx
DisplayPropertiesSurface.cxx
DisplayPropertiesVolume.cxx
DisplayPropertyDataBoolean.cxx
DisplayPropertyDataFloat.cxx
DrawingViewportContent.cxx
DrawingViewportContentManager.cxx
DrawingViewportContentSurface.cxx
DrawingViewportContentTypeEnum.cxx
DrawingViewportContentVolumeSlice.cxx
DummyFontTextRenderer.cxx
EventAnnotationBarsGet.cxx
EventAnnotationGetBeingDrawnInWindow.cxx
EventBrainReset.cxx
EventBrainStructureGetAll.cxx
EventBrowserTabGet.cxx
EventBrowserTabGetAll.cxx
EventBrowserTabGetAllViewed.cxx
EventBrowserTabGetAtWindowXY.cxx
EventBrowserTabIndexGetWindowIndex.cxx
EventBrowserTabReopenAvailable.cxx
EventBrowserTabValidate.cxx
EventBrowserWindowContent.cxx
EventBrowserWindowGetTabs.cxx
EventCaretMappableDataFilesAndMapsInDisplayedOverlays.cxx
EventChartTwoOverlayValidate.cxx
EventDataFileAdd.cxx
EventDataFileDelete.cxx
EventDataFileRead.cxx
EventDataFileReload.cxx
EventDataFileReloadAll.cxx
EventDrawingViewportContentAdd.cxx
EventDrawingViewportContentClear.cxx
EventDrawingViewportContentGet.cxx
EventGetBrainOpenGLTextRenderer.cxx
EventIdentificationHighlightLocation.cxx
EventImageCapture.cxx
EventModelAdd.cxx
EventModelDelete.cxx
EventModelGetAll.cxx
EventModelGetAllDisplayed.cxx
EventModelSurfaceGet.cxx
EventNodeDataFilesGet.cxx
EventNodeIdentificationColorsGetFromCharts.cxx
EventOverlayValidate.cxx
EventSceneActive.cxx
EventSpacerTabGet.cxx
EventSpecFileReadDataFiles.cxx
EventSurfacesGet.cxx
EventUserInputModeGet.cxx
FeatureColoringTypeEnum.cxx
FiberOrientationSamplesLoader.cxx
FiberOrientationSymbolTypeEnum.cxx
FociDrawingProjectionTypeEnum.cxx
FociDrawingTypeEnum.cxx
FtglFontTextRenderer.cxx
GapsAndMargins.cxx
HistologyOverlay.cxx
HistologyOverlaySet.cxx
HistologyOverlaySetArray.cxx
HistologySliceSettings.cxx
IdentificationFilter.cxx
IdentificationFilterTabSelectionEnum.cxx
IdentificationFormattedTextGenerator.cxx
IdentificationHistoryManager.cxx
IdentificationHistoryRecord.cxx
IdentificationManager.cxx
IdentificationSimpleTextGenerator.cxx
IdentificationStringBuilder.cxx
IdentificationSymbolSizeTypeEnum.cxx
IdentificationWithColor.cxx
IdentifiedItemBase.cxx
IdentifiedItemNode.cxx
IdentifiedItemUniversal.cxx
IdentifiedItemUniversalTypeEnum.cxx
IdentifiedItemVoxel.cxx
ImageDepthPositionEnum.cxx
MediaOverlay.cxx
MediaOverlaySet.cxx
MediaOverlaySetArray.cxx
Model.cxx
ModelChart.cxx
ModelChartTwo.cxx
ModelHistology.cxx
ModelMedia.cxx
ModelSurface.cxx
ModelSurfaceMontage.cxx
ModelSurfaceSelector.cxx
ModelTypeEnum.cxx
ModelVolume.cxx
ModelWholeBrain.cxx
MouseEvent.cxx
MouseLeftDragModeEnum.cxx
MovieRecorder.cxx
MovieRecorderCaptureRegionTypeEnum.cxx
MovieRecorderModeEnum.cxx
MovieRecorderVideoFormatTypeEnum.cxx
MovieRecorderVideoResolutionTypeEnum.cxx
OffScreenSceneRendererBase.cxx
OffScreenSceneRendererOSMesa.cxx
OffScreenSceneRendererOpenGLWindow.cxx
Overlay.cxx
OverlaySet.cxx
OverlaySetArray.cxx
OverlaySetInitializer.cxx
ProjectionViewTypeEnum.cxx
SamplesDrawingModeEnum.cxx
SamplesDrawingSettings.cxx
SamplesMetaDataManager.cxx
SelectionItemDataTypeEnum.cxx
SelectionItem.cxx
SelectionItemAnnotation.cxx
SelectionItemBorderSurface.cxx
SelectionItemChartDataSeries.cxx
SelectionItemChartFrequencySeries.cxx
SelectionItemChartMatrix.cxx
SelectionItemChartTimeSeries.cxx
SelectionItemChartTwoHistogram.cxx
SelectionItemChartTwoLabel.cxx
SelectionItemChartTwoLineLayer.cxx
SelectionItemChartTwoLineLayerVerticalNearest.cxx
SelectionItemChartTwoLineSeries.cxx
SelectionItemChartTwoMatrix.cxx
SelectionItemCiftiConnectivityMatrixRowColumn.cxx
SelectionItemFocusSurface.cxx
SelectionItemFocus.cxx
SelectionItemHistologyCoordinate.cxx
SelectionItemImageControlPoint.cxx
SelectionItemMediaLogicalCoordinate.cxx
SelectionItemMediaPlaneCoordinate.cxx
SelectionItemSurfaceNode.cxx
SelectionItemSurfaceTriangle.cxx
SelectionItemUniversalIdentificationSymbol.cxx
SelectionItemVolumeMprCrosshair.cxx
SelectionItemVoxel.cxx
SelectionItemVoxelEditing.cxx
SelectionManager.cxx
SessionManager.cxx
SpacerTabContent.cxx
Surface.cxx
SurfaceDrawingTypeEnum.cxx
SurfaceMontageConfigurationAbstract.cxx
SurfaceMontageConfigurationCerebellar.cxx
SurfaceMontageConfigurationCerebral.cxx
SurfaceMontageConfigurationFlatMaps.cxx
SurfaceMontageConfigurationHippocampus.cxx
SurfaceMontageConfigurationHippocampusFlatMaps.cxx
SurfaceMontageConfigurationTypeEnum.cxx
SurfaceMontageLayoutOrientationEnum.cxx
SurfaceMontageViewport.cxx
SurfaceNodeColoring.cxx
SurfaceSelectionModel.cxx
TabContentBase.cxx
UserInputModeEnum.cxx
ViewingTransformationToFitRegion.cxx
ViewingTransformations.cxx
ViewingTransformationsCerebellum.cxx
ViewingTransformationsMedia.cxx
ViewingTransformationsUndoCommand.cxx
ViewingTransformationsVolume.cxx
VolumeMprOrientationModeEnum.cxx
VolumeMprSettings.cxx
VolumeMontageSliceOrderModeEnum.cxx
VolumeMprViewModeEnum.cxx
VolumeMprViewportSlice.cxx
VolumeMprVirtualSliceView.cxx
VolumeMontageCoordinateTextAlignmentEnum.cxx
VolumeSliceDrawingTypeEnum.cxx
VolumeSliceInterpolationEdgeEffectsMaskingEnum.cxx
VolumeSliceSettings.cxx
VolumeSurfaceOutlineColorOrTabModel.cxx
VolumeSurfaceOutlineDrawingModeEnum.cxx
VolumeSurfaceOutlineModel.cxx
VolumeSurfaceOutlineModelCacheKey.cxx
VolumeSurfaceOutlineModelCacheValue.cxx
VolumeSurfaceOutlineSetModel.cxx
WholeBrainSurfaceSettings.cxx
WholeBrainVoxelDrawingMode.cxx
WindowTabAspectRatios.cxx
) 

TARGET_LINK_LIBRARIES(Brain ${CARET_QT5_LINK})

#
# Find Headers
#
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/Annotations
${CMAKE_SOURCE_DIR}/Brain
${CMAKE_SOURCE_DIR}/Charting
${CMAKE_SOURCE_DIR}/Cifti
${CMAKE_SOURCE_DIR}/CZIlib/CZI
${CMAKE_SOURCE_DIR}/FilesBase
${CMAKE_SOURCE_DIR}/Files
${CMAKE_SOURCE_DIR}/Graphics
${CMAKE_SOURCE_DIR}/OmeZarr
${CMAKE_SOURCE_DIR}/Palette
${CMAKE_SOURCE_DIR}/Gifti
${CMAKE_SOURCE_DIR}/Nifti
${CMAKE_SOURCE_DIR}/QxtCore
${CMAKE_SOURCE_DIR}/Scenes
${CMAKE_SOURCE_DIR}/Xml
${CMAKE_SOURCE_DIR}/Common
)

IF (FREETYPE_FOUND)
INCLUDE_DIRECTORIES(
   ${FTGL_INCLUDE_DIRS}
   ${FREETYPE_INCLUDE_DIR_ft2build}
   ${FREETYPE_INCLUDE_DIR_freetype2}
)
ENDIF (FREETYPE_FOUND)

#
# Mesa Library used by Mesa Offscreen Renderer
#
IF (OSMESA_FOUND)
    ADD_DEFINITIONS(${OSMESA_DEFINITION})
    INCLUDE_DIRECTORIES(${OSMESA_INCLUDE_DIRECTORY})
ENDIF (OSMESA_FOUND)

