From 0d2770ab332930ffbd7dad1b53bf1cc79baf2f68 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Sun, 27 Dec 2009 03:45:06 +0100 Subject: [PATCH] fix check for iwlib and output some more detailed errors --- cmake/ConkyPlatformChecks.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake index 8adb311b..332afff1 100644 --- a/cmake/ConkyPlatformChecks.cmake +++ b/cmake/ConkyPlatformChecks.cmake @@ -60,11 +60,14 @@ if(BUILD_NCURSES) endif(BUILD_NCURSES) if(BUILD_WLAN) - check_include_file(iwlib.h IWLIB_H) + check_include_file(iwlib.h IWLIB_H -D_GNU_SOURCE) + if(NOT IWLIB_H) + message(FATAL_ERROR "Unable to find iwlib.h") + endif(NOT IWLIB_H) find_library(IWLIB_LIB NAMES iw) - if(NOT IWLIB_H OR NOT IWLIB_LIB) - message(FATAL_ERROR "Unable to find iwlib") - endif(NOT IWLIB_H OR NOT IWLIB_LIB) + if(NOT IWLIB_LIB) + message(FATAL_ERROR "Unable to find libiw.so") + endif(NOT IWLIB_LIB) set(CMAKE_REQUIRED_LIBRARIES ${IWLIB_LIB}) check_function_exists(iw_sockets_open IWLIB_SOCKETS_OPEN_FUNC) endif(BUILD_WLAN)