-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* NiftyReg added to the superbuild * updated NiftyReg tag * added one compilation of NiftyReg to travis
- Loading branch information
Showing
5 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#======================================================================== | ||
# Author: Richard Brown | ||
# Author: Benjamin A Thomas | ||
# Author: Kris Thielemans | ||
# Copyright 2017 University College London | ||
# Copyright 2017 STFC | ||
# | ||
# This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0.txt | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
#========================================================================= | ||
|
||
#This needs to be unique globally | ||
set(proj NiftyReg) | ||
|
||
# Set dependency list | ||
set(${proj}_DEPENDENCIES "") | ||
|
||
# Include dependent projects if any | ||
ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES) | ||
|
||
# Set external name (same as internal for now) | ||
set(externalProjName ${proj}) | ||
|
||
if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalProjName}}" ) ) | ||
message(STATUS "${__indent}Adding project ${proj}") | ||
|
||
### --- Project specific additions here | ||
set(${proj}_Install_Dir ${SUPERBUILD_INSTALL_DIR}) | ||
|
||
#message(STATUS "HDF5_ROOT in External_SIRF: " ${HDF5_ROOT}) | ||
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) | ||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) | ||
|
||
set(${proj}_SOURCE_DIR "${SOURCE_ROOT_DIR}/${proj}" ) | ||
set(${proj}_BINARY_DIR "${SUPERBUILD_WORK_DIR}/builds/${proj}/build" ) | ||
set(${proj}_DOWNLOAD_DIR "${SUPERBUILD_WORK_DIR}/downloads/${proj}" ) | ||
set(${proj}_STAMP_DIR "${SUPERBUILD_WORK_DIR}/builds/${proj}/stamp" ) | ||
set(${proj}_TMP_DIR "${SUPERBUILD_WORK_DIR}/builds/${proj}/tmp" ) | ||
|
||
ExternalProject_Add(${proj} | ||
${${proj}_EP_ARGS} | ||
GIT_REPOSITORY ${${proj}_URL} | ||
GIT_TAG ${${proj}_TAG} | ||
SOURCE_DIR ${${proj}_SOURCE_DIR} | ||
BINARY_DIR ${${proj}_BINARY_DIR} | ||
DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR} | ||
STAMP_DIR ${${proj}_STAMP_DIR} | ||
TMP_DIR ${${proj}_TMP_DIR} | ||
|
||
CMAKE_ARGS | ||
-DCMAKE_PREFIX_PATH=${SUPERBUILD_INSTALL_DIR} | ||
-DCMAKE_LIBRARY_PATH=${SUPERBUILD_INSTALL_DIR}/lib | ||
-DCMAKE_INCLUDE_PATH=${SUPERBUILD_INSTALL_DIR} | ||
-DCMAKE_INSTALL_PREFIX=${${proj}_Install_Dir} | ||
INSTALL_DIR ${${proj}_Install_Dir} | ||
DEPENDS | ||
${${proj}_DEPENDENCIES} | ||
) | ||
|
||
set(${proj}_ROOT ${${proj}_SOURCE_DIR}) | ||
set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) | ||
|
||
else() | ||
if(${USE_SYSTEM_${externalProjName}}) | ||
find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) | ||
message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") | ||
endif() | ||
ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}") | ||
endif() | ||
|
||
mark_as_superbuild( | ||
VARS | ||
${externalProjName}_DIR:PATH | ||
LABELS | ||
"FIND_PACKAGE" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters