Mercurial > hg > freeDiameter-dtls
changeset 886:4e2b4eef5908
Fix handling of error case for MySQL
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Wed, 14 Nov 2012 18:57:43 +0100 |
parents | b7002bcc92a5 |
children | ad9fe07688b7 |
files | cmake/Modules/FindMySQL.cmake |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/cmake/Modules/FindMySQL.cmake Wed Nov 14 12:35:47 2012 +0100 +++ b/cmake/Modules/FindMySQL.cmake Wed Nov 14 18:57:43 2012 +0100 @@ -37,16 +37,16 @@ ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) -# handle the QUIETLY and REQUIRED arguments and set MySQL_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(MySQL DEFAULT_MSG MySQL_LIBRARY MySQL_INCLUDE_DIR) - -IF(MySQL_FOUND) - SET( MySQL_LIBRARIES ${MySQL_LIBRARY} ) -ELSE(MySQL_FOUND) - SET( MySQL_LIBRARIES ) -ENDIF(MySQL_FOUND) +IF (MySQL_FOUND) + IF (NOT MySQL_FIND_QUIETLY) + MESSAGE(STATUS "Found MySQL: ${MySQL_LIBRARY}") + ENDIF (NOT MySQL_FIND_QUIETLY) +ELSE (MySQL_FOUND) + IF (MySQL_FIND_REQUIRED) + MESSAGE(STATUS "Looked for MySQL libraries named ${MySQL_NAMES}.") + MESSAGE(FATAL_ERROR "Could NOT find MySQL library") + ENDIF (MySQL_FIND_REQUIRED) +ENDIF (MySQL_FOUND) MARK_AS_ADVANCED( MySQL_LIBRARY