Skip to content

Commit f0cb1c6

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pointcloud
2 parents d58ff9f + 9d11439 commit f0cb1c6

File tree

304 files changed

+20322
-201198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

304 files changed

+20322
-201198
lines changed

Superbuild/FreetypeExternal.cmake

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
SET(freetype_GIT_TAG "origin/seg3d_external_test")
29+
30+
# If CMake ever allows overriding the checkout command or adding flags,
31+
# git checkout -q will silence message about detached head (harmless).
32+
ExternalProject_Add(Freetype_external
33+
GIT_REPOSITORY "https://github.com/CIBC-Internal/freetype.git"
34+
GIT_TAG ${freetype_GIT_TAG}
35+
PATCH_COMMAND ""
36+
INSTALL_DIR ""
37+
INSTALL_COMMAND ""
38+
CMAKE_CACHE_ARGS
39+
-DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
40+
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
41+
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
42+
)
43+
44+
ExternalProject_Get_Property(Freetype_external BINARY_DIR)
45+
SET(Freetype_DIR ${BINARY_DIR} CACHE PATH "")
46+
47+
MESSAGE(STATUS "Freetype_DIR: ${Freetype_DIR}")

Superbuild/PythonExternal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ IF(UNIX)
137137
IF(BUILD_HEADLESS)
138138
SET(PYTHON_MODULE_SEARCH_PATH Python.framework/Versions/${SCI_PYTHON_VERSION_SHORT}/${SCI_PYTHON_MODULE_PARENT_PATH}/${SCI_PYTHON_NAME} CACHE INTERNAL "Python modules." FORCE)
139139
ELSE()
140-
SET(PYTHON_MODULE_SEARCH_PATH ../Frameworks/Python.framework/Versions/${SCI_PYTHON_VERSION_SHORT}/${SCI_PYTHON_MODULE_PARENT_PATH}/${SCI_PYTHON_NAME} CACHE INTERNAL "Python modules." FORCE)
140+
SET(PYTHON_MODULE_SEARCH_PATH Frameworks/Python.framework/Versions/${SCI_PYTHON_VERSION_SHORT}/${SCI_PYTHON_MODULE_PARENT_PATH}/${SCI_PYTHON_NAME} CACHE INTERNAL "Python modules." FORCE)
141141
ENDIF()
142142
SET(SCI_PYTHON_FRAMEWORK_ARCHIVE ${INSTALL_DIR}/${python_FRAMEWORK_ARCHIVE})
143143
ELSE()

Superbuild/Superbuild.cmake

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ OPTION(BUILD_TESTING "Build with tests." ON)
7070
# Configure python
7171
OPTION(BUILD_WITH_PYTHON "Build with python support." ON)
7272

73+
###########################################
74+
# Configure python
75+
OPTION(WITH_TETGEN "Build Tetgen." ON)
76+
MARK_AS_ADVANCED(WITH_TETGEN)
77+
7378
###########################################
7479
# Configure Windows executable to run with
7580
# or without the console
@@ -122,34 +127,35 @@ MARK_AS_ADVANCED(REGENERATE_MODULE_FACTORY_CODE)
122127

123128
SET( SCIRun_DEPENDENCIES )
124129

130+
MACRO(ADD_EXTERNAL cmake_file external)
131+
INCLUDE( ${cmake_file} )
132+
LIST(APPEND SCIRun_DEPENDENCIES ${external})
133+
ENDMACRO()
134+
125135
SET(SUPERBUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" FORCE)
126136
SET(SCIRUN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src CACHE INTERNAL "" FORCE)
127137
SET(SCIRUN_BINARY_DIR ${CMAKE_BINARY_DIR}/SCIRun CACHE INTERNAL "" FORCE)
128138

129139
IF(BUILD_TESTING)
130-
INCLUDE( ${SUPERBUILD_DIR}/TestDataConfig.cmake )
131-
LIST(APPEND SCIRun_DEPENDENCIES SCIRunTestData_external)
140+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/TestDataConfig.cmake SCIRunTestData_external )
132141
ENDIF()
133142

134-
INCLUDE( ${SUPERBUILD_DIR}/ZlibExternal.cmake )
135-
LIST(APPEND SCIRun_DEPENDENCIES Zlib_external)
136-
137-
INCLUDE( ${SUPERBUILD_DIR}/SQLiteExternal.cmake )
138-
LIST(APPEND SCIRun_DEPENDENCIES SQLite_external)
139-
140-
INCLUDE( ${SUPERBUILD_DIR}/LibPNGExternal.cmake )
141-
LIST(APPEND SCIRun_DEPENDENCIES LibPNG_external)
143+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/ZlibExternal.cmake Zlib_external )
144+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/SQLiteExternal.cmake SQLite_external )
145+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/LibPNGExternal.cmake LibPNG_external )
146+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/TeemExternal.cmake Teem_external )
147+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/FreetypeExternal.cmake Freetype_external )
142148

143149
IF(BUILD_WITH_PYTHON)
144-
INCLUDE( ${SUPERBUILD_DIR}/PythonExternal.cmake )
145-
LIST(APPEND SCIRun_DEPENDENCIES Python_external)
150+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/PythonExternal.cmake Python_external )
146151
ENDIF()
147152

148-
INCLUDE( ${SUPERBUILD_DIR}/BoostExternal.cmake )
149-
LIST(APPEND SCIRun_DEPENDENCIES Boost_external)
153+
IF(WITH_TETGEN)
154+
MESSAGE(STATUS "Configuring Tetgen library under GPL. The SCIRun InterfaceWithTetGen module can be disabled by setting the CMake build variable WITH_TETGEN to OFF.")
155+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/TetgenExternal.cmake Tetgen_external )
156+
ENDIF()
150157

151-
INCLUDE( ${SUPERBUILD_DIR}/TeemExternal.cmake )
152-
LIST(APPEND SCIRun_DEPENDENCIES Teem_external)
158+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/BoostExternal.cmake Boost_external )
153159

154160
###########################################
155161
# Download external data sources
@@ -171,13 +177,16 @@ SET(SCIRUN_CACHE_ARGS
171177
"-DBUILD_HEADLESS:BOOL=${BUILD_HEADLESS}"
172178
"-DSCIRUN_TEST_RESOURCE_DIR:PATH=${SCIRUN_TEST_RESOURCE_DIR}"
173179
"-DBUILD_WITH_PYTHON:BOOL=${BUILD_WITH_PYTHON}"
180+
"-DWITH_TETGEN:BOOL=${WITH_TETGEN}"
174181
"-DREGENERATE_MODULE_FACTORY_CODE:BOOL=${REGENERATE_MODULE_FACTORY_CODE}"
175182
"-DGENERATE_MODULE_FACTORY_CODE:BOOL=${GENERATE_MODULE_FACTORY_CODE}"
176183
"-DZlib_DIR:PATH=${Zlib_DIR}"
177184
"-DLibPNG_DIR:PATH=${LibPNG_DIR}"
178185
"-DSQLite_DIR:PATH=${SQLite_DIR}"
179186
"-DBoost_DIR:PATH=${Boost_DIR}"
180187
"-DTeem_DIR:PATH=${Teem_DIR}"
188+
"-DTetgen_DIR:PATH=${Tetgen_DIR}"
189+
"-DFreetype_DIR:PATH=${Freetype_DIR}"
181190
)
182191

183192
IF(BUILD_WITH_PYTHON)
@@ -187,6 +196,12 @@ IF(BUILD_WITH_PYTHON)
187196
)
188197
ENDIF()
189198

199+
IF(WITH_TETGEN)
200+
LIST(APPEND SCIRUN_CACHE_ARGS
201+
"-DTetgen_DIR:PATH=${Tetgen_DIR}"
202+
)
203+
ENDIF()
204+
190205
IF(WIN32)
191206
LIST(APPEND SCIRUN_CACHE_ARGS
192207
"-DSCIRUN_SHOW_CONSOLE:BOOL=${SCIRUN_SHOW_CONSOLE}"

Superbuild/TetgenConfig.cmake.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set(TETGEN_INCLUDE "@TETGEN_INCLUDE@")
2+
set(TETGEN_LIBRARY_DIR "@TETGEN_LIBRARY_DIR@")
3+
set(TETGEN_LIBRARY "@TETGEN_LIBRARY@")
4+
set(TETGEN_USE_FILE "@TETGEN_USE_FILE@")

Superbuild/TetgenExternal.cmake

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
ExternalProject_Add(Tetgen_external
29+
URL "http://www.tetgen.org/1.5/src/tetgen1.5.0.tar.gz"
30+
PATCH_COMMAND ""
31+
INSTALL_COMMAND ""
32+
CMAKE_CACHE_ARGS
33+
-DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
34+
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
35+
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
36+
#-DTETLIBRARY
37+
)
38+
39+
ExternalProject_Get_Property(Tetgen_external SOURCE_DIR)
40+
ExternalProject_Get_Property(Tetgen_external BINARY_DIR)
41+
ExternalProject_Get_Property(Tetgen_external INSTALL_DIR)
42+
SET(TETGEN_INCLUDE ${SOURCE_DIR})
43+
SET(TETGEN_LIBRARY_DIR ${BINARY_DIR})
44+
SET(TETGEN_USE_FILE ${INSTALL_DIR}/UseTetgen.cmake)
45+
# see Tetgen CMakeLists.txt file
46+
SET(TETGEN_LIBRARY "tet")
47+
SET(Tetgen_DIR ${INSTALL_DIR} CACHE PATH "")
48+
49+
# Boost is special case - normally this should be handled in external library repo
50+
CONFIGURE_FILE(${SUPERBUILD_DIR}/TetgenConfig.cmake.in ${INSTALL_DIR}/TetgenConfig.cmake @ONLY)
51+
CONFIGURE_FILE(${SUPERBUILD_DIR}/UseTetgen.cmake ${TETGEN_USE_FILE} COPYONLY)
52+
53+
MESSAGE(STATUS "Tetgen_DIR: ${Tetgen_DIR}")

Superbuild/UseTetgen.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include_directories(${TETGEN_INCLUDE})
2+
link_directories(${TETGEN_LIBRARY_DIR})

bin/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*
1+
*

src/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
CMakeLists.txt.user
2-
*.svn-base

src/CMake/scripts/macdeploy.sh

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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+
# macdeploy.sh: change runtime paths in app bundle libraries and executables
28+
#!/bin/bash
29+
30+
print() {
31+
if [[ $# -lt 2 ]]; then
32+
echo "$0 verbose (0 off or 1 on) string"
33+
exit -1
34+
fi
35+
local verbose=$1
36+
local string=$2
37+
if [[ $verbose -eq 1 ]]; then
38+
echo "$string"
39+
fi
40+
}
41+
42+
if [[ $# -lt 4 ]]; then
43+
echo "$0 path_to_app_bundle original_lib_dir appname verbose (0 off or 1 on)"
44+
exit -1
45+
fi
46+
47+
app_bundle=$1
48+
original_lib_dir=$2
49+
appname=$3
50+
verbose=$4
51+
52+
if [[ $verbose -ne 0 && $verbose -ne 1 ]]; then
53+
echo "Arg 5 (verbose) not set to 0 or 1. Defaulting to verbose output off."
54+
verbose=0
55+
fi
56+
57+
print $verbose "SCIRun library directory: ${original_lib_dir}"
58+
59+
cwd=`pwd`
60+
cd $app_bundle/Contents/Frameworks
61+
62+
# TODO: when CMP0042 new is supported, switch to @rpath
63+
scirun_libs=`ls -1 *.dylib`
64+
for l in ${scirun_libs}; do
65+
if [[ $verbose -eq 1 ]]; then
66+
echo "processing $l"
67+
fi
68+
COMMAND=`otool -L $l | sed -n "s:"$original_lib_dir":& :p" | awk -v lib=$l '{print "install_name_tool -change "$1$2" "$2" " lib }'`
69+
print $verbose "${COMMAND}"
70+
sh -c "${COMMAND}"
71+
72+
COMMAND=`otool -L $l | sed -n "s:[^/][^/]*lib[A-z0-9_.]*.dylib:&:p" | awk -v lib=$l '{print "install_name_tool -change "$1" @executable_path/../Frameworks/"$1" " lib }'`
73+
print $verbose "${COMMAND}"
74+
sh -c "${COMMAND}"
75+
76+
print $verbose "install_name_tool -id @executable_path/../Frameworks/${l} ${l}"
77+
install_name_tool -id "@executable_path/../Frameworks/${l}" ${l}
78+
done
79+
80+
cd $cwd
81+
cd $app_bundle/Contents/MacOS
82+
83+
COMMAND=`otool -L $appname | sed -n "s:$original_lib_dir:& :p" | awk -v lib=$appname '{print "install_name_tool -change "$1$2" "$2" " lib }'`
84+
print $verbose "${COMMAND}"
85+
sh -c "${COMMAND}"
86+
87+
COMMAND=`otool -L $appname | sed -n "s:[^/][^/]*lib[A-z0-9_.]*.dylib:&:p" | awk -v lib=$appname '{print "install_name_tool -change "$1" @executable_path/../Frameworks/"$1" " lib }'`
88+
print $verbose "${COMMAND}"
89+
sh -c "${COMMAND}"
90+
91+
cd $cwd

0 commit comments

Comments
 (0)