Commit fec8817c authored by Omar Plummer's avatar Omar Plummer Committed by Konrad Zemek
Browse files

Fix TagLib version check.

The version check compared version strings lexicographically, so "1.7"
(the min version) compared as greater than "1.10.0".

BUG: 351013
REVIEW: 124639
parent 61756096
...@@ -29,10 +29,10 @@ if(TAGLIBCONFIG_EXECUTABLE) ...@@ -29,10 +29,10 @@ if(TAGLIBCONFIG_EXECUTABLE)
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION) exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION)
if(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") if("${TAGLIB_MIN_VERSION}" VERSION_GREATER TAGLIB_VERSION)
message(STATUS "TagLib version too old: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}") message(STATUS "TagLib version too old: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}")
set(TAGLIB_FOUND FALSE) set(TAGLIB_FOUND FALSE)
else(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") else("${TAGLIB_MIN_VERSION}" VERSION_GREATER TAGLIB_VERSION)
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES) exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES)
...@@ -42,7 +42,7 @@ if(TAGLIBCONFIG_EXECUTABLE) ...@@ -42,7 +42,7 @@ if(TAGLIBCONFIG_EXECUTABLE)
set(TAGLIB_FOUND TRUE) set(TAGLIB_FOUND TRUE)
endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS)
string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}") string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}")
endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") endif("${TAGLIB_MIN_VERSION}" VERSION_GREATER TAGLIB_VERSION)
mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES) mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES)
else(TAGLIBCONFIG_EXECUTABLE) else(TAGLIBCONFIG_EXECUTABLE)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment