BUG: fix potential issue with empty strings

This commit is contained in:
Bill Hoffman 2009-02-03 08:38:34 -05:00
parent feafe2abee
commit 5b2b40d34b
1 changed files with 3 additions and 3 deletions

View File

@ -106,13 +106,13 @@ IF(KDECONFIG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE kde_config_version )
STRING(REGEX MATCH "KDE: .\\." kde_version ${kde_config_version})
IF (${kde_version} MATCHES "KDE: 3\\.")
STRING(REGEX MATCH "KDE: .\\." kde_version "${kde_config_version}")
IF ("${kde_version}" MATCHES "KDE: 3\\.")
EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --prefix
OUTPUT_VARIABLE kdedir )
STRING(REGEX REPLACE "\n" "" KDE3PREFIX "${kdedir}")
ENDIF (${kde_version} MATCHES "KDE: 3\\.")
ENDIF ("${kde_version}" MATCHES "KDE: 3\\.")
ENDIF(KDECONFIG_EXECUTABLE)