From 7151a4724047e5248375263adb7f4ee5e2d5158c Mon Sep 17 00:00:00 2001 From: Ali Maredia Date: Mon, 4 Jan 2016 15:03:48 -0500 Subject: [PATCH] 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 --- CMakeLists.txt | 4 ++-- cmake/modules/Findxio.cmake | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4fab1ca2de..fac55403241 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/modules/Findxio.cmake b/cmake/modules/Findxio.cmake index 11fd892d8b3..1025f492452 100644 --- a/cmake/modules/Findxio.cmake +++ b/cmake/modules/Findxio.cmake @@ -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}")