Skip to content

Commit

Permalink
Add Ninja to avoid sdk
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <[email protected]>
  • Loading branch information
uilianries authored and jcar87 committed Dec 20, 2022
1 parent 3c7c7ca commit 5981e59
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion recipes/jasper/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import get, copy, rmdir, rm, save, export_conandata_patches, apply_conandata_patches
from conan.tools.build import cross_building
from conan.tools.env import VirtualBuildEnv
import os
import textwrap

Expand Down Expand Up @@ -49,12 +50,16 @@ def requirements(self):
elif self.options.with_libjpeg == "libjpeg":
self.requires("libjpeg/9e")

def build_requirements(self):
self.tool_requires("ninja/1.11.0")

def source(self):
get(self, **self.conan_data["sources"][self.version],
destination=self.source_folder, strip_root=True)

def generate(self):
tc = CMakeToolchain(self)
generator = self.conf.get("tools.cmake.cmaketoolchain:generator", check_type=str, default="Ninja")
tc = CMakeToolchain(self, generator=generator)
tc.variables["JAS_ENABLE_DOC"] = False
tc.variables["JAS_ENABLE_LATEX"] = False
tc.variables["JAS_ENABLE_PROGRAMS"] = False
Expand All @@ -68,6 +73,8 @@ def generate(self):
tc.generate()
tc = CMakeDeps(self)
tc.generate()
env = VirtualBuildEnv(self)
env.generate()

def build(self):
apply_conandata_patches(self)
Expand Down

0 comments on commit 5981e59

Please sign in to comment.