Added version check for wxWidgets.

If the systemwide wxWidgets is too old, we can fall back to the version
from Externals instead of letting the build fail.

Note that while the version in Externals appears to be wxWidgets 2.8,
it has post-2.8 features manually added to it (wxAuiToolBar), so the
version check only accepts 2.9 or higher.
This commit is contained in:
Maarten ter Huurne 2011-12-04 03:37:02 +01:00
parent 7c92b94bc1
commit ffb06c23ac

View File

@ -388,6 +388,21 @@ if(NOT DISABLE_WX)
include(FindwxWidgets OPTIONAL)
FIND_PACKAGE(wxWidgets COMPONENTS core aui adv)
if(wxWidgets_FOUND)
EXECUTE_PROCESS(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_CONFIG_OPTIONS} --version
OUTPUT_VARIABLE wxWidgets_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
message("Found wxWidgets version ${wxWidgets_VERSION}")
if(${wxWidgets_VERSION} VERSION_LESS "2.9.0")
message("At least 2.9.0 is required; ignoring found version")
unset(wxWidgets_FOUND)
endif()
endif(wxWidgets_FOUND)
if(wxWidgets_FOUND)
include(${wxWidgets_USE_FILE})