1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

fix check for iwlib and output some more detailed errors

This commit is contained in:
Phil Sutter 2009-12-27 03:45:06 +01:00
parent c4c2377d0e
commit 0d2770ab33

View File

@ -60,11 +60,14 @@ if(BUILD_NCURSES)
endif(BUILD_NCURSES) endif(BUILD_NCURSES)
if(BUILD_WLAN) 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) find_library(IWLIB_LIB NAMES iw)
if(NOT IWLIB_H OR NOT IWLIB_LIB) if(NOT IWLIB_LIB)
message(FATAL_ERROR "Unable to find iwlib") message(FATAL_ERROR "Unable to find libiw.so")
endif(NOT IWLIB_H OR NOT IWLIB_LIB) endif(NOT IWLIB_LIB)
set(CMAKE_REQUIRED_LIBRARIES ${IWLIB_LIB}) set(CMAKE_REQUIRED_LIBRARIES ${IWLIB_LIB})
check_function_exists(iw_sockets_open IWLIB_SOCKETS_OPEN_FUNC) check_function_exists(iw_sockets_open IWLIB_SOCKETS_OPEN_FUNC)
endif(BUILD_WLAN) endif(BUILD_WLAN)