Pay attention to hint directories for Check.

Allow specifying a base hint directory, and look there and in include/libs underneath it.
This commit is contained in:
Jim Hague 2019-10-24 17:30:41 +01:00
parent e8eafdfa44
commit 072bdd9a6b
1 changed files with 6 additions and 6 deletions

View File

@ -33,23 +33,23 @@ This module will set the following variables in your project:
find_path(CHECK_INCLUDE_DIR check.h find_path(CHECK_INCLUDE_DIR check.h
HINTS HINTS
${PC_CHECK_INCLUDEDIR} "${CHECK_DIR}"
${PC_CHECK_INCLUDE_DIRS} "${CHECK_DIR}/include"
) )
# Check for PIC and non-PIC libraries. If PIC present, use that # Check for PIC and non-PIC libraries. If PIC present, use that
# in preference (as per Debian check.pc). # in preference (as per Debian check.pc).
find_library(CHECK_LIBRARY NAMES check_pic libcheck_pic find_library(CHECK_LIBRARY NAMES check_pic libcheck_pic
HINTS HINTS
${PC_CHECK_LIBDIR} "${CHECK_DIR}"
${PC_CHECK_LIBRARY_DIRS} "${CHECK_DIR}/lib"
) )
if (NOT CHECK_LIBRARY) if (NOT CHECK_LIBRARY)
find_library(CHECK_LIBRARY NAMES check libcheck find_library(CHECK_LIBRARY NAMES check libcheck
HINTS HINTS
${PC_CHECK_LIBDIR} "${CHECK_DIR}"
${PC_CHECK_LIBRARY_DIRS} "${CHECK_DIR}/lib"
) )
endif () endif ()