2016-05-23 22:06:29 -04:00
|
|
|
# This module defines
|
|
|
|
# LIBIW_FOUND - whether the libiw library was found
|
|
|
|
# LIBIW_LIBRARIES - the libiw library
|
|
|
|
# LIBIW_INCLUDE_DIR - the include path of the libiw library
|
|
|
|
|
|
|
|
find_library(LIBIW_LIBRARY iw)
|
|
|
|
|
|
|
|
if(LIBIW_LIBRARY)
|
2019-06-15 11:12:57 -04:00
|
|
|
set(LIBIW_LIBRARIES ${LIBIW_LIBRARY})
|
2016-05-23 22:06:29 -04:00
|
|
|
endif(LIBIW_LIBRARY)
|
|
|
|
|
|
|
|
find_path(LIBIW_INCLUDE_DIR NAMES iwlib.h)
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(Libiw DEFAULT_MSG LIBIW_LIBRARY LIBIW_INCLUDE_DIR)
|
|
|
|
|
|
|
|
mark_as_advanced(LIBIW_INCLUDE_DIR LIBIW_LIBRARY)
|
2019-06-15 11:12:57 -04:00
|
|
|
|
|
|
|
if(Libiw_FOUND AND NOT TARGET Libiw::Libiw)
|
2019-06-25 01:21:31 -04:00
|
|
|
create_imported_target("Libiw::Libiw" "${LIBIW_INCLUDE_DIR}" "${LIBIW_LIBRARIES}")
|
2019-06-15 11:12:57 -04:00
|
|
|
endif()
|