[CMake] FindwxWidgets.cmake, suggestion add option to pass to wx-config

Peter Visser pervulgo at gmail.com
Wed Nov 29 14:43:25 EST 2006


Hi,

I'm using FindwxWidgets, currently it seems that it is not possible to
specify options like version, debug static and so on. At least not for
non-WIN32 (The documentation describes to specify arguments to nmake at
build time.).

Perhaps it is an idea  to pass options to wx-config. This could be done by
making a small change to FindwxWidgets.cmake, for every call to wx-config
add e.g. ${wxWidgets_WXCONFIG_OPTS}.

--> ARGS "${wxWidgets_CONFIG_EXECUTABLE} ${wxWidgets_WXCONFIG_OPTS} --libs
${wxWidgets_USE_LIBS}"

Then in the CMakelists.txt:
******************
# wxWidgets_WXCONFIG_OPTS
# Set options to pass to wx-config.
# --debug=[yes/no]
# --static=[yes/no]
# --version=[2.6/2.8]
# and so on
#

SET (wxWidgets_WXCONFIG_OPTS "--debug=no --static=no --version=2.6")
*******************

If options are not satisfied wxWidgets is not found.
If the variable is not set, the behavior will not change.

It is a very basic approach but it gives control over the wxWidgets options.

Cheers,

Peter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20061129/b8a45b69/attachment.htm


More information about the CMake mailing list