Skip to content

Commit

Permalink
CMakeLists.txt is now quite messy, but at least it works. Will ned to…
Browse files Browse the repository at this point in the history
… figure out one better way to deal with it...

git-svn-id: svn+ssh://orchestra.med.harvard.edu/svn/megason/Code/GoFigure2@1541 ef826fda-c0ae-4237-af8e-f8dcbcf7929c
  • Loading branch information
Arnaud Gelas committed Sep 29, 2009
1 parent 74399d3 commit 9629666
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 112 deletions.
47 changes: 42 additions & 5 deletions branches/GoFigure2Beta/CMakeLists.txt
Expand Up @@ -188,10 +188,10 @@ IF( VTK_FOUND )
${GOFIGURE2_BINARY_DIR}/Code/GUI/
${GOFIGURE2_SOURCE_DIR}/Code/GUI/lib
${GOFIGURE2_BINARY_DIR}/Code/GUI/lib
${GOFIGURE2_SOURCE_DIR}/Code/GUI/lib/QGoImageView
${GOFIGURE2_BINARY_DIR}/Code/GUI/lib/QGoImageView
${GOFIGURE2_SOURCE_DIR}/Code/GUI/lib/Plugins
${GOFIGURE2_BINARY_DIR}/Code/GUI/lib/Plugins
${GOFIGURE2_SOURCE_DIR}/Code/GUI/Interfaces
${GOFIGURE2_BINARY_DIR}/Code/GUI/Interfaces
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/
${GOFIGURE2_BINARY_DIR}/Code/GUI/src/
${MEGAVTK2_SOURCE_DIR}
${MEGAVTK2_BINARY_DIR}
${MEGAVTK2_SOURCE_DIR}/vtkItk
Expand All @@ -203,7 +203,44 @@ IF( VTK_FOUND )

INCLUDE( CTest )

ADD_SUBDIRECTORY( Code )
SET( QGoGUISRC_CXX
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoMainWindow.cxx
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoTabElementBase.cxx
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoPluginManager.cxx
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoTabImageView2D.cxx
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoTabImageView3D.cxx
)
SET( QGoGUISRC_HDRS
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoMainWindow.h
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoTabElementBase.h
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoTabImageView3D.h
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoPluginManager.h
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoTabImageView2D.h
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/QGoTabImageViewElementBase.h
)

SET( QGoMainWindow_UI
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/go.ui
)

SET( QGoGUISRC_SRC
${QGoGUISRC_CXX}
# ${QGoMainWindow_QRC}
${QGoGUISRC_MOC}
)

SET( QGoGUIINTERFACES_SRC
${GOFIGURE2_SOURCE_DIR}/Code/GUI/Interfaces/QGoPlugin.cxx
${GOFIGURE2_SOURCE_DIR}/Code/GUI/Interfaces/QGoImageFilterPluginBase.cxx
)

# MESSAGE( SEND_ERROR ${QGoGUIINTERFACES_SRC} )
SET( QGoGUI_SRC
${QGoGUIINTERFACES_SRC}
${QGoGUISRC_SRC}
)

ADD_SUBDIRECTORY( Code )
ADD_SUBDIRECTORY( Examples )
ADD_SUBDIRECTORY( Main )

Expand Down
8 changes: 1 addition & 7 deletions branches/GoFigure2Beta/Code/GUI/CMakeLists.txt
@@ -1,9 +1,3 @@
ADD_SUBDIRECTORY( lib )
ADD_SUBDIRECTORY( src )
ADD_SUBDIRECTORY( Interfaces )

SET( QGoGUI_SRC
${QGoGUI_INTERFACES_SRC}
${QGoGUI_SRC}


ADD_SUBDIRECTORY( Interfaces )
2 changes: 1 addition & 1 deletion branches/GoFigure2Beta/Code/GUI/Interfaces/CMakeLists.txt
@@ -1,2 +1,2 @@
FILE( GLOB QGoGUI_INTERFACES_SRC *.cxx )
# FILE( GLOB QGoGUIINTERFACES_SRC *.cxx )

Expand Up @@ -11,8 +11,6 @@ QGoImageFilterPluginBase::QGoImageFilterPluginBase()
{
this->m_VTKInput = 0;
this->m_VTKOutput = 0;

this->SetAllRequiredInformation();
}

QGoImageFilterPluginBase::~QGoImageFilterPluginBase()
Expand Down
6 changes: 3 additions & 3 deletions branches/GoFigure2Beta/Code/GUI/lib/CMakeLists.txt
@@ -1,7 +1,7 @@
FILE( GLOB *.cxx QGoGUILIB_SRC )
FILE( GLOB *.h QGoGUILIB_HDRS )
FILE( GLOB QGoGUILIB_SRC *.cxx )
FILE( GLOB QGoGUILIB_HDRS *.h )

QT4_WRAP( QGoGUILIB_MOC ${QGoGUILIB_HDRS} )
QT4_WRAP_CPP( QGoGUILIB_MOC ${QGoGUILIB_HDRS} )

ADD_LIBRARY( QGoGui
${QGoGUILIB_SRC}
Expand Down
85 changes: 42 additions & 43 deletions branches/GoFigure2Beta/Code/GUI/src/CMakeLists.txt
@@ -1,43 +1,42 @@
SET( QGoGUISRC_CXX
QGoMainWindow.cxx
QGoTabElementBase.cxx
QGoPluginManager.cxx
QGoTabImageView2D.cxx
QGoTabImageView3D.cxx
)

SET( QGoGUISRC_HDRS
QGoMainWindow.h
QGoTabElementBase.h
QGoTabImageView3D.h
QGoPluginManager.h
QGoTabImageView2D.h
QGoTabImageViewElementBase.h
)

SET( QGoMainWindow_UI
go.ui
)

QT4_WRAP_UI( QGoMainWindow_UI_H ${QGoMainWindow_UI} )

QT4_WRAP_CPP( QGoGUISRC_MOC ${QGoGUISRC_HDRS} )

SET_SOURCE_FILES_PROPERTIES( ${QGoGUISRC_SRC} PROPERTIES
OBJECT_DEPENDS "${QGoMainWindow_UI_H}"
)

SET_SOURCE_FILES_PROPERTIES( ${QGoGUISRC_MOC} PROPERTIES
OBJECT_DEPENDS "${QGoMainWindow_UI_H}"
)

QT4_ADD_RESOURCES( QGoMainWindow_QRC
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/resources/axes.qrc
)

SET( QGoGUI_SRC
${QGoGUISRC_CXX}
${QGoMainWindow_QRC}
${QGoGUISRC_MOC}
)

# SET( QGoGUISRC_CXX
# QGoMainWindow.cxx
# QGoTabElementBase.cxx
# QGoPluginManager.cxx
# QGoTabImageView2D.cxx
# QGoTabImageView3D.cxx
# )
#
# SET( QGoGUISRC_HDRS
# QGoMainWindow.h
# QGoTabElementBase.h
# QGoTabImageView3D.h
# QGoPluginManager.h
# QGoTabImageView2D.h
# QGoTabImageViewElementBase.h
# )
#
# SET( QGoMainWindow_UI
# go.ui
# )
#
# QT4_WRAP_UI( QGoMainWindow_UI_H ${QGoMainWindow_UI} )
#
# QT4_WRAP_CPP( QGoGUISRC_MOC ${QGoGUISRC_HDRS} )
#
# SET_SOURCE_FILES_PROPERTIES( ${QGoGUISRC_CXX} PROPERTIES
# OBJECT_DEPENDS "${QGoMainWindow_UI_H}"
# )
#
# SET_SOURCE_FILES_PROPERTIES( ${QGoGUISRC_MOC} PROPERTIES
# OBJECT_DEPENDS "${QGoMainWindow_UI_H}"
# )
#
# QT4_ADD_RESOURCES( QGoMainWindow_QRC
# ${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/resources/axes.qrc
# )
#
# SET( QGoGUISRC_SRC
# ${QGoGUISRC_CXX}
# ${QGoMainWindow_QRC}
# ${QGoGUISRC_MOC}
# )
16 changes: 8 additions & 8 deletions branches/GoFigure2Beta/Code/GUI/src/QGoTabImageView3D.h
Expand Up @@ -9,16 +9,16 @@ class QGoTabImageView3D : public QGoTabImageViewElementBase
QGoTabImageView3D( QWidget* parent = 0 );
virtual ~QGoTabImageView3D();

void SetImage( vtkImageData* iImage );
void Update();
void SetImage( vtkImageData* iImage ) {}
void Update() {}

std::vector< QMenu* > Menus();
std::list< QToolBar* > ToolBar();
std::list< QDockWidget* > DockWidget();
std::list< QWidget* > AdditionalWidget();
std::vector< QMenu* > Menus() {}
std::list< QToolBar* > ToolBar() {}
std::list< QDockWidget* > DockWidget() {}
std::list< QWidget* > AdditionalWidget() {}

void WriteSettings();
void ReadSettings();
void WriteSettings() {}
void ReadSettings() {}

protected:
private:
Expand Down
Expand Up @@ -13,19 +13,19 @@ ENDFOREACH( var ${MEGAVTK_EXAMPLE_SRC} )


ADD_TEST( imageview2dTest
${EXECUTABLE_OUTPUT_PATH}/imageview2d
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/imageview2d
${TESTING_DATA_PATH}/Circle.png
1
)

ADD_TEST( imageview3dTest
${EXECUTABLE_OUTPUT_PATH}/imageview3d
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/imageview3d
${TESTING_DATA_PATH}/Circle3d.mhd
1
)

ADD_TEST( imageviewcollectionTest
${EXECUTABLE_OUTPUT_PATH}/imageviewcollection
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/imageviewcollection
${TESTING_DATA_PATH}/Circle3d.mhd
1
)
12 changes: 6 additions & 6 deletions branches/GoFigure2Beta/Examples/GUI/lib/CMakeLists.txt
@@ -1,31 +1,31 @@
SET( QGOGUILIB_EXAMPLE_SRC
qgoimageview2d
qgoimageview3d
qgolutdialog.cxx
qgolutdialog
)

FOREACH( var ${QGOGUILIB_EXAMPLE_SRC} )

ADD_EXECUTABLE( ${var} ${var} )
TARGET_LINK_LIBRARIES( ${var}
QGoImageView
QGoGui
)

ENDFOREACH( var ${QGOGUILIB_EXAMPLE_SRC} )

ADD_TEST( qgoimageview2dTest
${EXECUTABLE_OUTPUT_PATH}/qgoimageview2d
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qgoimageview2d
${TESTING_DATA_PATH}/Circle.png
1
)

ADD_TEST( qgoimageview3dTest
${EXECUTABLE_OUTPUT_PATH}/qgoimageview3d
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qgoimageview3d
${TESTING_DATA_PATH}/Circle3D.mhd
1
)

ADD_TEST( qgolutdialogTest
${EXCUTABLE_OUTPUT_PATH}/qgolutdialog
1
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qgolutdialog
1
)
45 changes: 34 additions & 11 deletions branches/GoFigure2Beta/Examples/GUI/src/CMakeLists.txt
@@ -1,30 +1,53 @@
ADD_SUBDIRECTORY( lib )

SET( QGoLIB_EXAMPLES_SRC
qgolutdialog
qgotabelementbase
qgotabimageviewelementbase
qgotabimageview2d
)

INCLUDE_DIRECTORIES( ${GOFIGURE2_BINARY_DIR}/Examples/GUI/src/ )

QT4_WRAP_UI( QGoMainWindow_UI_H ${QGoMainWindow_UI} )

QT4_WRAP_CPP( QGoGUISRC_MOC ${QGoGUISRC_HDRS} )

SET_SOURCE_FILES_PROPERTIES( ${QGoGUISRC_CXX} PROPERTIES
OBJECT_DEPENDS "${QGoMainWindow_UI_H}"
)

SET_SOURCE_FILES_PROPERTIES( ${QGoGUISRC_MOC} PROPERTIES
OBJECT_DEPENDS "${QGoMainWindow_UI_H}"
)

QT4_ADD_RESOURCES( QGoMainWindow_QRC
${GOFIGURE2_SOURCE_DIR}/Code/GUI/src/resources/axes.qrc
)

FOREACH( var ${QGoLIB_EXAMPLES_SRC} )

ADD_EXECUTABLE( ${var} ${var}.cxx )
# MESSAGE( SEND_ERROR ${QGoGUI_SRC} )
ADD_EXECUTABLE( ${var}
${var}.cxx
${QGoGUI_SRC}
${QGoGUISRC_MOC}
${QGoMainWindow_QRC}
)
TARGET_LINK_LIBRARIES( ${var}
QGoLib
QGoGui
QGoIO
ITKBasicFilters
ITKNumerics
ITKCommon
ITKIO
itkQt
)

ENDFOREACH( var ${QGoLIB_EXAMPLES_SRC} )

ADD_TEST( qgotabelementbaseTest
${EXECUTABLE_OUTPUT_PATH}/qgotabelementbase
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qgotabelementbase
)

ADD_TEST( qgotabimageviewelementbaseTest
${EXECUTABLE_OUTPUT_PATH}/qgotabimageviewelementbase
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qgotabimageviewelementbase
)

ADD_TEST( qgolutdialogtest
${EXECUTABLE_OUTPUT_PATH}/qgolutdialog
1
)
44 changes: 21 additions & 23 deletions branches/GoFigure2Beta/Main/CMakeLists.txt
Expand Up @@ -2,26 +2,24 @@ SET( GOFIGURE_APPLICATION_SOURCE_LIST
gofigure.cxx
)

ADD_EXECUTABLE( gofigure
${GOFIGURE_APPLICATION_SOURCE_LIST}
)

TARGET_LINK_LIBRARIES( gofigure
QGoLib
# QGoImageView
# ${QT_LIBRARIES}
# QVTK
ITKBasicFilters
ITKNumerics
ITKIO
vtkImaging
)

INSTALL( TARGETS gofigure
RUNTIME DESTINATION bin
BUNDLE DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
COMPONENT applications
)

#ADD_EXECUTABLE( gofigure
# ${GOFIGURE_APPLICATION_SOURCE_LIST}
# ${QGoGUI_SRC}
# )
#
#TARGET_LINK_LIBRARIES( gofigure
# QGoGui
# ITKBasicFilters
# ITKNumerics
# ITKIO
# vtkImaging
# )
#
#INSTALL( TARGETS gofigure
# RUNTIME DESTINATION bin
# BUNDLE DESTINATION bin
# LIBRARY DESTINATION lib
# ARCHIVE DESTINATION lib/static
# COMPONENT applications
# )
#

0 comments on commit 9629666

Please sign in to comment.