~ubuntu-branches/ubuntu/precise/openwalnut/precise

« back to all changes in this revision

Viewing changes to src/modules/data/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Eichelbaum
  • Date: 2011-06-21 10:26:54 UTC
  • Revision ID: james.westby@ubuntu.com-20110621102654-rq0zf436q949biih
Tags: upstream-1.2.5
ImportĀ upstreamĀ versionĀ 1.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#---------------------------------------------------------------------------
 
2
#
 
3
# Project: OpenWalnut ( http://www.openwalnut.org )
 
4
#
 
5
# Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
 
6
# For more information see http:#www.openwalnut.org/copying
 
7
#
 
8
# This file is part of OpenWalnut.
 
9
#
 
10
# OpenWalnut is free software: you can redistribute it and/or modify
 
11
# it under the terms of the GNU Lesser General Public License as published by
 
12
# the Free Software Foundation, either version 3 of the License, or
 
13
# (at your option) any later version.
 
14
#
 
15
# OpenWalnut is distributed in the hope that it will be useful,
 
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
# GNU Lesser General Public License for more details.
 
19
#
 
20
# You should have received a copy of the GNU Lesser General Public License
 
21
# along with OpenWalnut. If not, see <http:#www.gnu.org/licenses/>.
 
22
#
 
23
#---------------------------------------------------------------------------
 
24
 
 
25
# ---------------------------------------------------------------------------------------------------------------------------------------------------
 
26
# Some common setup
 
27
# ---------------------------------------------------------------------------------------------------------------------------------------------------
 
28
 
 
29
# we use the directory name as module name
 
30
GET_FILENAME_COMPONENT( MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
 
31
 
 
32
# ---------------------------------------------------------------------------------------------------------------------------------------------------
 
33
# Search own dependencies
 
34
# ---------------------------------------------------------------------------------------------------------------------------------------------------
 
35
 
 
36
# 1: FindPackage( LibYouNeed )
 
37
# 2: INCLUDE_DIRECTORIES( ${LIBYOUNEED_INCLUDE_DIR} )
 
38
# 3: LINK_DIRECTORIES( ${LIBYOUNEED_LIBRARY_DIRS} )
 
39
# 4: Add ${LIBYOUNEED_LIBRARY} as _MODULE_DEPENDENCIES parameter to SETUP_MODULE
 
40
 
 
41
 
 
42
# -----------------------------------------------------------------------------------------------------------------------------------------------
 
43
# NiftiLib, at least 2.0.0
 
44
# See  http://niftilib.sourceforge.net
 
45
 
 
46
# we provide the niftilib in ext. If it is found on the system, the system version is used
 
47
SET( OWExtNiftiIOName  "openwalnut_niftiio" )
 
48
SET( OWExtNiftiZNZName  "openwalnut_niftiznz" )
 
49
 
 
50
FIND_PACKAGE( niftilib QUIET )
 
51
IF( NIFTILIB_FOUND )
 
52
   MESSAGE( STATUS "Using system installed nifitlib." )
 
53
   INCLUDE_DIRECTORIES( ${NIFTILIB_INCLUDE_DIR} )
 
54
   SET( OWExtNiftiIOName  ${NIFTILIB_LIBRARY} )
 
55
ELSE()
 
56
    IF( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ext/nifti/CMakeLists.txt" )
 
57
        MESSAGE( STATUS "Found niftilib in \"${CMAKE_CURRENT_SOURCE_DIR}/ext/nifti\"" )
 
58
        INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/ext/nifti )
 
59
        ADD_SUBDIRECTORY( ext/nifti )
 
60
    ELSE()
 
61
        MESSAGE( FATAL_ERROR "Could not find niftilib." )
 
62
    ENDIF()
 
63
ENDIF()
 
64
 
 
65
# -----------------------------------------------------------------------------------------------------------------------------------------------
 
66
# BioSig, at least 0.84
 
67
# See http://biosig.sourceforge.net
 
68
 
 
69
# we provide the biosig in ext. If it is found on the system, the system version is used
 
70
SET( OWExtBioSigName "openwalnut_biosig" )
 
71
 
 
72
FIND_PACKAGE( biosig QUIET )
 
73
IF( BIOSIG_FOUND )
 
74
   MESSAGE( STATUS "Using system installed biosig." )
 
75
   INCLUDE_DIRECTORIES( ${BIOSIG_INCLUDE_DIR} )
 
76
   SET( OWExtBioSigName  ${BIOSIG_LIBRARY} )
 
77
ELSE()
 
78
    IF( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ext/biosig/CMakeLists.txt" )
 
79
        MESSAGE( STATUS "Found biosig in \"${CMAKE_CURRENT_SOURCE_DIR}/ext/biosig\"" )
 
80
        INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/ext/biosig )
 
81
        ADD_SUBDIRECTORY( ext/biosig )
 
82
    ELSE()
 
83
        MESSAGE( FATAL_ERROR "Could not find biosig." )
 
84
    ENDIF()
 
85
ENDIF()
 
86
 
 
87
# -----------------------------------------------------------------------------------------------------------------------------------------------
 
88
# other external libs
 
89
 
 
90
SET( OWExtEEPName    "openwalnut_eep" )
 
91
 
 
92
# libcnt needs absolute inclusion somewhere
 
93
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/ext/libeep )
 
94
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/ext )
 
95
 
 
96
# build external libs in ext/
 
97
ADD_SUBDIRECTORY( ext/libeep) # The needed external libraries
 
98
 
 
99
# ---------------------------------------------------------------------------------------------------------------------------------------------------
 
100
# Setup for compilation
 
101
# ---------------------------------------------------------------------------------------------------------------------------------------------------
 
102
 
 
103
# Let this function do the job. It sets up tests and copies shaders automatically. It additionally configures the stylecheck mechanism for this
 
104
# module.
 
105
SETUP_MODULE( ${MODULE_NAME}                # name of the module
 
106
             "${CMAKE_CURRENT_SOURCE_DIR}"  # where to find the source ${CMAKE_CURRENT_SOURCE_DIR} is a good idea here mostly
 
107
             "${OWExtBioSigName};${OWExtEEPName};${OWExtNiftiIOName}" # does your module need additional libs to compile?
 
108
             "ext"                             # do you want to exclude files from stylechecking? (externals for example)
 
109
)
 
110