Can't add library to PlatformIO project

I am having a lot of difficulty adding a library to my PlatformIO project. I can’t get PlatformIO to recognize that the library is there, compile it, know where the headers are. The documentation at Library Dependency Finder (LDF) — PlatformIO latest documentation appears to be missing a lot of information, nothing in there is actionable for adding a library from a local folder.

My project structure is like this:

- projectname
    - src
        - <source files and folders...>
    - lib
        - libname
            - src
                - include
                    - <subfolders containing public headers...>
                - <subfolders containing source files...>
- platformio.ini

The library is 3rd party but is only available as a local folder and is necessary for this project.

In platformio.ini I have

[env]
lib_deps = projectname/lib/libname

It doesn’t work. Do I need to create a project.json?