mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
ExternalProject: support SOURCE_SUBDIR for BUILD_IN_SOURCE
This commit is contained in:
@@ -425,7 +425,9 @@ External Project Definition
|
||||
can be used to point to an alternative directory within the source tree
|
||||
to use as the top of the CMake source tree instead. This must be a
|
||||
relative path and it will be interpreted as being relative to
|
||||
``SOURCE_DIR``.
|
||||
``SOURCE_DIR``. When ``BUILD_IN_SOURCE 1`` is specified, the
|
||||
``BUILD_COMMAND`` is used to point to an alternative directory within the
|
||||
source tree.
|
||||
|
||||
**Build Step Options:**
|
||||
If the configure step assumed the external project uses CMake as its build
|
||||
@@ -1676,7 +1678,11 @@ function(_ep_set_directories name)
|
||||
endif()
|
||||
if(build_in_source)
|
||||
get_property(source_dir TARGET ${name} PROPERTY _EP_SOURCE_DIR)
|
||||
set_property(TARGET ${name} PROPERTY _EP_BINARY_DIR "${source_dir}")
|
||||
if(source_subdir)
|
||||
set_property(TARGET ${name} PROPERTY _EP_BINARY_DIR "${source_dir}/${source_subdir}")
|
||||
else()
|
||||
set_property(TARGET ${name} PROPERTY _EP_BINARY_DIR "${source_dir}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Make the directories at CMake configure time *and* add a custom command
|
||||
|
||||
Reference in New Issue
Block a user