Error linking lldb when using cmake 2.8.12+ and custom libedit/python

I’m using cmake to configure my build, on Ubuntu 12.04 (and older versions). I use custom versions of libedit and python, because the system versions on the ancient linux we’re using internally are much too old and broken.

When I build, is linked correctly, with –ledit and my custom python, but lldb and lldb-mi don’t have –ledit or my custom python library on the link line, and I get a link error.

I’ve tracked it down to this line in source/CMakeLists.txt, from r213469:

target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS})

With cmake 2.8.12 or higher, ${cmake_2_8_12_PRIVATE} is PRIVATE. Remove that from the line, and the link proceeds as expected, with –ledit and the python library.

What does PRIVATE on that line do? Do we need it?