Skip to content

Commit

Permalink
Add pytorch lib dir to rpath (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
peastman authored Nov 5, 2024
1 parent b659e36 commit 5510c23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

if platform.system() == 'Darwin':
extra_compile_args += ['-stdlib=libc++', '-mmacosx-version-min=10.13']
extra_link_args += ['-stdlib=libc++', '-mmacosx-version-min=10.13', '-Wl', '-rpath', openmm_dir+'/lib', '-rpath', torch_dir]
extra_link_args += ['-stdlib=libc++', '-mmacosx-version-min=10.13']

extension = Extension(name='_openmmtorch',
sources=['TorchPluginWrapper.cpp'],
libraries=['OpenMM', 'OpenMMTorch'],
include_dirs=[os.path.join(openmm_dir, 'include'), nn_plugin_header_dir] + torch_include_dirs,
library_dirs=[os.path.join(openmm_dir, 'lib'), nn_plugin_library_dir],
runtime_library_dirs=[os.path.join(openmm_dir, 'lib')],
runtime_library_dirs=[os.path.join(openmm_dir, 'lib'), torch_dir],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args
)
Expand Down

0 comments on commit 5510c23

Please sign in to comment.