2010-05-06 00:08:41 +00:00
|
|
|
#
|
|
|
|
# Find the CppTest includes and library
|
|
|
|
#
|
|
|
|
# This module defines
|
|
|
|
# CPPTEST_INCLUDE_DIR, where to find tiff.h, etc.
|
2010-09-11 22:40:26 +00:00
|
|
|
# CPPTEST_LIBRARIES, where to find the CppTest libraries.
|
2010-05-06 00:08:41 +00:00
|
|
|
# CPPTEST_FOUND, If false, do not try to use CppTest.
|
|
|
|
|
|
|
|
# also defined, but not for general use are
|
2010-09-11 22:40:26 +00:00
|
|
|
IF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
|
2010-05-06 00:08:41 +00:00
|
|
|
# in cache already
|
|
|
|
SET(CPPTEST_FIND_QUIETLY TRUE)
|
2010-09-11 22:40:26 +00:00
|
|
|
ENDIF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
|
2010-05-06 00:08:41 +00:00
|
|
|
|
|
|
|
FIND_PATH(CPPTEST_INCLUDE_DIR
|
|
|
|
cpptest.h
|
|
|
|
PATHS
|
|
|
|
/usr/local/include
|
|
|
|
/usr/include
|
|
|
|
/sw/include
|
|
|
|
/opt/local/include
|
|
|
|
/opt/csw/include
|
|
|
|
/opt/include
|
|
|
|
PATH_SUFFIXES cppunit
|
|
|
|
)
|
|
|
|
|
2010-09-11 22:40:26 +00:00
|
|
|
FIND_LIBRARY(CPPTEST_LIBRARY_RELEASE
|
2010-05-06 00:08:41 +00:00
|
|
|
cpptest
|
|
|
|
PATHS
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/lib
|
|
|
|
/usr/local/X11R6/lib
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/sw/lib
|
|
|
|
/opt/local/lib
|
|
|
|
/opt/csw/lib
|
|
|
|
/opt/lib
|
|
|
|
/usr/freeware/lib64
|
|
|
|
)
|
|
|
|
|
2010-09-11 22:40:26 +00:00
|
|
|
FIND_LIBRARY(CPPTEST_LIBRARY_DEBUG
|
|
|
|
cpptestd
|
|
|
|
PATHS
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/lib
|
|
|
|
/usr/local/X11R6/lib
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/sw/lib
|
|
|
|
/opt/local/lib
|
|
|
|
/opt/csw/lib
|
|
|
|
/opt/lib
|
|
|
|
/usr/freeware/lib64
|
|
|
|
)
|
|
|
|
|
|
|
|
IF(CPPTEST_INCLUDE_DIR)
|
|
|
|
IF(CPPTEST_LIBRARY_RELEASE)
|
|
|
|
SET(CPPTEST_FOUND "YES")
|
|
|
|
|
|
|
|
SET(CPPTEST_LIBRARIES "optimized;${CPPTEST_LIBRARY_RELEASE}")
|
|
|
|
IF(CPPTEST_LIBRARY_DEBUG)
|
|
|
|
SET(CPPTEST_LIBRARIES "${CPPTEST_LIBRARIES};debug;${CPPTEST_LIBRARY_DEBUG}")
|
|
|
|
ENDIF(CPPTEST_LIBRARY_DEBUG)
|
|
|
|
ENDIF(CPPTEST_LIBRARY_RELEASE)
|
|
|
|
ENDIF(CPPTEST_INCLUDE_DIR)
|
|
|
|
|
|
|
|
IF(CPPTEST_FOUND)
|
2010-05-06 00:08:41 +00:00
|
|
|
IF(NOT CPPTEST_FIND_QUIETLY)
|
2010-09-11 22:40:26 +00:00
|
|
|
MESSAGE(STATUS "Found CppTest: ${CPPTEST_LIBRARIES}")
|
2010-05-06 00:08:41 +00:00
|
|
|
ENDIF(NOT CPPTEST_FIND_QUIETLY)
|
2010-09-11 22:40:26 +00:00
|
|
|
ELSE(CPPTEST_FOUND)
|
2010-05-06 00:08:41 +00:00
|
|
|
IF(NOT CPPTEST_FIND_QUIETLY)
|
|
|
|
MESSAGE(STATUS "Warning: Unable to find CppTest!")
|
|
|
|
ENDIF(NOT CPPTEST_FIND_QUIETLY)
|
2010-09-11 22:40:26 +00:00
|
|
|
ENDIF(CPPTEST_FOUND)
|
2010-05-06 00:08:41 +00:00
|
|
|
|
2010-09-11 22:40:26 +00:00
|
|
|
MARK_AS_ADVANCED(CPPTEST_LIBRARY_RELEASE CPPTEST_LIBRARY_DEBUG)
|