Feature request: Add token <DOWNLOAD_DIR> to ExternalProject
In ExternalProject_Add()
the tokens <SOURCE_DIR>
, <SOURCE_SUBDIR>
, <BINARY_DIR>
, <INSTALL_DIR>
, <TMP_DIR>
, and <DOWNLOADED_FILE>
are available. Missing on this list is <DOWNLOAD_DIR>
. When using an external project with a custom DOWNLOAD_COMMAND it would be handy to be able to use <DOWNLOAD_DIR>
in the following steps.
The relevant part of the source code (thx to Craig Scott):
macro(_ep_replace_location_tags target_name)
set(vars ${ARGN})
foreach(var ${vars})
if(${var})
foreach(dir SOURCE_DIR SOURCE_SUBDIR BINARY_DIR INSTALL_DIR TMP_DIR DOWNLOADED_FILE)
get_property(val TARGET ${target_name} PROPERTY _EP_${dir})
string(REPLACE "<${dir}>" "${val}" ${var} "${${var}}")
endforeach()
endif()
endforeach()
endmacro()
Edited by Craig Scott