[CMake] OPTION variables are not accesible in POST_INSTALL_SCRIPTs
Brad King
brad.king at kitware.com
Wed Apr 12 10:01:15 EDT 2006
Michael Biebl wrote:
> I have OPTION(INSTALL_LINKS "..." ON) in the toplevel CMakeLists.txt
> file and want to use that variable in a POST_INSTALL_SCRIPT. Depending
> on INSTALL_LINKS I want to create additional links. Unfortunately the
> value of INSTALL_LINKS is not propagated to the POST_INSTALL_SCRIPT
> create_links.cmake. Is that a bug or am I doing something wrong?
The POST_INSTALL_SCRIPT is executed by a call to CMake during the build
and does not have access to the main CMake code. You need to use
CONFIGURE_FILE to create the script with the settings already known.
-Brad
More information about the CMake
mailing list