properly compute width of containing block of inline elements
[kdelibs.git] / cmake / modules / MacroOptionalDependPackage.cmake
blob1a6df36a7ad22f59398fd0be0f63ae29fe1db41f
1 # Search if cmake module is installed in computer
2 # cmake will not fail but signal that we must install depend package before.
3 # add as previously name of cmake module "_name" and define package needed "_module_needed"
4 # if return DEPEND_PACKAGE_${_name}
6 # Copyright (c) 2007, Montel Laurent <montel@kde.org>
8 # Redistribution and use is allowed according to the terms of the BSD license.
9 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
12 MACRO (MACRO_OPTIONAL_DEPEND_PACKAGE _name _module_needed)
13    set(_packagename Find${_name}.cmake)
14    find_file(_PACKAGE_DEPEND_FOUND ${_packagename} PATHS ${CMAKE_MODULE_PATH} )
15    if(NOT _PACKAGE_DEPEND_FOUND)
16         MESSAGE(STATUS "cmake package ${_packagename} was not found. This package needs ${_module_needed} to be compile all program")
17         set(DEPEND_PACKAGE_${_name} FALSE)
18    else(NOT _PACKAGE_DEPEND_FOUND)
19         set(DEPEND_PACKAGE_${_name} TRUE)          
20    endif(NOT _PACKAGE_DEPEND_FOUND)
21 ENDMACRO (MACRO_OPTIONAL_DEPEND_PACKAGE)