Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / cmake / FindCUnit.cmake
1 # - Find CUnit
2 # Find the CUnit libraries
3 #
4 #  This module defines the following variables:
5 #     CUNIT_FOUND        - true if CUNIT_INCLUDE_DIR & CUNIT_LIBRARY are found
6 #     CUNIT_LIBRARIES    - Set when CUNIT_LIBRARY is found
7 #     CUNIT_INCLUDE_DIRS - Set when CUNIT_INCLUDE_DIR is found
8 #
9 #     CUNIT_INCLUDE_DIR  - where to find CUnit.h, etc.
10 #     CUNIT_LIBRARY      - the cunit library
11 #
12
13 #=============================================================================
14 # Copyright 2011 O.S. Systems Software Ltda.
15 # Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
16 #
17 # Licensed under the Apache License, Version 2.0 (the "License");
18 # you may not use this file except in compliance with the License.
19 # You may obtain a copy of the License at
20 #
21 #     http://www.apache.org/licenses/LICENSE-2.0
22 #
23 # Unless required by applicable law or agreed to in writing, software
24 # distributed under the License is distributed on an "AS IS" BASIS,
25 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 # See the License for the specific language governing permissions and
27 # limitations under the License.
28 #=============================================================================
29
30 find_path(CUNIT_INCLUDE_DIR NAMES CUnit.h
31           PATH_SUFFIXES CUnit
32           DOC "The CUnit include directory"
33 )
34
35 find_library(CUNIT_LIBRARY NAMES cunit
36           DOC "The CUnit library"
37 )
38
39 include(FindPackageHandleStandardArgs)
40 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CUnit DEFAULT_MSG CUNIT_LIBRARY CUNIT_INCLUDE_DIR)
41
42 if(CUNIT_FOUND)
43   set( CUNIT_LIBRARIES ${CUNIT_LIBRARY} )
44   set( CUNIT_INCLUDE_DIRS ${CUNIT_INCLUDE_DIR} )
45 endif()
46
47 mark_as_advanced(CUNIT_INCLUDE_DIR CUNIT_LIBRARY)