Commit 537b6598 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - moved all the dependencies to external code in ext to modules/data....

[CHANGE] - moved all the dependencies to external code in ext to modules/data. There, it belongs. I strictly ask you to not intruduce further external dependencies in our source-tree.
parent a5f89e76
......@@ -612,7 +612,7 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = src/core/common/platformDependent/visualStudio/inttypes.h
EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
......
......@@ -612,7 +612,7 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = src/ext \
EXCLUDE = src/modules/data/ext \
src/core/common/platformDependent/visualStudio/inttypes.h \
src/modules/lic/fibernavigator \
src/modules/lic/fantom
......
......@@ -249,41 +249,6 @@ IF( OW_PACKAGE_NOLINK_OPENTHREADS )
ENDFOREACH()
ENDIF()
# -----------------------------------------------------------------------------------------------------------------------------------------------
# NiftiLib, at least 2.0.0
# See http://niftilib.sourceforge.net
# we provide the niftilib in ext. If it is found on the system, the system version is used
SET( OWExtNiftiIOName "openwalnut_niftiio" )
SET( OWExtNiftiZNZName "openwalnut_niftiznz" )
FIND_PACKAGE( niftilib QUIET )
IF( NIFTILIB_FOUND )
MESSAGE( STATUS "Using system installed nifitlib." )
INCLUDE_DIRECTORIES( ${NIFTILIB_INCLUDE_DIR} )
SET( OWExtNiftiIOName ${NIFTILIB_LIBRARY} )
ELSE()
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/ext/nifti )
ADD_SUBDIRECTORY( ext/nifti )
ENDIF()
# -----------------------------------------------------------------------------------------------------------------------------------------------
# BioSig, at least 0.84
# See http://biosig.sourceforge.net
# we provide the biosig in ext. If it is found on the system, the system version is used
SET( OWExtBioSigName "openwalnut_biosig" )
FIND_PACKAGE( biosig QUIET )
IF( BIOSIG_FOUND )
MESSAGE( STATUS "Using system installed biosig." )
INCLUDE_DIRECTORIES( ${BIOSIG_INCLUDE_DIR} )
SET( OWExtBioSigName ${BIOSIG_LIBRARY} )
ELSE()
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/ext/biosig )
ADD_SUBDIRECTORY( ext/biosig )
ENDIF()
# -----------------------------------------------------------------------------------------------------------------------------------------------
# Eigen3, at least 3.0.0
# See http://eigen.tuxfamily.org
......@@ -484,21 +449,9 @@ ADD_CUSTOM_TARGET( install_devdoc
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# libcnt needs absolute inclusion somewhere
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/ext/libeep )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/ext )
# to allow non-core code to access core and ext absolutely
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR} )
# -----------------------------------------------------------------------------------------------------------------------------------------------
# external libs
SET( OWExtEEPName "openwalnut_eep" )
# build external libs in ext/
ADD_SUBDIRECTORY( ext ) # The needed external libraries
# -----------------------------------------------------------------------------------------------------------------------------------------------
# openwalnut core library
......
......@@ -48,8 +48,7 @@ COLLECT_COMPILE_FILES( "${CMAKE_CURRENT_SOURCE_DIR}" TARGET_CPP_FILES TARGET_H_F
# Setup the target
ADD_LIBRARY( ${LibName} SHARED ${TARGET_CPP_FILES} ${TARGET_H_FILES} ${OW_VERSION_HEADER} )
TARGET_LINK_LIBRARIES( ${LibName} ${OWExtBioSigName} ${OWExtEEPName} ${OWExtNiftiIOName}
${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${OPENGL_gl_LIBRARY} ${OPENSCENEGRAPH_LIBRARIES}
TARGET_LINK_LIBRARIES( ${LibName} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${OPENGL_gl_LIBRARY} ${OPENSCENEGRAPH_LIBRARIES}
)
# Tell CMake that someone creates this file for us. See doc of SETUP_VERSION_HEADER in BuildUtils.cmake for details why this is needed.
......
# Needed because libeep has includes of form #include <cnt/cnt.h>
# See http://libeep.sf.net
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/ext/libeep )
ADD_SUBDIRECTORY( libeep )
#---------------------------------------------------------------------------
#
# Project: OpenWalnut ( http://www.openwalnut.org )
#
# Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
# For more information see http:#www.openwalnut.org/copying
#
# This file is part of OpenWalnut.
#
# OpenWalnut 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.
#
# OpenWalnut 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 OpenWalnut. If not, see <http:#www.gnu.org/licenses/>.
#
#---------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Some common setup
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# we use the directory name as module name
GET_FILENAME_COMPONENT( MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Search own dependencies
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# 1: FindPackage( LibYouNeed )
# 2: INCLUDE_DIRECTORIES( ${LIBYOUNEED_INCLUDE_DIR} )
# 3: LINK_DIRECTORIES( ${LIBYOUNEED_LIBRARY_DIRS} )
# 4: Add ${LIBYOUNEED_LIBRARY} as _MODULE_DEPENDENCIES parameter to SETUP_MODULE
# -----------------------------------------------------------------------------------------------------------------------------------------------
# NiftiLib, at least 2.0.0
# See http://niftilib.sourceforge.net
# we provide the niftilib in ext. If it is found on the system, the system version is used
SET( OWExtNiftiIOName "openwalnut_niftiio" )
SET( OWExtNiftiZNZName "openwalnut_niftiznz" )
FIND_PACKAGE( niftilib QUIET )
IF( NIFTILIB_FOUND )
MESSAGE( STATUS "Using system installed nifitlib." )
INCLUDE_DIRECTORIES( ${NIFTILIB_INCLUDE_DIR} )
SET( OWExtNiftiIOName ${NIFTILIB_LIBRARY} )
ELSE()
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/ext/nifti )
ADD_SUBDIRECTORY( ext/nifti )
ENDIF()
# -----------------------------------------------------------------------------------------------------------------------------------------------
# BioSig, at least 0.84
# See http://biosig.sourceforge.net
# we provide the biosig in ext. If it is found on the system, the system version is used
SET( OWExtBioSigName "openwalnut_biosig" )
FIND_PACKAGE( biosig QUIET )
IF( BIOSIG_FOUND )
MESSAGE( STATUS "Using system installed biosig." )
INCLUDE_DIRECTORIES( ${BIOSIG_INCLUDE_DIR} )
SET( OWExtBioSigName ${BIOSIG_LIBRARY} )
ELSE()
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/ext/biosig )
ADD_SUBDIRECTORY( ext/biosig )
ENDIF()
# -----------------------------------------------------------------------------------------------------------------------------------------------
# other external libs
SET( OWExtEEPName "openwalnut_eep" )
# libcnt needs absolute inclusion somewhere
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/ext/libeep )
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/ext )
# build external libs in ext/
ADD_SUBDIRECTORY( ext/libeep) # The needed external libraries
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Setup for compilation
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Let this function do the job. It sets up tests and copies shaders automatically. It additionally configures the stylecheck mechanism for this
# module.
SETUP_MODULE( ${MODULE_NAME} # name of the module
"${CMAKE_CURRENT_SOURCE_DIR}" # where to find the source ${CMAKE_CURRENT_SOURCE_DIR} is a good idea here mostly
"${OWExtBioSigName};${OWExtEEPName};${OWExtNiftiIOName}" # does your module need additional libs to compile?
"ext" # do you want to exclude files from stylechecking? (externals for example)
)
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut 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.
//
// OpenWalnut 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 OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include "core/kernel/WModule.h"
#include "WMData.h"
#include "WMReadSphericalHarmonics.h"
#include "WMWriteNIfTI.h"
/**
* The following macro is used by modules so the factory can acquire a prototype instance from a shared library using the symbol.
* You can write this symbol for your own if you need to add multiple modules to the list. This one is for convenience.
*
* \note we need the module instance to be created using a shared_ptr as WModule is derived from enable_shared_from_this. Removing the shared
* pointer causes segmentation faults during load.
*/
#ifdef _MSC_VER
#define DECLSPECSTUFF __declspec( dllexport )
#else
#define DECLSPECSTUFF
#endif
extern "C" DECLSPECSTUFF void WLoadModule( WModuleList& m ) // NOLINT - yes this is a non-const reference
{
m.push_back( boost::shared_ptr< WModule >( new WMData ) );
m.push_back( boost::shared_ptr< WModule >( new WMReadSphericalHarmonics ) );
m.push_back( boost::shared_ptr< WModule >( new WMWriteNIfTI ) );
}
......@@ -38,20 +38,19 @@
#include "core/dataHandler/WDataTexture3D.h"
#include "core/dataHandler/WEEG2.h"
#include "core/dataHandler/exceptions/WDHException.h"
#include "core/dataHandler/io/WReaderBiosig.h"
#include "core/dataHandler/io/WReaderEEGASCII.h"
#include "core/dataHandler/io/WReaderLibeep.h"
#include "core/dataHandler/io/WReaderNIfTI.h"
#include "core/dataHandler/io/WPagerEEGLibeep.h"
#include "core/dataHandler/io/WReaderELC.h"
#include "core/dataHandler/io/WReaderFiberVTK.h"
#include "core/graphicsEngine/WGEColormapping.h"
#include "core/kernel/WModuleOutputData.h"
#include "WMData.h"
#include "data.xpm"
// This line is needed by the module loader to actually find your module. You need to add this to your module too. Do NOT add a ";" here.
W_LOADABLE_MODULE( WMData )
#include "io/WReaderBiosig.h"
#include "io/WReaderEEGASCII.h"
#include "io/WReaderNIfTI.h"
#include "io/WReaderELC.h"
#include "io/WReaderFiberVTK.h"
#include "io/WReaderLibeep.h"
#include "io/WPagerEEGLibeep.h"
#include "WMData.h"
#include "WMData.xpm"
WMData::WMData():
WDataModule(),
......@@ -76,7 +75,7 @@ boost::shared_ptr< WModule > WMData::factory() const
const char** WMData::getXPMIcon() const
{
return data_xpm;
return WMData_xpm;
}
const std::string WMData::getName() const
......
/* XPM */
static const char * data_xpm[] = {
static const char * WMData_xpm[] = {
"32 32 2 1",
" c None",
". c #000000",
......
......@@ -25,16 +25,15 @@
#include <string>
#include "core/common/WPathHelper.h"
#include "core/dataHandler/io/WReaderNIfTI.h"
#include "core/dataHandler/WDataHandlerEnums.h"
#include "core/graphicsEngine/WGERequirement.h"
#include "core/kernel/WKernel.h"
#include "io/WReaderNIfTI.h"
#include "WMReadSphericalHarmonics.h"
#include "WMReadSphericalHarmonics.xpm"
// This line is needed by the module loader to actually find your module. Do not remove. Do NOT add a ";" here.
W_LOADABLE_MODULE( WMReadSphericalHarmonics )
WMReadSphericalHarmonics::WMReadSphericalHarmonics():
WModule()
{
......
......@@ -22,6 +22,8 @@
//
//---------------------------------------------------------------------------
#include <nifti1_io.h>
#include <stdint.h>
#include <iostream>
......@@ -32,8 +34,6 @@
#include <cmath>
#include <nifti1_io.h>
#include "core/common/WAssert.h"
#include "core/common/WPathHelper.h"
#include "core/common/WStringUtils.h"
......@@ -41,12 +41,9 @@
#include "core/dataHandler/WDataSetRawHARDI.h"
#include "core/kernel/WKernel.h"
#include "core/common/math/linearAlgebra/WLinearAlgebra.h"
#include "WMWriteNIfTI.h"
#include "core/kernel/WModule.h"
// This line is needed by the module loader to actually find your module.
W_LOADABLE_MODULE( WMWriteNIfTI )
#include "WMWriteNIfTI.h"
WMWriteNIfTI::WMWriteNIfTI() :
WModule()
......
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