[CMake] Give program path of data directory at installation time

Jordi Gutiérrez Hermoso jordigh at octave.org
Tue Jun 7 14:22:20 EDT 2011


2011/6/7 Jordi Gutiérrez Hermoso <jordigh at octave.org>:
> I have a Python script $program that should be installed under bin/,
> but it needs a lot of data that should be installed under
> share/$program/. I would like for the install Makefile target to
> somehow modify $program to let it know the absolute pathname of where
> the data share/$program/ is, including perhaps any $DESTDIR. How
> should I make my program aware of where the data was installed?

To answer my own question and for the benefit of anyone else who might
have been interested, configure_file() is the CMake command I was
looking for.

- Jordi G. H.


More information about the CMake mailing list