gxsview: compiles against system qt and vtk on rhel8 (#43722)
* gxsview: compiles againts system qt and vtk on rhel8 * Update gxsview/package.py for blanks around operator * Update gxsview/package.py import blank line * Update gxsview/package.py for style * Update gxsview/package.py checking vtk version
This commit is contained in:
parent
f406f27d9c
commit
c69951d6e1
1 changed files with 21 additions and 5 deletions
|
@ -3,6 +3,8 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,11 +53,25 @@ def qmake_args(self):
|
||||||
vtk_suffix = self.spec["vtk"].version.up_to(2)
|
vtk_suffix = self.spec["vtk"].version.up_to(2)
|
||||||
vtk_lib_dir = self.spec["vtk"].prefix.lib
|
vtk_lib_dir = self.spec["vtk"].prefix.lib
|
||||||
vtk_include_dir = join_path(self.spec["vtk"].prefix.include, "vtk-{0}".format(vtk_suffix))
|
vtk_include_dir = join_path(self.spec["vtk"].prefix.include, "vtk-{0}".format(vtk_suffix))
|
||||||
args = [
|
args = []
|
||||||
"VTK_LIB_DIR={0}".format(vtk_lib_dir),
|
if not os.path.exists(vtk_include_dir):
|
||||||
"VTK_INC_DIR={0}".format(vtk_include_dir),
|
vtk_include_dir = join_path(self.spec["vtk"].prefix.include, "vtk")
|
||||||
"VTK_MAJOR_VER={0}".format(str(vtk_suffix)),
|
args.append("VTK_NO_VER_SUFFIX=ON")
|
||||||
]
|
args.extend(
|
||||||
|
[
|
||||||
|
"VTK_LIB_DIR={0}".format(vtk_lib_dir),
|
||||||
|
"VTK_INC_DIR={0}".format(vtk_include_dir),
|
||||||
|
"VTK_MAJOR_VER={0}".format(str(vtk_suffix)),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
# Below to avoid undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
|
||||||
|
if self.spec.satisfies("%gcc@8.0:8.9") or self.spec.satisfies("%fj"):
|
||||||
|
if "^vtk@9:" in self.spec:
|
||||||
|
fic = "vtk9.pri"
|
||||||
|
else:
|
||||||
|
fic = "vtk8.pri"
|
||||||
|
with open(fic, "a") as fh:
|
||||||
|
fh.write("-lstdc++fs\n")
|
||||||
return args
|
return args
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
|
Loading…
Reference in a new issue