Skip to content
Snippets Groups Projects
Commit 4e20935b authored by Eric Müller's avatar Eric Müller :mountain_bicyclist: Committed by Eleni Mathioulaki
Browse files

fix(open3d): Build w/o glu

The glew package requires the "depender" to set this preprocessor define
if a build w/o GLU support is requested.
(I.e. this removes the build dependency of glew on glu.)
parent 1f27f379
No related branches found
No related tags found
No related merge requests found
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a87d542b5..509a50633 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,10 @@ endif()
include(CMakeDependentOption)
# Open3D build options
+option(DEFINE_GLEW_NO_GLU "Glew without GLU" OFF)
+if(DEFINE_GLEW_NO_GLU)
+ add_definitions(-DGLEW_NO_GLU)
+endif(DEFINE_GLEW_NO_GLU)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(BUILD_EXAMPLES "Build Open3D examples programs" ON )
option(BUILD_UNIT_TESTS "Build Open3D unit tests" OFF)
......@@ -85,6 +85,8 @@ class Open3d(CMakePackage, CudaPackage):
# LLVM must be built with the C++ library
conflicts("^llvm libcxx=none")
patch("glew-no-glu.patch")
def patch(self):
# Force Python libraries to be installed to self.prefix
args = std_pip_args + ["--prefix=" + self.prefix]
......@@ -148,6 +150,8 @@ class Open3d(CMakePackage, CudaPackage):
# args.append(self.define("USE_SYSTEM_VTK", True))
if self.spec.satisfies("@0.18:"):
args.append(self.define("USE_SYSTEM_EMBREE", True))
# cf. https://github.com/spack/spack/issues/42839
args.append(self.define("DEFINE_GLEW_NO_GLU", True))
# end EBRAINS
if "+python" in self.spec:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment