I'm trying to add an Automake project as an external project.
The Automake configure script (usually run with ./configure
) contains a relative path to a resource file. The file is found when I run configure manually, because my working directory is in the source directory. However, when I run configure
with the ExternalProject_Add
, it can't find the resource file because the working directory is CMAKE_CURRENT_BINARY_DIR
.
ExternalProject_Add(zlib
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/configure
BUILD_COMMAND make)
How can I set the working directory for the configuration step so that the config script finds the required files?
BUILD_IN_SOURCE
option. I was expecting the files to be copied into the build directory, instead of a subdirectory. – Chifforobe