unbound: fix type checking

This commit is contained in:
Ben Boeckel 2014-10-24 15:30:44 -04:00
parent d43a20f8f4
commit 4b6515cfb5

View File

@ -104,10 +104,10 @@ function (check_type_exists type variable header default)
set(CMAKE_EXTRA_INCLUDE_FILES "${header}")
check_type_size("${type}" "${variable}")
if (${variable} STREQUAL "")
if (NOT HAVE_${type})
set("${variable}" "${default}" PARENT_SCOPE)
else ()
set("${variable}" "" PARENT_SCOPE)
set("${variable}" "FALSE" PARENT_SCOPE)
endif ()
endfunction ()