mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 22:50:26 -06:00
ExternalProject: Add SOURCE_SUBDIR option
Add a new SOURCE_SUBDIR option to ExternalProject_Add that allows specifying the location of the CMakeLists.txt to use as the project root relative to the SOURCE_DIR. This is helpful for projects that have unusual layouts, or projects that provide both a superbuild and project-only build depending on which CMakeLists.txt is used. Fixes: #15118
This commit is contained in:
committed by
Brad King
parent
f59513140b
commit
a8345d65f3
10
Tests/ExternalProjectSourceSubdir/CMakeLists.txt
Normal file
10
Tests/ExternalProjectSourceSubdir/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
project(ExternalProjectSourceSubdir NONE)
|
||||
include(ExternalProject)
|
||||
|
||||
ExternalProject_Add(Example
|
||||
SOURCE_SUBDIR subdir
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Example
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Example
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(empty)
|
||||
Reference in New Issue
Block a user