Skip to content

Commit

Permalink
Merge pull request #59 from visit-dav/task/BradWhitlock/2019_2_7_stat…
Browse files Browse the repository at this point in the history
…ic_build_mac

Fixes for static builds on Mac.
  • Loading branch information
Brad Whitlock committed Feb 7, 2019
2 parents 7ac21ed + 7bb20b6 commit 38ef2da
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/plots/Mesh/avtMeshPlotMapper.C
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ avtMeshPlotMapper::SetSurfaceVisibility(bool val)
//
// ****************************************************************************

bool
static bool
ColorsAreDifferent(double a[3], double b[3])
{
return ((a[0] != b[0]) ||
Expand Down
2 changes: 1 addition & 1 deletion src/plots/Surface/avtSurfaceMapper.C
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ avtSurfaceMapper::SetEdgeVisibility(bool val)
//
// ****************************************************************************

bool
static bool
ColorsAreDifferent(double a[3], double b[3])
{
return ((a[0] != b[0]) ||
Expand Down
2 changes: 1 addition & 1 deletion src/tools/dev/protocol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ${VISIT_SOURCE_DIR}/avt/VisWindow/VisWindow

# If static then we need some static symbol lookup functions
IF(VISIT_STATIC)
SET(STATIC_SOURCES ../../engine/main/EngineStaticSymbolLocator.C)
SET(STATIC_SOURCES ../../../engine/main/EngineStaticSymbolLocator.C)
ENDIF(VISIT_STATIC)

LINK_DIRECTORIES(
Expand Down
5 changes: 5 additions & 0 deletions src/tools/dev/scripts/bv_support/bv_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,11 @@ function bv_python_build
fi
info "Done building Python"

# Do not build those packages for a static build!
if [[ "$DO_STATIC_BUILD" == "yes" ]]; then
return 0
fi

info "Building the Python Imaging Library"
build_pil
if [[ $? != 0 ]] ; then
Expand Down
72 changes: 47 additions & 25 deletions src/tools/dev/scripts/bv_support/bv_qwt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,43 +148,59 @@ function apply_qwt_static_patch
# must patch a file in order to create static library
info "Patching qwt for static build"
patch -p0 << \EOF
diff -c qwtconfig.pri.orig qwtconfig.pri
*** qwtconfig.pri.orig 2016-05-24 14:09:02.000000000 -0700
--- qwtconfig.pri 2016-05-24 14:10:06.268628351 -0700
*** qwtconfig.pri.orig 2019-02-07 09:54:46.000000000 -0800
--- qwtconfig.pri 2019-02-07 09:54:58.000000000 -0800
***************
*** 72,78 ****
# it will be a static library.
######################################################################
! QWT_CONFIG += QwtDll
######################################################################
# QwtPlot enables all classes, that are needed to use the QwtPlot
# QwtPlot enables all classes, that are needed to use the QwtPlot
--- 72,78 ----
# it will be a static library.
######################################################################
! #QWT_CONFIG += QwtDll
######################################################################
# QwtPlot enables all classes, that are needed to use the QwtPlot
# QwtPlot enables all classes, that are needed to use the QwtPlot
***************
*** 93,99 ****
# export a plot to a SVG document
######################################################################
! QWT_CONFIG += QwtSvg
######################################################################
# If you want to use a OpenGL plot canvas
--- 93,99 ----
# export a plot to a SVG document
######################################################################
! #QWT_CONFIG += QwtSvg
######################################################################
# If you want to use a OpenGL plot canvas
***************
*** 118,124 ****
# Otherwise you have to build it from the designer directory.
######################################################################
! QWT_CONFIG += QwtDesigner
######################################################################
# Compile all Qwt classes into the designer plugin instead
--- 118,124 ----
# Otherwise you have to build it from the designer directory.
######################################################################
! #QWT_CONFIG += QwtDesigner
######################################################################
# Compile all Qwt classes into the designer plugin instead
EOF
Expand Down Expand Up @@ -280,20 +296,26 @@ function build_qwt
return 1
fi

if [[ "$DO_STATIC_BUILD" == "no" && "$OPSYS" == "Darwin" ]]; then
#
# Make dynamic executable, need to patch up the install path and
# version information.
#
info "Creating dynamic libraries for Qwt . . ."
if [[ "$OPSYS" == "Darwin" ]]; then
if [[ "$DO_STATIC_BUILD" == "no" ]]; then
#
# Make dynamic executable, need to patch up the install path and
# version information.
#
info "Creating dynamic libraries for Qwt . . ."

fulllibname="${QWT_INSTALL_DIR}/lib/qwt.framework/Versions/6/qwt"
fulllibname="${QWT_INSTALL_DIR}/lib/qwt.framework/Versions/6/qwt"

install_name_tool -id $fulllibname $fulllibname

if [[ $? != 0 ]] ; then
warn "Qwt dynamic library build failed. Giving up"
return 1
install_name_tool -id $fulllibname $fulllibname

if [[ $? != 0 ]] ; then
warn "Qwt dynamic library build failed. Giving up"
return 1
fi
else
# Static build. For whatever reason, it was not installing headers.
mkdir "${QWT_INSTALL_DIR}/include"
cp -f src/*.h "${QWT_INSTALL_DIR}/include"
fi
fi

Expand Down
4 changes: 2 additions & 2 deletions src/tools/examples/embedviewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ main.C

# If the viewer is static then we need some static symbol lookup functions
IF(VISIT_STATIC)
SET(STATIC_SOURCES1 ${CMAKE_CURRENT_SOURCE_DIR}/../../viewer/main/ViewerStaticSymbolLocator.C)
SET(STATIC_SOURCES2 ${CMAKE_CURRENT_SOURCE_DIR}/../../viewer/main/ViewerStaticSymbolLocator.C)
SET(STATIC_SOURCES1 ${CMAKE_CURRENT_SOURCE_DIR}/../../../viewer/main/ViewerStaticSymbolLocator.C)
SET(STATIC_SOURCES2 ${CMAKE_CURRENT_SOURCE_DIR}/../../../viewer/main/ViewerStaticSymbolLocator.C)
ENDIF(VISIT_STATIC)

# The subset of the sources that have Q_OBJECT in their header.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/examples/mcurvit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Synchronizer.C

# If the viewer is static then we need some static symbol lookup functions
IF(VISIT_STATIC)
SET(STATIC_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../viewer/main/ViewerStaticSymbolLocator.C)
SET(STATIC_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../../viewer/main/ViewerStaticSymbolLocator.C)
ENDIF(VISIT_STATIC)

SET(MCURVIT_MOC_SOURCES
Expand Down

0 comments on commit 38ef2da

Please sign in to comment.