-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
executable file
·102 lines (78 loc) · 3.56 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
##############################################################################
# @file CMakeLists.txt
# @brief Root build configuration file.
#
# Copyright (c) 2011-2014 University of Pennsylvania. All rights reserved.<br />
# See http://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.
#
# Contact: SBIA Group <sbia-software at uphs.upenn.edu>
##############################################################################
# ----------------------------------------------------------------------------
# minimum required CMake version
cmake_minimum_required( VERSION 2.8.4 )
project( MASS )
# ============================================================================
# FIND PACKAGES
# ============================================================================
# include MUSE macros
include(${CMAKE_SOURCE_DIR}/config/CheckDependency.cmake)
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/config" )
find_package( DRAMMS REQUIRED )
find_package( AFNITools REQUIRED )
find_package( FSLTools REQUIRED )
# ============================================================================
# SET VARIABLES FOR CMAKE
# ============================================================================
#set (CMAKE_INSTALL_PREFIX "" CACHE INTERNAL "Installation prefix." FORCE)
set (SCHEDULER "NONE" CACHE STRING "The manufacturer of the cluster job scheduler. Enter one of these {NONE, SGE, PBS, MISC}. Default: NONE")
set (CMAKE_C_FLAGS "-w" CACHE STRING "Flags used by the compiler during all build types." FORCE)
set (INSTALL_LIBRARY_DIR lib)
set (INSTALL_LIBEXEC_DIR lib)
set (INSTALL_DATA_DIR data)
set (INSTALL_BASH_LIBRARY_DIR lib/bash)
set (PROJECT_NAMESPACE_BASH mass)
set (INSTALL_DOC_DIR doc)
set (DATA_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_DATA_DIR}")
set (LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
set (LIBEXEC_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBEXEC_DIR}")
set (BASH_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_BASH_LIBRARY_DIR}/${PROJECT_NAMESPACE_BASH}")
if(SCHEDULER)
string(TOUPPER ${SCHEDULER} SCHEDULER_U)
if (SCHEDULER_U MATCHES "SGE")
find_package( QSUB REQUIRED )
set (SCHEDULER_SETTING_FILE "SettingsSGE.sh")
elseif (SCHEDULER_U MATCHES "PBS")
set (SCHEDULER_SETTING_FILE "SettingsPBS.sh")
elseif (SCHEDULER_U MATCHES "MISC")
set (SCHEDULER_SETTING_FILE "SettingsMISC.sh")
endif()
endif()
# ============================================================================
# ADD SUBDIRECTORIES
# ============================================================================
add_subdirectory(src)
add_subdirectory(data)
#add_subdirectory(test)
# ============================================================================
# copy the manual pdf from source to installdir during install
# ============================================================================
set (MANUAL_OUTPUT_NAME "${PROJECT_NAME}_Software_Manual")
set (PROJECT_DOC_DIR "${PROJECT_SOURCE_DIR}/doc")
if (EXISTS "${PROJECT_DOC_DIR}/${MANUAL_OUTPUT_NAME}.pdf")
install (
FILES ${PROJECT_DOC_DIR}/${MANUAL_OUTPUT_NAME}.pdf
DESTINATION ${INSTALL_DOC_DIR}/
)
install (
FILES ${PROJECT_SOURCE_DIR}/COPYING.txt
DESTINATION ${INSTALL_DOC_DIR}/
)
endif ()
## ============================================================================
## print all variables
## ============================================================================
#get_cmake_property(_variableNames VARIABLES)
#list (SORT _variableNames)
#foreach (_variableName ${_variableNames})
# message(STATUS "${_variableName}=${${_variableName}}")
#endforeach()