FindwxWidgets: Does not support specifying a wxwidgets version
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Original bug report at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493460
It was reported against 2.6 but as far as I can tell, it still applies to 2.8.1/master. In short:
It isn't possible:
- to specify which wx version should be found,
- or to check which wx version has been found,
- or to specify which
wx-config
program to run.
I believe it should be pretty easy to support find_package(wxWdigets <version>)
given the information provided by reporter. I pasted it below.
Some suggestions by reporter:
- providing with an additional _FOUND_VERSION or _FOUND_RELEASE
variable so that one can at least check which version has been picked
up. That might be done by calling using
$(wx-config --release)
. - supporting forcing the version to something user-specified. That can be achieved by using the wx-config --version parameter. Examples for that below.
- if the previous one isn't acceptable (although I found it quite
elegant), it'd be nice to be able to specifying a
PATH
forwx-config
, so that one can determine it in debian/rules, and inject it in aCMakeLists.txt
file.
Examples of --version use:
kibi@waity:~$ wx-config --version
2.6.3
kibi@waity:~$ wx-config --release
2.6
kibi@waity:~$ wx-config --version=2.6 --version
2.6.3
kibi@waity:~$ wx-config --version=2.6 --release
2.6
kibi@waity:~$ wx-config --version=2.8 --version
2.8.7
kibi@waity:~$ wx-config --version=2.8 --release
2.8
Edited by Brad King