Navigation


Changeset 886:4e2b4eef5908 in freeDiameter for cmake


Ignore:
Timestamp:
Nov 15, 2012, 2:57:43 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Fix handling of error case for MySQL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cmake/Modules/FindMySQL.cmake

    r390 r886  
    3838
    3939
    40 # handle the QUIETLY and REQUIRED arguments and set MySQL_FOUND to TRUE if
    41 # all listed variables are TRUE
    42 INCLUDE(FindPackageHandleStandardArgs)
    43 FIND_PACKAGE_HANDLE_STANDARD_ARGS(MySQL DEFAULT_MSG MySQL_LIBRARY MySQL_INCLUDE_DIR)
    44 
    45 IF(MySQL_FOUND)
    46   SET( MySQL_LIBRARIES ${MySQL_LIBRARY} )
    47 ELSE(MySQL_FOUND)
    48   SET( MySQL_LIBRARIES )
    49 ENDIF(MySQL_FOUND)
     40IF (MySQL_FOUND)
     41  IF (NOT MySQL_FIND_QUIETLY)
     42    MESSAGE(STATUS "Found MySQL: ${MySQL_LIBRARY}")
     43  ENDIF (NOT MySQL_FIND_QUIETLY)
     44ELSE (MySQL_FOUND)
     45  IF (MySQL_FIND_REQUIRED)
     46    MESSAGE(STATUS "Looked for MySQL libraries named ${MySQL_NAMES}.")
     47    MESSAGE(FATAL_ERROR "Could NOT find MySQL library")
     48  ENDIF (MySQL_FIND_REQUIRED)
     49ENDIF (MySQL_FOUND)
    5050
    5151MARK_AS_ADVANCED(
Note: See TracChangeset for help on using the changeset viewer.