mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Fix check if option exist
Contributes to CURA-9711
This commit is contained in:
parent
ca90ac7787
commit
ad65ffa76c
1 changed files with 6 additions and 2 deletions
|
@ -7,7 +7,7 @@ from conan import ConanFile
|
||||||
from conan.tools.files import copy, rmdir, save
|
from conan.tools.files import copy, rmdir, save
|
||||||
from conan.tools.env import VirtualRunEnv, Environment
|
from conan.tools.env import VirtualRunEnv, Environment
|
||||||
from conan.tools.scm import Version
|
from conan.tools.scm import Version
|
||||||
from conan.errors import ConanInvalidConfiguration
|
from conan.errors import ConanInvalidConfiguration, ConanException
|
||||||
|
|
||||||
required_conan_version = ">=1.50.0"
|
required_conan_version = ">=1.50.0"
|
||||||
|
|
||||||
|
@ -218,7 +218,11 @@ class CuraConan(ConanFile):
|
||||||
|
|
||||||
# Make sure all Conan dependencies which are shared are added to the binary list for pyinstaller
|
# Make sure all Conan dependencies which are shared are added to the binary list for pyinstaller
|
||||||
for _, dependency in self.dependencies.host.items():
|
for _, dependency in self.dependencies.host.items():
|
||||||
if hasattr(dependency.options, "shared") and dependency.options.shared:
|
try:
|
||||||
|
is_shared = dependency.options.shared
|
||||||
|
except ConanException:
|
||||||
|
is_shared = False
|
||||||
|
if is_shared:
|
||||||
for bin_paths in dependency.cpp_info.bindirs:
|
for bin_paths in dependency.cpp_info.bindirs:
|
||||||
binaries.extend([(f"{p}", ".") for p in Path(bin_paths).glob("**/*")])
|
binaries.extend([(f"{p}", ".") for p in Path(bin_paths).glob("**/*")])
|
||||||
for lib_paths in dependency.cpp_info.libdirs:
|
for lib_paths in dependency.cpp_info.libdirs:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue