From 1d7943bc7e131b983169a932598160bb0313a179 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sun, 6 Oct 2013 04:21:37 +0200 Subject: [PATCH] Simplify FindLibconfig++ using find_package_handle_standard_args features. --- cmake/Modules/FindLibConfig++.cmake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cmake/Modules/FindLibConfig++.cmake b/cmake/Modules/FindLibConfig++.cmake index 28c9712e..265dd7ba 100644 --- a/cmake/Modules/FindLibConfig++.cmake +++ b/cmake/Modules/FindLibConfig++.cmake @@ -1,21 +1,15 @@ -# Find the libconfig++ includes and library +# - Find the libconfig++ includes and library # # This module defines # LIBCONFIG++_INCLUDE_DIR, where to find libconfig++ include files, etc. # LIBCONFIG++_LIBRARY, the library to link against to use libconfig++. # LIBCONFIG++_FOUND, If false, do not try to use libconfig++. -set(LIBCONFIG++_FOUND FALSE) - find_path(LIBCONFIG++_INCLUDE_DIR libconfig.h++) find_library(LIBCONFIG++_LIBRARY config++) -if (LIBCONFIG++_INCLUDE_DIR AND LIBCONFIG++_LIBRARY) - set(LIBCONFIG++_FOUND TRUE) -endif (LIBCONFIG++_INCLUDE_DIR AND LIBCONFIG++_LIBRARY) - # Use the default CMake facilities for handling QUIET/REQUIRED. include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LIBCONFIG++ +find_package_handle_standard_args(LibConfig++ REQUIRED_VARS LIBCONFIG++_INCLUDE_DIR LIBCONFIG++_LIBRARY)