[Cmake] install from subdirs ?

Jan-Friso Evers evers at mip.informatik.uni-kiel.de
Fri May 28 04:28:47 EDT 2004


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 )


so far,

friso


-- 
Dipl.Ing. Inf. Jan-Friso Evers-Senne
Multimedia Information Processing
email: evers at mip.informatik.uni-kiel.de
Tel: +49 431 880-1418   FAX: +49 431 880-4054

Christian-Albrechts-University Kiel
Institute of Computer Science and Applied Mathematics
Hermann-Rodewald-Str. 3
D-24098 Kiel, Germany


More information about the Cmake mailing list