From fb0d05a8363b1f37c24f995b9565cb90c8625256 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 4 Feb 2006 12:15:29 +0000 Subject: -renamed optional_find_package() to macro_optional_find_package(), to make it clear it is a macro and not a builtin command -kjsembed compiles -CheckCXXSourceCompiles now support multiple include paths -compile fix in kjsembed/value_binding.cpp: prefer the local global.h, otherwise it might end up with the global.h from kio/kio/, depending on the order of include directories -use the new "-o" switch for dcopidl -add a (temporary) workaround for David's uic problem Alex svn path=/trunk/KDE/kdelibs/; revision=505580 The following changes were in SVN, but were removed from git: M pics/CMakeLists.txt --- modules/MacroOptionalFindPackage.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 modules/MacroOptionalFindPackage.cmake (limited to 'modules/MacroOptionalFindPackage.cmake') diff --git a/modules/MacroOptionalFindPackage.cmake b/modules/MacroOptionalFindPackage.cmake new file mode 100644 index 00000000..4ad64a41 --- /dev/null +++ b/modules/MacroOptionalFindPackage.cmake @@ -0,0 +1,16 @@ +# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION() +# MACRO_OPTIONAL_FIND_PACKAGE( [QUIT] ) +# This macro is a combination of OPTION() and FIND_PACKAGE(), it +# works like FIND_PACKAGE(), but additionally it automatically creates +# an option name WITH_, which can be disabled via the cmake GUI. +# or via -DWITH_=OFF +# The standard _FOUND variables can be used in the same way +# as when using the normal FIND_PACKAGE() + +MACRO(MACRO_OPTIONAL_FIND_PACKAGE _name ) + OPTION(WITH_${_name} "Search for ${_name} package" ON) + IF (WITH_${_name}) + FIND_PACKAGE(${_name} ${ARGN}) + ENDIF (WITH_${_name}) +ENDMACRO(MACRO_OPTIONAL_FIND_PACKAGE) + -- cgit v1.2.1