blob: 121cb5f10e2a2fc98bfa6992efe6110fa8e050ad [file] [log] [blame]
Neale Rannse3282ba2019-07-30 06:20:39 -07001# Copyright (c) 2018 Cisco and/or its affiliates.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at:
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14########################################
15#
16# Find the Libsubunit library and includes
17# This module sets:
18# SUBUNIT_FOUND: True if Libsubunit was found
19# SUBUNIT_LIBRARY: The Libsubunit library
20# SUBUNIT_INCLUDE_DIR: The Libsubunit include dir
21#
22
23set(SUBUNIT_SEARCH_PATH_LIST
24 ${SUBUNIT_HOME}
25 $ENV{SUBUNIT_HOME}
26 /usr/local
27 /opt
28 /usr
29)
30
31find_path(SUBUNIT_INCLUDE_DIR
32 NAMES child.h
33 HINTS ${SUBUNIT_SEARCH_PATH_LIST}
34 PATH_SUFFIXES include subunit
35)
36
37find_library(SUBUNIT_LIBRARY
38 NAMES subunit
39 PATH_SUFFIXES lib
40 HINTS ${SUBUNIT_SEARCH_PATH_LIST}
41)
42
43include(FindPackageHandleStandardArgs)
44find_package_handle_standard_args(
45 Subunit
46 REQUIRED_VARS SUBUNIT_LIBRARY SUBUNIT_INCLUDE_DIR
47)