-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
conanfile.py
36 lines (28 loc) · 999 Bytes
/
conanfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python3
# type: ignore
import shutil
from conan import ConanFile
from conan.tools.apple import is_apple_os
from conan.tools.cmake import CMakeDeps, CMakeToolchain
from scripts.get_arch import get_arch
class ApngasmRecipe(ConanFile):
settings = "os", "compiler", "build_type", "arch"
def requirements(self):
self.requires("zlib/1.3.1")
self.requires("libpng/1.6.42")
self.requires("boost/1.84.0")
def build_requirements(self):
self.build_requires("b2/4.10.1")
if not shutil.which("cmake"):
self.tool_requires("cmake/[>=3.27]")
def build(self):
build_type = "Release" # noqa: F841
def generate(self):
tc = CMakeToolchain(self)
cmake = CMakeDeps(self)
if is_apple_os(self) and get_arch() == "universal2":
tc.blocks["apple_system"].values["cmake_osx_architectures"] = (
"x86_64; arm64"
)
tc.generate()
cmake.generate()