From 029a3ba61e9ef55433ebc0b2d95d856b67a026e6 Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Mon, 15 Feb 2016 18:50:48 +0100 Subject: [PATCH] FindwxWidgets.cmake: Improve regex for version number matches --- CMakeModules/FindwxWidgets.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeModules/FindwxWidgets.cmake b/CMakeModules/FindwxWidgets.cmake index d142cd1f7c..56ba443ac2 100644 --- a/CMakeModules/FindwxWidgets.cmake +++ b/CMakeModules/FindwxWidgets.cmake @@ -868,11 +868,11 @@ if(wxWidgets_FOUND AND wxWidgets_FIND_VERSION) file(READ ${_filename} _wx_version_h) - string(REGEX REPLACE "^(.*\n)?#define wxMAJOR_VERSION[ ]+([0-9]+).*" + string(REGEX REPLACE "^(.*\n)?#define +wxMAJOR_VERSION +([0-9]+).*" "\\2" wxWidgets_VERSION_MAJOR "${_wx_version_h}" ) - string(REGEX REPLACE "^(.*\n)?#define wxMINOR_VERSION[ ]+([0-9]+).*" + string(REGEX REPLACE "^(.*\n)?#define +wxMINOR_VERSION +([0-9]+).*" "\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" ) - string(REGEX REPLACE "^(.*\n)?#define wxRELEASE_NUMBER[ ]+([0-9]+).*" + string(REGEX REPLACE "^(.*\n)?#define +wxRELEASE_NUMBER +([0-9]+).*" "\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" ) set(wxWidgets_VERSION_STRING "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )