aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/FindCppUnit.cmake
blob: 71d503563ddedf3915e1cc0d8389938d13338457 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(CPPUNIT "cppunit")

IF(CPPUNIT_FOUND)

  SET(CPPUNIT_LIBRARY "${CPPUNIT_LIBRARIES}")

ELSE()

  FIND_PATH(CPPUNIT_INCLUDE_DIRS cppunit/TestCase.h)
  FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit libcppunit)

  INCLUDE(FindPackageHandleStandardArgs)
  FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIRS)

  MARK_AS_ADVANCED(CPPUNIT_INCLUDE_DIRS CPPUNIT_LIBRARY)

ENDIF()