123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- INCLUDE( FindPkgConfig )
- PKG_SEARCH_MODULE( CHECK check )
- IF( NOT CHECK_FOUND )
- IF ( CHECK_INSTALL_DIR )
- MESSAGE ( STATUS "Using override CHECK_INSTALL_DIR to find check" )
- SET ( CHECK_INCLUDE_DIR "${CHECK_INSTALL_DIR}/include" )
- FIND_LIBRARY( CHECK_LIBRARY NAMES check PATHS "${CHECK_INSTALL_DIR}/lib" )
- IF (WIN32)
- FIND_LIBRARY( COMPAT_LIBRARY NAMES compat PATHS "${CHECK_INSTALL_DIR}/lib" )
- ENDIF (WIN32)
- ELSE ( CHECK_INSTALL_DIR )
- FIND_PATH( CHECK_INCLUDE_DIR check.h )
- FIND_LIBRARY( CHECK_LIBRARY NAMES check )
- IF (WIN32)
- FIND_LIBRARY( COMPAT_LIBRARY NAMES compat )
- ENDIF (WIN32)
- ENDIF ( CHECK_INSTALL_DIR )
- IF (WIN32)
- SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" "${COMPAT_LIBRARY}" )
- ELSE ( WIN32)
- SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" )
- ENDIF (WIN32)
- IF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
- SET( CHECK_FOUND 1 )
- IF ( NOT Check_FIND_QUIETLY )
- MESSAGE ( STATUS "Found CHECK: ${CHECK_LIBRARIES}" )
- ENDIF ( NOT Check_FIND_QUIETLY )
- ELSE ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
- IF ( Check_FIND_REQUIRED )
- MESSAGE( FATAL_ERROR "Could NOT find CHECK" )
- ELSE ( Check_FIND_REQUIRED )
- IF ( NOT Check_FIND_QUIETLY )
- MESSAGE( STATUS "Could NOT find CHECK" )
- ENDIF ( NOT Check_FIND_QUIETLY )
- ENDIF ( Check_FIND_REQUIRED )
- ENDIF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
- ENDIF( NOT CHECK_FOUND )
- MARK_AS_ADVANCED( CHECK_INCLUDE_DIR CHECK_LIBRARIES CHECK_LIBRARY)
- IF( WIN32 )
- MARK_AS_ADVANCED( COMPAT_LIBRARY)
- ENDIF()
|