Hi!
I am about to build my own C++ extension for Pytorch 
However I have now written a .cpp file which requires a dynamic library. How do I properly modify the setup.py file, so that it is being found (at runtime) when the extension is loaded?
(I use macOS if that information would be needed.)
My tree look like:
├── libraries
│   ├── cubic_spline.h
│   └── libcubic_spline.dylib
├── setup.py
├── splitFrames.cpp

My setup.py file looks like this:
from setuptools import setup
from torch.utils.cpp_extension import CppExtension, BuildExtension

setup(
    name='split_frames',
    ext_modules=[
        CppExtension(
            name='split_frames',
            sources=['splitFrames.cpp'],
            extra_compile_args=['-g', '-stdlib=libc++', '-std=c++11']),
    ],
    cmdclass = {
        'build_ext': BuildExtension
    })


# call: $ CC=clang CXX=clang++ NO_CUDA=1 python setup.py install

Cheers,
Lucas