Commit a1d99faa authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - I am the master of the universe. This commit enables our build...

[CHANGE] - I am the master of the universe. This commit enables our build system to use the system installed biosig,eigen3 and nifti libs/headers if found. If they are not found, our ext/ is used as fallback.
parent 5b13d758
......@@ -191,6 +191,8 @@ SET( OW_SOVERSION ${OW_VERSION_MAJOR} )
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# NOTE: please also have a look in src/ext/CMakeLists.txt. Other third-party libs might be searched there.
# -----------------------------------------------------------------------------------------------------------------------------------------------
# Boost, at least 1.39
# See http://www.boost.org/
......@@ -236,6 +238,58 @@ FIND_PACKAGE( OpenSceneGraph ${MIN_OSG_VERSION} REQUIRED osgDB osgUtil osgGA osg
# include the header paths
INCLUDE_DIRECTORIES( ${OPENSCENEGRAPH_INCLUDE_DIRS} )
# -----------------------------------------------------------------------------------------------------------------------------------------------
# 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()
IF( NOT CMAKE_GENERATOR MATCHES "Visual Studio" )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/ext/biosig )
ADD_SUBDIRECTORY( ext/biosig )
ELSE ()
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/ext/biosigWin )
ADD_SUBDIRECTORY( ext/biosigWin )
ENDIF()
ENDIF()
# -----------------------------------------------------------------------------------------------------------------------------------------------
# Eigen3, at least 3.0.0
# See http://eigen.tuxfamily.org
FIND_PACKAGE( eigen3 QUIET )
IF( EIGEN3_FOUND )
MESSAGE( STATUS "Using system installed eigen3." )
INCLUDE_DIRECTORIES( ${EIGEN3_INCLUDE_DIR} )
ELSE()
INCLUDE_DIRECTORIES( "${PROJECT_SOURCE_DIR}/ext/eigen3" )
ENDIF()
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# OPTIONAL third party libs
......@@ -442,10 +496,7 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR} )
# -----------------------------------------------------------------------------------------------------------------------------------------------
# external libs
SET( OWExtNiftiIOName "openwalnut_niftiio" )
SET( OWExtNiftiZNZName "openwalnut_niftiznz" )
SET( OWExtEEPName "openwalnut_eep" )
SET( OWExtBioSigName "openwalnut_biosig" )
# build external libs in ext/
ADD_SUBDIRECTORY( ext ) # The needed external libraries
......
......@@ -24,7 +24,7 @@
#include <vector>
#include "ext/Eigen/SVD"
#include <Eigen/SVD>
#include "../WAssert.h"
#include "../WLimits.h"
......
......@@ -27,8 +27,8 @@
#define EIGEN_DONT_ALIGN_STATICALLY
#include "ext/Eigen/Core"
#include "ext/Eigen/LU"
#include <Eigen/Core>
#include <Eigen/LU>
/**
* A double matrix of dynamic size. Heap-allocated.
......
......@@ -43,8 +43,8 @@
#include <osg/Matrixd>
// Needed for conversion: Eigen3 Types
#include "ext/Eigen/Core"
#include "ext/Eigen/LU" // needed for the inverse() function
#include <Eigen/Core>
#include <Eigen/LU> // needed for the inverse() function
#include "../../WDefines.h"
#include "../../WStringUtils.h"
......
......@@ -27,13 +27,15 @@
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <nifti1_io.h>
#include "WReader.h"
#include "../WDataSet.h"
#include "../../common/math/WMatrix.h"
#include "ext/nifti/nifti1_io.h"
#include "../WExportDataHandler.h"
/**
......
# 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 )
ADD_SUBDIRECTORY( nifti )
IF( NOT CMAKE_GENERATOR MATCHES "Visual Studio" )
ADD_SUBDIRECTORY( biosig )
ELSE ()
ADD_SUBDIRECTORY( biosigWin )
ENDIF()
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