5 # Find the native realtime includes and library.
10 # This module defines :prop_tgt:`IMPORTED` target ``LIBSUBUNIT::LIBSUBUNIT``, if
11 # LIBSUBUNIT has been found.
16 # This module defines the following variables:
20 # LIBSUBUNIT_INCLUDE_DIRS - where to find subunit/child.h
21 # LIBSUBUNIT_LIBRARIES - List of libraries when using libsubunit.
22 # LIBSUBUNIT_FOUND - True if subunit library found.
27 # A user may set ``LIBSUBUNIT_ROOT`` to a subunit library installation root to tell this
28 # module where to look.
30 find_path(LIBSUBUNIT_INCLUDE_DIRS
32 PATHS ${LIBSUBUNIT_ROOT}/include/
34 find_library(LIBSUBUNIT_LIBRARIES subunit)
35 include(FindPackageHandleStandardArgs)
36 find_package_handle_standard_args(LibSubunit DEFAULT_MSG LIBSUBUNIT_LIBRARIES LIBSUBUNIT_INCLUDE_DIRS)
37 mark_as_advanced(LIBSUBUNIT_INCLUDE_DIRS LIBSUBUNIT_LIBRARIES)
40 if(NOT TARGET LIBSUBUNIT::LIBSUBUNIT)
41 add_library(LIBSUBUNIT::LIBSUBUNIT UNKNOWN IMPORTED)
42 set_target_properties(LIBSUBUNIT::LIBSUBUNIT PROPERTIES
43 IMPORTED_LOCATION "${LIBSUBUNIT_LIBRARIES}"
44 INTERFACE_INCLUDE_DIRECTORIES "${LIBSUBUNIT_INCLUDE_DIRS}")