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

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Wed May 11 16:08:01 EDT 2011


2011/5/11 Alexander Neundorf <a.neundorf-work at gmx.net>

> 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 ?
>
Since the INSTALL command won't be executed it doesn't really matter .. the
default is fine.


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


> >   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
> ?
>

The option expect four values: Build directory, Project Name, Project
Component, Directory in the package
Useful info could be found here:
http://www.vtk.org/Wiki/CMake:CPackConfiguration


> And after that, I install that package e.g. as root, right ?
>
Then, you could install the package either as your regular user or as root
depending of the install dir.


> I'll give it a try.
>
> Alex
>



-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110511/4b363cf4/attachment.htm>


More information about the CMake mailing list