Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openscenegraph: add missing imports #7696

Merged
merged 7 commits into from
Oct 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions recipes/openscenegraph/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from conans import CMake, ConanFile, tools
import glob, os
from conans.errors import ConanInvalidConfiguration
import os

required_conan_version = ">=1.29.1"


class ConanFile(ConanFile):
class OpenSceneGraphConanFile(ConanFile):
name = "openscenegraph"
description = "OpenSceneGraph is an open source high performance 3D graphics toolkit"
topics = "conan", "openscenegraph", "graphics"
topics = ("openscenegraph", "graphics")
url = "https://github.com/conan-io/conan-center-index"
homepage = "http://www.openscenegraph.org"
license = "LGPL-2.1-only", "WxWindows-exception-3.1"
Expand Down Expand Up @@ -103,16 +104,19 @@ def configure(self):
del self.options.with_png
del self.options.with_dcmtk

def validate(self):
if self.options.get_safe("with_asio", False):
raise ConanInvalidConfiguration("ASIO support in OSG is broken, see https://github.com/openscenegraph/OpenSceneGraph/issues/921")
if hasattr(self, "settings_build") and tools.cross_building(self):
raise ConanInvalidConfiguration("openscenegraph recipe cannot be cross-built yet. Contributions are welcome.")

def requirements(self):
if self.options.enable_windowing_system and self.settings.os == "Linux":
self.requires("xorg/system")
self.requires("opengl/system")

if self.options.use_fontconfig:
self.requires("fontconfig/2.13.92")
self.requires("fontconfig/2.13.93")

if self.options.get_safe("with_asio", False):
# Should these be private requires?
Expand Down Expand Up @@ -144,8 +148,8 @@ def requirements(self):
self.requires("zlib/1.2.11")

def source(self):
tools.get(**self.conan_data["sources"][self.version])
os.rename("OpenSceneGraph-OpenSceneGraph-" + self.version, self._source_subfolder)
tools.get(**self.conan_data["sources"][self.version],
strip_root=True, destination=self._source_subfolder)

def _patch_sources(self):
for patch in self.conan_data["patches"].get(self.version, []):
Expand Down