From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/civetweb/cmake/FindLibSubunit.cmake | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/civetweb/cmake/FindLibSubunit.cmake (limited to 'src/civetweb/cmake/FindLibSubunit.cmake') diff --git a/src/civetweb/cmake/FindLibSubunit.cmake b/src/civetweb/cmake/FindLibSubunit.cmake new file mode 100644 index 00000000..b45344fb --- /dev/null +++ b/src/civetweb/cmake/FindLibSubunit.cmake @@ -0,0 +1,46 @@ +#.rst: +# FindLibSubunit +# -------- +# +# Find the native realtime includes and library. +# +# IMPORTED Targets +# ^^^^^^^^^^^^^^^^ +# +# This module defines :prop_tgt:`IMPORTED` target ``LIBSUBUNIT::LIBSUBUNIT``, if +# LIBSUBUNIT has been found. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module defines the following variables: +# +# :: +# +# LIBSUBUNIT_INCLUDE_DIRS - where to find subunit/child.h +# LIBSUBUNIT_LIBRARIES - List of libraries when using libsubunit. +# LIBSUBUNIT_FOUND - True if subunit library found. +# +# Hints +# ^^^^^ +# +# A user may set ``LIBSUBUNIT_ROOT`` to a subunit library installation root to tell this +# module where to look. + +find_path(LIBSUBUNIT_INCLUDE_DIRS + NAMES subunit/child.h + PATHS ${LIBSUBUNIT_ROOT}/include/ +) +find_library(LIBSUBUNIT_LIBRARIES subunit) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibSubunit DEFAULT_MSG LIBSUBUNIT_LIBRARIES LIBSUBUNIT_INCLUDE_DIRS) +mark_as_advanced(LIBSUBUNIT_INCLUDE_DIRS LIBSUBUNIT_LIBRARIES) + +if(LIBSUBUNIT_FOUND) + if(NOT TARGET LIBSUBUNIT::LIBSUBUNIT) + add_library(LIBSUBUNIT::LIBSUBUNIT UNKNOWN IMPORTED) + set_target_properties(LIBSUBUNIT::LIBSUBUNIT PROPERTIES + IMPORTED_LOCATION "${LIBSUBUNIT_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${LIBSUBUNIT_INCLUDE_DIRS}") + endif() +endif() -- cgit v1.2.3