Commit 353231e0 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - compiles on MSYS.

parent e424d933
......@@ -54,12 +54,17 @@ TARGET_LINK_LIBRARIES( ${LibName} ${OWExtBioSigName} ${OWExtEEPName} ${OWExtNift
# Do not forget the install targets
INSTALL( TARGETS ${LibName}
LIBRARY
ARCHIVE # NOTE: this is needed on windows
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
LIBRARY # NOTE: this is needed for all the others
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
)
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Test Setup
......
......@@ -20,10 +20,15 @@ ENDIF()
# install target
INSTALL( TARGETS OWext_biosig
LIBRARY
ARCHIVE # NOTE: this is needed on windows
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
LIBRARY # NOTE: this is needed for all the others
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
)
......@@ -20,10 +20,14 @@ ENDIF()
# install target
INSTALL( TARGETS OWext_biosig
LIBRARY
ARCHIVE # NOTE: this is needed on windows
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
LIBRARY # NOTE: this is needed for all the others
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
......@@ -23,9 +23,14 @@ ENDIF(MSVC_IDE)
# install target
INSTALL( TARGETS OWext_eep
LIBRARY
ARCHIVE # NOTE: this is needed on windows
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
LIBRARY # NOTE: this is needed for all the others
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
......@@ -50,19 +50,16 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(${NIFTI_NIFTILIB_NAME} -lm)
ENDIF(UNIX)
# Install the libs
INSTALL( TARGETS ${NIFTI_NIFTILIB_NAME}
LIBRARY
# install target
INSTALL( TARGETS ${NIFTI_NIFTILIB_NAME} ${NIFTI_ZNZLIB_NAME}
ARCHIVE # NOTE: this is needed on windows
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
INSTALL( TARGETS ${NIFTI_ZNZLIB_NAME}
LIBRARY
LIBRARY # NOTE: this is needed for all the others
DESTINATION ${OW_LIBRARY_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
)
......@@ -272,36 +272,23 @@ void WMainWindow::setupGUI()
bool hideWidget;
if( !( WPreferences::getPreference( "qt4gui.hideAxial", &hideWidget ) && hideWidget) )
{
#ifndef _MSC_VER
m_navAxial = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "Axial View", "Axial View", this, "Axial Slice",
m_navAxial = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( QString( "Axial View" ), QString( "Axial View" ), this, std::string( "Axial Slice" ),
m_mainGLWidget.get() ) );
#else
m_navAxial = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "Axial View", "Axial View", this, "Axial Slice" ) );
#endif
m_navAxial->setFeatures( QDockWidget::AllDockWidgetFeatures );
m_glDock->addDockWidget( Qt::LeftDockWidgetArea, m_navAxial.get() );
}
if( !( WPreferences::getPreference( "qt4gui.hideCoronal", &hideWidget ) && hideWidget) )
{
#ifndef _MSC_VER
m_navCoronal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "Coronal View", "Coronal View", this, "Coronal Slice",
m_mainGLWidget.get() ) );
#else
m_navCoronal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "Coronal View", "Coronal View", this, "Coronal Slice" ) );
#endif
m_navCoronal->setFeatures( QDockWidget::AllDockWidgetFeatures );
m_glDock->addDockWidget( Qt::LeftDockWidgetArea, m_navCoronal.get() );
}
if( !( WPreferences::getPreference( "qt4gui.hideSagittal", &hideWidget ) && hideWidget) )
{
#ifndef _MSC_VER
m_navSagittal =
boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "Sagittal View", "Sagittal View", this, "Sagittal Slice",
m_mainGLWidget.get() ) );
#else
m_navSagittal =
boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "Sagittal View", "Sagittal View", this, "Sagittal Slice" ) );
#endif
m_navSagittal->setFeatures( QDockWidget::AllDockWidgetFeatures );
m_glDock->addDockWidget( Qt::LeftDockWidgetArea, m_navSagittal.get() );
}
......
......@@ -29,7 +29,7 @@
#include "WQtGLDockWidget.moc"
WQtGLDockWidget::WQtGLDockWidget( QString viewTitle, QString dockTitle, QWidget* parent, WGECamera::ProjectionMode projectionMode,
const QGLWidget* shareWidget )
const QWidget* shareWidget )
: QDockWidget( dockTitle, parent )
{
setObjectName( QString( "GL - " ) + dockTitle );
......@@ -42,11 +42,7 @@ WQtGLDockWidget::WQtGLDockWidget( QString viewTitle, QString dockTitle, QWidget*
m_panel = new QWidget( this );
m_layout = new QVBoxLayout();
#ifndef _MSC_VER
m_glWidget = boost::shared_ptr<WQtGLWidget>( new WQtGLWidget( viewTitle.toStdString(), m_panel, projectionMode, shareWidget ) );
#else
m_glWidget = boost::shared_ptr<WQtGLWidget>( new WQtGLWidget( viewTitle.toStdString(), m_panel, projectionMode ) );
#endif
setMinimumSize( 240, 240 );
//setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum );
......
......@@ -50,7 +50,7 @@ public:
* \param shareWidget this widget will share OpenGL display lists and texture objects with shareWidget
*/
WQtGLDockWidget( QString viewTitle, QString dockTitle, QWidget* parent, WGECamera::ProjectionMode projectionMode = WGECamera::ORTHOGRAPHIC,
const QGLWidget* shareWidget = 0 );
const QWidget* shareWidget = 0 );
/**
* destructor.
......
......@@ -40,20 +40,20 @@
#include "core/kernel/WKernel.h"
#ifndef __APPLE__
#ifndef _MSC_VER
#include <osgViewer/api/X11/GraphicsWindowX11>
typedef osgViewer::GraphicsWindowX11::WindowData WindowData;
#else
#include <osgViewer/api/Win32/GraphicsWindowWin32>
typedef osgViewer::GraphicsWindowWin32::WindowData WindowData;
#endif
#ifndef _WIN32
#include <osgViewer/api/X11/GraphicsWindowX11>
typedef osgViewer::GraphicsWindowX11::WindowData WindowData;
#else
#include <osgViewer/api/Win32/GraphicsWindowWin32>
typedef osgViewer::GraphicsWindowWin32::WindowData WindowData;
#endif
#endif
WQtGLWidget::WQtGLWidget( std::string nameOfViewer, QWidget* parent, WGECamera::ProjectionMode projectionMode, const QGLWidget * shareWidget ):
#ifndef _MSC_VER
QGLWidget( getDefaultFormat(), parent, shareWidget ),
WQtGLWidget::WQtGLWidget( std::string nameOfViewer, QWidget* parent, WGECamera::ProjectionMode projectionMode, const QWidget*
#ifndef _WIN32
shareWidget ): QGLWidget( getDefaultFormat(), parent, dynamic_cast< const QGLWidget* >( shareWidget ) ),
#else
QWidget( parent ),
): QWidget( parent ),
#endif
m_nameOfViewer( nameOfViewer ),
m_recommendedSize(),
......
......@@ -46,7 +46,7 @@
*/
// NOTE: to make this work with MOC, the defines must be set before MOC runs (ensured in Build system)
class WQtGLWidget: public
#ifndef _MSC_VER
#ifndef _WIN32
QGLWidget
#else
QWidget
......@@ -66,7 +66,7 @@ public:
* \return
*/
explicit WQtGLWidget( std::string nameOfViewer, QWidget* parent = 0,
WGECamera::ProjectionMode projectionMode = WGECamera::ORTHOGRAPHIC, const QGLWidget * shareWidget = 0 );
WGECamera::ProjectionMode projectionMode = WGECamera::ORTHOGRAPHIC, const QWidget * shareWidget = 0 );
/**
* Destructor.
......
......@@ -39,7 +39,7 @@
#include "WQtNavGLWidget.h"
#include "WQtNavGLWidget.moc"
WQtNavGLWidget::WQtNavGLWidget( QString viewTitle, QString dockTitle, QWidget* parent, std::string sliderTitle, const QGLWidget * shareWidget )
WQtNavGLWidget::WQtNavGLWidget( QString viewTitle, QString dockTitle, QWidget* parent, std::string sliderTitle, const QWidget * shareWidget )
: WQtGLDockWidget( viewTitle, dockTitle, parent, WGECamera::ORTHOGRAPHIC, shareWidget )
{
propertyWidgetMap.clear();
......
......@@ -54,7 +54,7 @@ public:
* \param sliderTitle Name of the slider corresponding to the property it manipulates
* \param shareWidget this widget will share OpenGL display lists and texture objects with shareWidget
*/
WQtNavGLWidget( QString viewTitle, QString dockTitle, QWidget* parent, std::string sliderTitle="pos", const QGLWidget * shareWidget = 0 );
WQtNavGLWidget( QString viewTitle, QString dockTitle, QWidget* parent, std::string sliderTitle="pos", const QWidget * shareWidget = 0 );
/**
* destructor.
......
......@@ -87,7 +87,12 @@ FUNCTION( SETUP_MODULE _MODULE_NAME _MODULE_SOURCE_DIR _MODULE_DEPENDENCIES _MOD
# Do not forget the install targets
# NOTE: do we really need to set all permissions explicitely?
INSTALL( TARGETS ${MODULE_NAME}
LIBRARY
ARCHIVE # NOTE: this is needed on windows
DESTINATION ${MODULE_TARGET_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
LIBRARY # NOTE: this is needed for all the others
DESTINATION ${MODULE_TARGET_DIR_RELATIVE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
......
......@@ -97,6 +97,6 @@ SET( CPACK_PACKAGE_CONTACT "Mathias Goldau <goldau@informatik.uni-leipzig.de>" )
# Let CPack do its work
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
INCLUDE( CPack )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment