diff options
Diffstat (limited to 'Modules/CheckLibraryExists.cmake')
-rw-r--r-- | Modules/CheckLibraryExists.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index 85cef36..7437b9b 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -18,9 +18,12 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) -DLINK_LIBRARIES:STRING=${LIBRARY} OUTPUT_VARIABLE OUTPUT) - IF(NOT ${VARIABLE}) + IF(${VARIABLE}) + SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}") + ELSE(${VARIABLE}) + SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}") WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log "Determining if the function ${FUNCTION} exists in the ${LIBRARY} failed with the following output:\n" "${OUTPUT}\n") - ENDIF(NOT ${VARIABLE}) + ENDIF(${VARIABLE}) ENDMACRO(CHECK_LIBRARY_EXISTS) |