Skip to content

Commit db586c1

Browse files
committed
fix dynamic linking
1 parent ab07703 commit db586c1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packaging/torchvision/meta.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ source:
77

88
requirements:
99
build:
10-
- {{ compiler('c') }} # [win]
10+
- {{ compiler('c') }}
11+
- {{ compiler('cxx') }}
1112

1213
host:
1314
- python

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ def get_extensions():
9292
libraries = []
9393
extra_compile_args = {}
9494
third_party_search_directories = []
95+
runtime_library_dirs = []
9596

9697
if sys.platform.startswith('linux'):
9798
sources = sources + source_image_cpu
9899
libraries.append('turbojpeg')
99100
third_party_search_directories.append(os.path.join(cwd, "third_party/libjpeg-turbo"))
101+
runtime_library_dirs = ['lib']
100102

101103
extension = CppExtension
102104

@@ -160,8 +162,8 @@ def get_extensions():
160162
include_dirs=include_dirs + third_party_search_directories,
161163
define_macros=define_macros,
162164
extra_compile_args=extra_compile_args,
163-
runtime_library_dirs=["lib"]
164-
)
165+
runtime_library_dirs=runtime_library_dirs
166+
)
165167
]
166168
if compile_cpp_tests:
167169
ext_modules.append(

0 commit comments

Comments
 (0)