-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (43 loc) · 2.12 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
##############################################################################
# @file CMakeLists.txt
# @brief Root build configuration file.
#
# Copyright (c) 2011 University of Pennsylvania. All rights reserved.<br />
# See http://www.rad.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)
# ----------------------------------------------------------------------------
# version of BASIS template used by this project
set (TEMPLATE_VERSION 1.5)
# ----------------------------------------------------------------------------
# include BASIS policies, settings, macros, and functions
# circumvent issue with CMake's find_package() interpreting these variables
# relative to the current binary directory instead of the top-level directory
if (BASIS_DIR AND NOT IS_ABSOLUTE "${BASIS_DIR}")
set (BASIS_DIR "${CMAKE_BINARY_DIR}/${BASIS_DIR}")
get_filename_component (BASIS_DIR "${BASIS_DIR}" ABSOLUTE)
endif ()
# moreover, users tend to specify the installation prefix instead of the
# actual directory containing the package configuration file
if (IS_DIRECTORY "${BASIS_DIR}")
list (INSERT CMAKE_PREFIX_PATH 0 "${BASIS_DIR}")
endif ()
# if BASIS is not found, set CMAKE_INSTALL_PREFIX to invalid value if not
# set explicitly at the command-line such that BASIS will still initialize
# it to its defaults even though already cached
find_package (BASIS)
if (NOT BASIS_FOUND)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (CMAKE_INSTALL_PREFIX "" CACHE INTERNAL "Installation prefix." FORCE)
endif ()
message (FATAL_ERROR "BASIS not found! Please specify installation directory"
" of BASIS or the location of the BASISConfig.cmake file"
" using the BASIS_DIR variable.")
endif ()
# ----------------------------------------------------------------------------
# configure build system
basis_project_impl ()