[CMake] Re: [out-of-tree] install uses wrong path

Brad King brad.king at kitware.com
Thu Aug 24 12:25:25 EDT 2006


Eduard Bloch wrote:
> It seems like install_manifest already contains hardcoded absolute
> (wrong) directions when created. The workaround was adding an absolete
> path based on CMAKE_BINARY_DIR to INSTALL targets:
> 
> SET(BINS_SET mkisofs/mkisofs cdrecord/wodim rscsi/rscsi readcd/readcd
> mkisofs/devdump mkisofs/isodebug mkisofs/isodump
> ->mkisofs/isoinfo mkisofs/isovfy 3rd-party/zisofs_tools/mkzftree
> cdda2wav/cdda2wav cdda2wav/pitchplay cdda2wav/readmult
> ->cdda2wav/cdda2mp3 cdda2wav/cdda2ogg)
> FOREACH(app ${BINS_SET})
>    install(PROGRAMS ${CMAKE_BINARY_DIR}/${app} DESTINATION bin)
> ENDFOREACH(app ${BINS_SET})

Read the documentation of the INSTALL command.  In the section about
install(PROGRAMS) it says "Use the TARGETS form to install targets built
within the project."  In other words:

# mkisofs/CMakeLists.txt
INSTALL(TARGETS mkisofs DESTINATION bin)

-Brad


More information about the CMake mailing list