build: Honor REQUIRE if set in find_package

FIND_PACKAGE_HANDLE_STANDARD_ARGS handles REQUIRE only correct if
called with the same package name as find_package was called with.

The returned xxxx_FOUND is still uppercase.
This commit is contained in:
Bernhard Miklautz 2012-01-23 13:46:42 +01:00
parent cc24a7ad6a
commit 81004b44c5
11 changed files with 12 additions and 11 deletions

View File

@ -37,7 +37,7 @@ find_library(CUNIT_LIBRARY NAMES cunit
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CUNIT DEFAULT_MSG CUNIT_LIBRARY CUNIT_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CUnit DEFAULT_MSG CUNIT_LIBRARY CUNIT_INCLUDE_DIR)
if(CUNIT_FOUND)
set( CUNIT_LIBRARIES ${CUNIT_LIBRARY} )

View File

@ -38,7 +38,7 @@ find_library(DIRECTFB_LIBRARY NAMES directfb
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DIRECTFB DEFAULT_MSG DIRECTFB_LIBRARY DIRECTFB_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectFB DEFAULT_MSG DIRECTFB_LIBRARY DIRECTFB_INCLUDE_DIR)
if(DIRECTFB_FOUND)
set( DIRECTFB_LIBRARIES ${DIRECTFB_LIBRARY} )

View File

@ -38,7 +38,7 @@ find_library(XKBFILE_LIBRARY NAMES xkbfile
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XKBFILE DEFAULT_MSG XKBFILE_LIBRARY XKBFILE_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XKBFile DEFAULT_MSG XKBFILE_LIBRARY XKBFILE_INCLUDE_DIR)
if(XKBFILE_FOUND)
set( XKBFILE_LIBRARIES ${XKBFILE_LIBRARY} )

View File

@ -38,7 +38,7 @@ find_library(XSHM_LIBRARY NAMES Xext
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XSHM DEFAULT_MSG XSHM_LIBRARY XSHM_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XShm DEFAULT_MSG XSHM_LIBRARY XSHM_INCLUDE_DIR)
if(XSHM_FOUND)
set( XSHM_LIBRARIES ${XSHM_LIBRARY} )

View File

@ -38,7 +38,7 @@ find_library(XTEST_LIBRARY NAMES Xtst
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XTEST DEFAULT_MSG XTEST_LIBRARY XTEST_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XTest DEFAULT_MSG XTEST_LIBRARY XTEST_INCLUDE_DIR)
if(XTEST_FOUND)
set( XTEST_LIBRARIES ${XTEST_LIBRARY} )

View File

@ -38,7 +38,7 @@ find_library(XCURSOR_LIBRARY NAMES Xcursor
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCURSOR DEFAULT_MSG XCURSOR_LIBRARY XCURSOR_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xcursor DEFAULT_MSG XCURSOR_LIBRARY XCURSOR_INCLUDE_DIR)
if(XCURSOR_FOUND)
set( XCURSOR_LIBRARIES ${XCURSOR_LIBRARY} )

View File

@ -38,11 +38,12 @@ find_library(XDAMAGE_LIBRARY NAMES Xdamage
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XDAMAGE DEFAULT_MSG XDAMAGE_LIBRARY XDAMAGE_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xdamage DEFAULT_MSG XDAMAGE_LIBRARY XDAMAGE_INCLUDE_DIR)
if(XDAMAGE_FOUND)
set( XDAMAGE_LIBRARIES ${XDAMAGE_LIBRARY} )
set( XDAMAGE_INCLUDE_DIRS ${XDAMAGE_INCLUDE_DIR} )
endif()
mark_as_advanced(XDAMAGE_INCLUDE_DIR XDAMAGE_LIBRARY)

View File

@ -38,7 +38,7 @@ find_library(XEXT_LIBRARY NAMES Xext
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XEXT DEFAULT_MSG XEXT_LIBRARY XEXT_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xext DEFAULT_MSG XEXT_LIBRARY XEXT_INCLUDE_DIR)
if(XEXT_FOUND)
set( XEXT_LIBRARIES ${XEXT_LIBRARY} )

View File

@ -38,7 +38,7 @@ find_library(XFIXES_LIBRARY NAMES Xfixes
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XFIXES DEFAULT_MSG XFIXES_LIBRARY XFIXES_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xfixes DEFAULT_MSG XFIXES_LIBRARY XFIXES_INCLUDE_DIR)
if(XFIXES_FOUND)
set( XFIXES_LIBRARIES ${XFIXES_LIBRARY} )

View File

@ -38,7 +38,7 @@ find_library(XINERAMA_LIBRARY NAMES Xinerama
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XINERAMA DEFAULT_MSG XINERAMA_LIBRARY XINERAMA_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xinerama DEFAULT_MSG XINERAMA_LIBRARY XINERAMA_INCLUDE_DIR)
if(XINERAMA_FOUND)
set( XINERAMA_LIBRARIES ${XINERAMA_LIBRARY} )

View File

@ -38,7 +38,7 @@ find_library(XV_LIBRARY NAMES Xv
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XV DEFAULT_MSG XV_LIBRARY XV_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xv DEFAULT_MSG XV_LIBRARY XV_INCLUDE_DIR)
if(XV_FOUND)
set( XV_LIBRARIES ${XV_LIBRARY} )