Files
ThirdParty-common/etc/tools/QtFunctions
mark 59be96faed ENH: remove reliance on OpenFOAM etc/config.sh/functions file.
- similar functionality in etc/tools/ThirdPartyFunctions to improve
  the independence of ThirdParty while reducing clutter in the callers.

- add useGcc function for convenience
- mask seeing our own git-repo when building

STYLE: various items

- eliminate old user-editable configuration in files - now command-line only.
- use *_BUILD_DIR instead of *_BINARY_DIR for more clarity of the purpose
- drop use of '-q' option for wmakeCheckPwd (already has stderr redirect)
- drop checkVersion for makeParaView since it stopped working properly
  with newer paraview version

CONFIG: update list of versions
2017-03-20 12:42:44 +01:00

76 lines
2.3 KiB
Bash

#---------------------------------*- sh -*-------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# File
# etc/tools/QtFunction
#
# Description
# Functions for helping relocate a QT installation
# To be loaded *after* etc/tools/ThirdPartyFunctions
#
#------------------------------------------------------------------------------
# Qt-related variables. Initialization at the end of the file.
qtTYPE=qt-everywhere-opensource-src
unset qtVERSION # No default version
#------------------------------------------------------------------------------
#
# Create a qt.conf file in the QT bin/
# - this can be modified easily if the qt installation is relocated
#
createQtConf()
{
local confFile="$QT_ARCH_PATH/bin/qt.conf"
if [ -n "$QT_ARCH_PATH" -a -d "$QT_ARCH_PATH/bin" ]
then
/bin/cat << QT_CONF > $confFile
[Paths]
Prefix=$QT_ARCH_PATH
QT_CONF
echo " created qt.conf"
else
echo "Error: QT_ARCH_PATH not correctly set"
fi
}
# ------------------------------------------------------------------------------
#
# create qt.conf and adjust locations to use ${prefix} internally
#
finalizeQt()
{
echo "Create/Edit files to ease later relocation of a QT installation"
createQtConf
pkgconfigAdjust $QT_ARCH_PATH
}
# -----------------------------------------------------------------------------