[CMake] Trying to set up a "superbuild" with external project and install it...

Alexander Neundorf a.neundorf-work at gmx.net
Wed May 11 15:33:21 EDT 2011


On Wednesday 11 May 2011, Jean-Christophe Fillion-Robin wrote:
> Hi Alexander,
> 
> Assuming the subproject are CMakeified:
> 
>   1) Set the INSTALL command of each External project to an empty string

...but the INSTALL_DIR to the final location I assume ?

Then the project will be built in build tree, but not installed anywhere at 
build-time, right ?

>   2 ) In yout CPack file, you could use a syntax similar to the one
> reported below:
> 
> 
> if(EXISTS "${VTK_DIR}/CMakeCache.txt")
>   set(CPACK_INSTALL_CMAKE_PROJECTS
> "${CPACK_INSTALL_CMAKE_PROJECTS};${VTK_DIR};VTK;RuntimeLibraries;/")
> endif()
> 
> if(EXISTS "${ITK_DIR}/CMakeCache.txt")
>   set(CPACK_INSTALL_CMAKE_PROJECTS
> "${CPACK_INSTALL_CMAKE_PROJECTS};${ITK_DIR};ITK;RuntimeLibraries;/")
> endif()

Assuming that I create a package in the end using cpack, right ?
So this will tell cpack to do a execute cmake_install.cmake in e.g. ${ITK_DIR} 
and put this into the package. What does actually the last parameter ("/") do 
? 
And after that, I install that package e.g. as root, right ?
I'll give it a try.

Alex


More information about the CMake mailing list