view cmake/FindCppunit.cmake @ 272:6e3b7b9cdfa0

Socket: SocketAddress lacks headers for sockaddr_storage
author David Demelier <markand@malikania.fr>
date Wed, 22 Oct 2014 22:54:53 +0200
parents 9324b9e0e7b7
children
line wrap: on
line source

# Find cppunit, this modules defines:
# CPPUNIT_INCLUDE_DIR, where to find cppunit/TestCase.h
# CPPUNIT_LIBRARY, where to find library
# CPPUNIT_FOUND, if it is found

# find cppunit/TestCase.h
find_path(
	CPPUNIT_INCLUDE_DIR cppunit/TestCase.h
	PATHS
	/usr/include
	/usr/local/include
)

# find libcppunit.so
find_library(
	CPPUNIT_LIBRARY NAMES libcppunit cppunit
	PATHS_SUFFIXES lib lib64
	PATHS
	/usr/
	/usr/local/
)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(
	Cppunit
	REQUIRED_VARS CPPUNIT_INCLUDE_DIR CPPUNIT_LIBRARY
)

mark_as_advanced(CPPUNIT_INCLUDE_DIR CPPUNIT_LIBRARY)