Skip to content

Commit

Permalink
Merge pull request #8 from mwoehlke-kitware/installable-external-proj…
Browse files Browse the repository at this point in the history
…ects

Add function to install external CMake projects
  • Loading branch information
jcfr committed May 21, 2014
2 parents af45c1f + 643f0af commit b0cf6fc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ExternalProjectDependency.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -708,3 +708,22 @@ macro(ExternalProject_Add_Empty project_name)
DEPENDS ${_sb_DEPENDS}
)
endmacro()

#.rst:
# .. cmake:function:: ExternalProject_Install_CMake
#
# Install an external CMake-based project as part of the ``install`` target.
#
# .. code-block:: cmake
#
# ExternalProject_Install_CMake(<project_name>)
#
# This causes building the main project's ``install`` target to also execute
# the CMake install script for the specified external project. The project must
# be previously declared with :command:`ExternalProject_Add`.
#
function(ExternalProject_Install_CMake project_name)
ExternalProject_Get_Property(${project_name} binary_dir)

install(SCRIPT ${binary_dir}/cmake_install.cmake)
endfunction()

0 comments on commit b0cf6fc

Please sign in to comment.