You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
1.8 KiB
CMake
85 lines
1.8 KiB
CMake
15 years ago
|
#
|
||
|
# Find the CppTest includes and library
|
||
|
#
|
||
|
# This module defines
|
||
|
# CPPTEST_INCLUDE_DIR, where to find tiff.h, etc.
|
||
14 years ago
|
# CPPTEST_LIBRARIES, where to find the CppTest libraries.
|
||
15 years ago
|
# CPPTEST_FOUND, If false, do not try to use CppTest.
|
||
|
|
||
|
# also defined, but not for general use are
|
||
14 years ago
|
IF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
|
||
15 years ago
|
# in cache already
|
||
|
SET(CPPTEST_FIND_QUIETLY TRUE)
|
||
8 years ago
|
ENDIF()
|
||
15 years ago
|
|
||
|
FIND_PATH(CPPTEST_INCLUDE_DIR
|
||
|
cpptest.h
|
||
|
PATHS
|
||
|
/usr/local/include
|
||
|
/usr/include
|
||
|
/sw/include
|
||
|
/opt/local/include
|
||
|
/opt/csw/include
|
||
|
/opt/include
|
||
13 years ago
|
PATH_SUFFIXES cppunit cpptest
|
||
15 years ago
|
)
|
||
|
|
||
14 years ago
|
SET(LIBRARY_NAME_RELEASE cpptest)
|
||
|
SET(LIBRARY_NAME_DEBUG cpptestd)
|
||
|
|
||
|
IF(WITH_STLPORT)
|
||
|
SET(LIBRARY_NAME_RELEASE cpptest_stlport ${LIBRARY_NAME_RELEASE})
|
||
|
SET(LIBRARY_NAME_DEBUG cpptest_stlportd ${LIBRARY_NAME_DEBUG})
|
||
8 years ago
|
ENDIF()
|
||
14 years ago
|
|
||
14 years ago
|
FIND_LIBRARY(CPPTEST_LIBRARY_RELEASE
|
||
14 years ago
|
${LIBRARY_NAME_RELEASE}
|
||
15 years ago
|
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
|
||
|
)
|
||
|
|
||
14 years ago
|
FIND_LIBRARY(CPPTEST_LIBRARY_DEBUG
|
||
14 years ago
|
${LIBRARY_NAME_DEBUG}
|
||
14 years ago
|
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)
|
||
14 years ago
|
SET(CPPTEST_FOUND TRUE)
|
||
14 years ago
|
|
||
|
SET(CPPTEST_LIBRARIES "optimized;${CPPTEST_LIBRARY_RELEASE}")
|
||
|
IF(CPPTEST_LIBRARY_DEBUG)
|
||
|
SET(CPPTEST_LIBRARIES "${CPPTEST_LIBRARIES};debug;${CPPTEST_LIBRARY_DEBUG}")
|
||
8 years ago
|
ENDIF()
|
||
|
ENDIF()
|
||
|
ENDIF()
|
||
14 years ago
|
|
||
|
IF(CPPTEST_FOUND)
|
||
15 years ago
|
IF(NOT CPPTEST_FIND_QUIETLY)
|
||
14 years ago
|
MESSAGE(STATUS "Found CppTest: ${CPPTEST_LIBRARIES}")
|
||
8 years ago
|
ENDIF()
|
||
|
ELSE()
|
||
15 years ago
|
IF(NOT CPPTEST_FIND_QUIETLY)
|
||
|
MESSAGE(STATUS "Warning: Unable to find CppTest!")
|
||
8 years ago
|
ENDIF()
|
||
|
ENDIF()
|
||
15 years ago
|
|
||
14 years ago
|
MARK_AS_ADVANCED(CPPTEST_LIBRARY_RELEASE CPPTEST_LIBRARY_DEBUG)
|