diff options
Diffstat (limited to 'Modules/FindEXPAT.cmake')
-rw-r--r-- | Modules/FindEXPAT.cmake | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake index 6183af8..653094c 100644 --- a/Modules/FindEXPAT.cmake +++ b/Modules/FindEXPAT.cmake @@ -38,9 +38,8 @@ if (EXPAT_INCLUDE_DIR AND EXISTS "${EXPAT_INCLUDE_DIR}/expat.h") unset(EXPAT_VERSION_STRING) foreach(VPART MAJOR MINOR MICRO) foreach(VLINE ${expat_version_str}) - if(VLINE MATCHES "^#[\t ]*define[\t ]+XML_${VPART}_VERSION") - string(REGEX REPLACE "^#[\t ]*define[\t ]+XML_${VPART}_VERSION[\t ]+([0-9]+)$" "\\1" - EXPAT_VERSION_PART "${VLINE}") + if(VLINE MATCHES "^#[\t ]*define[\t ]+XML_${VPART}_VERSION[\t ]+([0-9]+)$") + set(EXPAT_VERSION_PART "${CMAKE_MATCH_1}") if(EXPAT_VERSION_STRING) set(EXPAT_VERSION_STRING "${EXPAT_VERSION_STRING}.${EXPAT_VERSION_PART}") else() |