I had a similar problem, even with 2.8.6, and the documentation did not help much. I found an online example that gave me the clue I needed.
You need to use the url argument, but there is a catch. If you just give him the path to the director, he assumes that you point it to the archive, not the directory. You must add your path using "file: //", for example:
ExternalProject_Add( libantlr3c URL file://${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3/configure --prefix=${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 BUILD_COMMAND make BUILD_IN_SOURCE 1 )
Now I just need to find out (according to my project) why it is looking for <project>-mkdir when it does not exist.
source share