cmake: Findxio.cmake update Xio OFF by default

Option WITH_XIO now OFF but required by default,
Findxio.cmake now using
FIND_PACKAGE_HANDLE_STANDARD_ARGS.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
This commit is contained in:
Ali Maredia 2016-01-04 15:03:48 -05:00
parent 8ef0dfb30e
commit 7151a47240
2 changed files with 5 additions and 9 deletions

View File

@ -219,9 +219,9 @@ else()
endif(NSS_FOUND)
endif(CRYPTOPP_FOUND)
option(WITH_XIO "Enable XIO messaging" ON)
option(WITH_XIO "Enable XIO messaging" OFF)
if(WITH_XIO)
find_package(xio)
find_package(xio REQUIRED)
set(HAVE_XIO ${Xio_FOUND})
endif(WITH_XIO)

View File

@ -18,14 +18,10 @@ endif()
find_path(Xio_INCLUDE_DIR libxio.h NO_DEFAULT_PATH PATHS ${_xio_include_path})
find_library(Xio_LIBRARY NO_DEFAULT_PATH NAMES xio PATHS ${_xio_lib_path})
set(Xio_LIBRARIES ${Xio_LIBRARY})
if (Xio_INCLUDE_DIR AND Xio_LIBRARY)
set(Xio_FOUND TRUE)
set(Xio_LIBRARIES ${Xio_LIBRARY} )
else ()
set(Xio_FOUND FALSE)
set(Xio_LIBRARIES )
endif ()
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(xio DEFAULT_MSG Xio_LIBRARY Xio_INCLUDE_DIR)
if (Xio_FOUND)
message(STATUS "Found Xio: ${Xio_INCLUDE_DIR} ${Xio_LIBRARY}")