[CMake] How to set up user option defaults that depend on other
user option defaults?
Alexander Neundorf
a.neundorf-work at gmx.net
Tue Nov 7 02:51:06 EST 2006
-------- Original-Nachricht --------
Datum: Mon, 06 Nov 2006 17:52:50 -0800 (PST)
Von: "Alan W. Irwin" <irwin at beluga.phys.uvic.ca>
An: cmake at cmake.org
Betreff: [CMake] How to set up user option defaults that depend on other user option defaults?
> With the PLplot CMake build system I am trying to set up refined
> installation directories for our users that are similar to what they have
> previously used with the autotools configure script.
>
> Here is a subset of the CMake logic which illustrates the problem:
>
> set(
> CMAKE_INSTALL_EXEC_PREFIX
> ${CMAKE_INSTALL_PREFIX}
> CACHE PATH "install location for architecture-dependent files"
> )
>
> set(
> CMAKE_INSTALL_BINDIR
> ${CMAKE_INSTALL_EXEC_PREFIX}/bin
> CACHE PATH "install location for user executables"
> )
> [...]
>
> My idea was to mimic the autotools configure script where if you specify
> prefix it overrides exec-prefix unless that is specified by the user.
> Similarly, if you specify exec-prefix (or if it is overridden by prefix)
> it
> forces bindir to be exec-prefix/bin unless bindir is specified by the
> user.
Have a look what we did for KDE, it's the _SET_FANCY() macro:
http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/FindKDE4Internal.cmake?rev=602569&view=auto
Bye
Alex
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the CMake
mailing list