Skip to content

Commit 00ff249

Browse files
authored
Merge pull request #1607 from collint8/master
Satisfies #522
2 parents 394054c + e13661e commit 00ff249

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# For more information, please see: http://software.sci.utah.edu
2+
#
3+
# The MIT License
4+
#
5+
# Copyright (c) 2015 Scientific Computing and Imaging Institute,
6+
# University of Utah.
7+
#
8+
#
9+
# Permission is hereby granted, free of charge, to any person obtaining a
10+
# copy of this software and associated documentation files (the "Software"),
11+
# to deal in the Software without restriction, including without limitation
12+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
13+
# and/or sell copies of the Software, and to permit persons to whom the
14+
# Software is furnished to do so, subject to the following conditions:
15+
#
16+
# The above copyright notice and this permission notice shall be included
17+
# in all copies or substantial portions of the Software.
18+
#
19+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20+
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25+
# DEALINGS IN THE SOFTWARE.
26+
27+
SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})
28+
29+
SET(data_SVN_URL "https://gforge.sci.utah.edu/svn/CIBCData")
30+
SET(sci_data_DIR "${CMAKE_BINARY_DIR}/SCIRunData")
31+
32+
ExternalProject_Add(SCI_data_external
33+
SVN_REPOSITORY "${data_SVN_URL}"
34+
SVN_TRUST_CERT 1
35+
SVN_USERNAME "anonymous"
36+
SVN_PASSWIRD ""
37+
DOWNLOAD_DIR "${sci_data_DIR}"
38+
PATCH_COMMAND ""
39+
INSTALL_DIR ""
40+
INSTALL_COMMAND ""
41+
CONFIGURE_COMMAND ""
42+
CMAKE_COMMAND ""
43+
BUILD_COMMAND ""
44+
)
45+
46+
ExternalProject_Get_Property(SCI_data_external BINARY_DIR)
47+
SET(SCI_DATA_DIR ${sci_data_DIR} CACHE PATH "")
48+

Superbuild/Superbuild.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ OPTION(BUILD_WITH_PYTHON "Build with python support." ON)
7474
# Configure tetgen
7575
OPTION(WITH_TETGEN "Build Tetgen." OFF)
7676

77+
###########################################
78+
# Configure data
79+
OPTION(BUILD_WITH_SCIRUN_DATA "Svn checkout data" ON)
80+
7781
###########################################
7882
# Configure Windows executable to run with
7983
# or without the console
@@ -98,7 +102,9 @@ IF(TRAVIS_BUILD)
98102
SET(DOWNLOAD_TOOLKITS OFF)
99103
SET(BUILD_HEADLESS ON)
100104
SET(BUILD_WITH_PYTHON OFF)
105+
SET(BUILD_WITH_SCIRUN_DATA OFF)
101106
ELSE()
107+
SET(BUILD_WITH_SCIRUN_DATA OFF)
102108
# try building everything with clang!
103109
ENDIF()
104110
ADD_DEFINITIONS(-DTRAVIS_BUILD)
@@ -168,6 +174,14 @@ IF(BUILD_WITH_PYTHON)
168174
ADD_EXTERNAL( ${SUPERBUILD_DIR}/PythonExternal.cmake Python_external )
169175
ENDIF()
170176

177+
FIND_PACKAGE(Subversion)
178+
IF(NOT Subversion_FOUND)
179+
SET(BUILD_WITH_SCIRUN_DATA OFF)
180+
ENDIF()
181+
IF(BUILD_WITH_SCIRUN_DATA)
182+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/SCIRunDataExternal.cmake SCI_data_external)
183+
ENDIF()
184+
171185
IF(WITH_TETGEN)
172186
MESSAGE(STATUS "Configuring Tetgen library under GPL. The SCIRun InterfaceWithTetGen module can be disabled by setting the CMake build variable WITH_TETGEN to OFF.")
173187
ADD_EXTERNAL( ${SUPERBUILD_DIR}/TetgenExternal.cmake Tetgen_external )
@@ -205,6 +219,7 @@ SET(SCIRUN_CACHE_ARGS
205219
"-DTeem_DIR:PATH=${Teem_DIR}"
206220
"-DTetgen_DIR:PATH=${Tetgen_DIR}"
207221
"-DFreetype_DIR:PATH=${Freetype_DIR}"
222+
"-DSCI_DATA_DIR:PATH=${SCI_DATA_DIR}"
208223
)
209224

210225
IF(BUILD_WITH_PYTHON)

0 commit comments

Comments
 (0)