[Cmake] install from subdirs ?

Andy Cedilnik andy.cedilnik at kitware.com
Fri May 28 09:20:20 EDT 2004


Hi Friso,

I just tried CMake install on VTK (fairly large package) with several
executables in different directories and they all seem to work fine:

FILE(INSTALL DESTINATION "/tmp/vtktest/bin" TYPE EXECUTABLE FILES
"/home/andy/vtk/VTK-notcl/bin/vtk")

FILE(INSTALL DESTINATION "/tmp/vtktest/bin" TYPE EXECUTABLE FILES
"/home/andy/vtk/VTK-notcl/bin/vtkWrapTclInit")

Looking in your CMake file, looks like you are trying to install a
nonexistent target? Is that a case?

			Andy


On Fri, 2004-05-28 at 04:28, Jan-Friso Evers wrote:
> Hello,
> 
> currently I try to port a fairly large project from autotools to cmake.
> Today, I updated from 1.8.3 to 2.0.1 (Linux) and from now on "make 
> install" fails for subdirectories containing exec targets.
> (But going to subdir and then "make install" works fine.)
> 
> Error message:
> ....
> -- Installing /datapc/jade/evers/devel/bin/biasconvert
> CMake Error: Error in cmake code at
> /datapc/jade/evers/devel/BIAS-1.5/Tools/cmake_install.cmake:4:
> FILE cannot find file: biasconvert to install.
> 
> 
> Tools/CmakeList.txt :
> 
> ADD_EXECUTABLE(biasextract biasextract.cpp)
> TARGET_LINK_LIBRARIES(biasextract BIASImage)
> INSTALL_TARGETS(/bin biasview
> 
> 
> CmakeLists.txt (toplevel):
> ...
> SUBDIRS (...
>   Tools
> ...
> )
> 
> 
> Tracking the problem down leads to the following:
> 
> - make install runs "$(CMAKE_COMMAND) -P cmake_install.cmake"
> - cmake_install.cmake contains a line:
>    INCLUDE("/datapc/jade/evers/devel/BIAS-1.5/Tools/cmake_install.cmake")
> - Tools/cmake_install contains a line:
>    FILE(INSTALL DESTINATION "/datapc/jade/evers/devel/bin" TYPE
>        EXECUTABLE FILES "biasview")
> 
> - after resolving INCLUDE(), the line FILE(..) contains an invalid
>    filename, because the path got lost.
> 
> - comparing that to the FILE() line of a header shows exactly that
>    (path got lost )




More information about the Cmake mailing list