Propagate information about whether module was found quietly

This commit is contained in:
Roland Kaufmann
2013-03-05 13:58:19 +01:00
parent e50c564425
commit 11bf7bf34e

View File

@@ -26,6 +26,7 @@
# ${module}_LIBRARIES Directory of shared object files
# ${module}_DEFINITIONS Defines that must be set to compile
# ${module}_CONFIG_VARS List of defines that should be in config.h
# ${module}_QUIET Verbosity of last find of this module
# HAVE_${MODULE} Binary value to use in config.h
#
# Note: Arguments should be quoted, otherwise a list will spill into the
@@ -47,6 +48,13 @@ macro (append_found src dst)
endmacro (append_found src dst)
function (find_opm_package module deps header lib defs prog conf)
# variables to pass on to other packages
if (FIND_QUIETLY)
set (${module}_QUIET "QUIET")
else (FIND_QUIETLY)
set (${module}_QUIET "")
endif (FIND_QUIETLY)
# if someone else has included this test, don't do it again
if (${${module}_FOUND})
return ()
@@ -206,6 +214,7 @@ function (find_opm_package module deps header lib defs prog conf)
set (${module}_DEFINITIONS "${${module}_DEFINITIONS}" PARENT_SCOPE)
set (${module}_CONFIG_VARS "${${module}_CONFIG_VARS}" PARENT_SCOPE)
set (${module}_LINKER_FLAGS "${${module}_LINKER_FLAGS}" PARENT_SCOPE)
set (${module}_QUIET "${${module}_QUIET}" PARENT_SCOPE)
set (HAVE_${MODULE} "${HAVE_${MODULE}}" PARENT_SCOPE)
endfunction (find_opm_package module deps header lib defs prog conf)
@@ -216,6 +225,8 @@ function (debug_find_vars module)
message (STATUS "${module}_LIBRARIES = ${${module}_LIBRARIES}")
message (STATUS "${module}_DEFINITIONS = ${${module}_DEFINITIONS}")
message (STATUS "${module}_CONFIG_VARS = ${${module}_CONFIG_VARS}")
message (STATUS "${module}_LINKER_FLAGS = ${${module}_LINKER_FLAGS}")
message (STATUS "${module}_QUIET = ${${module}_QUIET}")
string (TOUPPER ${module} MODULE)
string (REPLACE "-" "_" MODULE ${MODULE})
message (STATUS "HAVE_${MODULE} = ${HAVE_${MODULE}}")