Find Augeas: Reformat file with `cmake-format`
+# ~~~
# Finds augeas and its libraries
# Uses the same semantics as pkg_check_modules, i.e. LIBAUGEAS{_FOUND,_INCLUDE_DIR,_LIBRARIES}
#
# Author: Martin Briza <mbriza@redhat.com>
#
# Distributed under the BSD license. See COPYING-CMAKE-SCRIPTS for details.
+# ~~~
include (LibFindMacros)
-if (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES AND LIBAUGEAS_PREFIX)
- # in cache already
+if (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES AND LIBAUGEAS_PREFIX) # in cache already
set (LIBAUGEAS_FOUND TRUE)
else (LIBAUGEAS_INCLUDE_DIR)
@@ -21,11 +22,7 @@ else (LIBAUGEAS_INCLUDE_DIR)
pkg_check_modules (_LIBAUGEAS_PC QUIET "libaugeas")
endif (PKG_CONFIG_FOUND)
- find_path (LIBAUGEAS_INCLUDE_DIR augeas.h
- ${_LIBAUGEAS_PC_INCLUDE_DIRS}
- /usr/include
- /usr/local/include
- )
+ find_path (LIBAUGEAS_INCLUDE_DIR augeas.h ${_LIBAUGEAS_PC_INCLUDE_DIRS} /usr/include /usr/local/include)
pkg_get_variable (_LIBAUGEAS_PREFIX augeas prefix)
if (NOT _LIBAUGEAS_PREFIX)
@@ -33,10 +30,7 @@ else (LIBAUGEAS_INCLUDE_DIR)
endif ()
set (LIBAUGEAS_PREFIX "${_LIBAUGEAS_PREFIX}" CACHE INTERNAL "prefix path of libaugeas" FORCE)
- find_library (LIBAUGEAS_LIBRARIES NAMES augeas
- PATHS
- ${_LIBAUGEAS_PC_LIBDIR}
- )
+ find_library (LIBAUGEAS_LIBRARIES NAMES augeas PATHS ${_LIBAUGEAS_PC_LIBDIR})
if (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES)
set (LIBAUGEAS_FOUND TRUE)
