Two days ago, I added an External Project to compile a project using autotools. It was perfectly working until today...
I have a weird error:
CMake Error at /usr/share/cmake-2.8/Modules/ExternalProject.cmake:710 (message): error: no download info for 'libantlr3c' -- please specify existing SOURCE_DIR or one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY or DOWNLOAD_COMMAND
And one of these rules is actually specified (SOURCE_DIR):
cmake_minimum_required(VERSION 2.8)
# ...
include(ExternalProject)
ExternalProject_Add(
libantlr3c
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
)
So this error hasn't any meaning... And it was perfectly working yesterday (nothing changed until now).
Any idea ?
Thank you!
This is a bug from the 2.8.0 version. Install the version 2.8.3 or superior...
I had a similar issue even with 2.8.6 and the documentation wasn't much help. I found an example online that gave me the hint I needed.
You need to use the URL argument, but there's a catch. If you just give it the path to the direcotry it assumes you're going to point it to an archive, not an directory. You have to prepend your path with "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 have to figure out (on my project) why it's looking for <project>-mkdir
when it doesn't exist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With