I am building an external project but want to change some files before calling configure on it. This is my current CMakeLists.txt:
ExternalProject_Add(
foo
URL ${PROJECT_SOURCE_DIR}/ext/foo.tar.gz
BUILD_IN_SOURCE 1
#Need copyFromOthers to run here, before configure but after untar
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
ExternalProject_Add_Step(){
foo copyFromOthers
ExternalProject_Get_Property(foo INSTALL_DIR)
file (COPY <src>/foo_v1.c DESTINATION ${INSTALL_DIR}/foo_v1.c)
file (COPY <src>/foo_v2.c DESTINATION ${INSTALL_DIR}/foo_v2.c)
##....Continues till foo_v10.c
}
Is there a way to call a custom step after URL command in ExternalProject_Add()?
I tried to add copyFromOthers as a DEPENDEES for ExternalProject_Add() but it kept giving me error about ExternalProject_Get_Property(foo INSTALL_DIR)