Support subrelease field in wxWidgets cmake detection
Sometimes wxWidgets increments the subrelease to a non-zero value, and since wxPython will report a subrelease, we must ensure we can get the subrelease from the wx library properly, otherwise configure will fail thinking the library isn't the same version as that used by wxPython. Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13887
This commit is contained in:
parent
9647a22e50
commit
b536580119
|
@ -926,8 +926,17 @@ if(wxWidgets_FOUND)
|
||||||
"\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" )
|
"\\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}" )
|
"\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" )
|
||||||
set(wxWidgets_VERSION_STRING
|
string(REGEX REPLACE "^(.*\n)?#define +wxSUBRELEASE_NUMBER +([0-9]+).*"
|
||||||
"${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
|
"\\2" wxWidgets_VERSION_SUBRELEASE "${_wx_version_h}" )
|
||||||
|
|
||||||
|
if( ${wxWidgets_VERSION_SUBRELEASE} GREATER 0 )
|
||||||
|
set(wxWidgets_VERSION_STRING
|
||||||
|
"${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}.${wxWidgets_VERSION_SUBRELEASE}" )
|
||||||
|
else()
|
||||||
|
set(wxWidgets_VERSION_STRING
|
||||||
|
"${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
|
||||||
|
endif()
|
||||||
|
|
||||||
DBG_MSG("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}")
|
DBG_MSG("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue