mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
cmake: new baseline kde4_bool_to_01() macro replacing macro_bool_to_01()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5d31c03dcb
commit
08345f1315
7 changed files with 28 additions and 37 deletions
|
@ -89,11 +89,11 @@ set_package_properties(CURL PROPERTIES
|
|||
|
||||
# optional features
|
||||
if(X11_FOUND)
|
||||
macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST)
|
||||
macro_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR)
|
||||
macro_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES)
|
||||
macro_bool_to_01(X11_Xscreensaver_FOUND HAVE_XSCREENSAVER)
|
||||
macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC)
|
||||
kde4_bool_to_01(X11_XTest_FOUND HAVE_XTEST)
|
||||
kde4_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR)
|
||||
kde4_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES)
|
||||
kde4_bool_to_01(X11_Xscreensaver_FOUND HAVE_XSCREENSAVER)
|
||||
kde4_bool_to_01(X11_XSync_FOUND HAVE_XSYNC)
|
||||
|
||||
add_feature_info("X Test Extension (libXTest)" HAVE_XTEST "Support for notfication restriction")
|
||||
add_feature_info("X Cursor Extension (Xcursor)" HAVE_XCURSOR "Support for loading cursors depending on theme")
|
||||
|
|
|
@ -15,8 +15,8 @@ include(CMakePushCheckState)
|
|||
# definitions like _GNU_SOURCE that are needed on each platform.
|
||||
set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
|
||||
|
||||
macro_bool_to_01(Libintl_FOUND HAVE_LIBINTL) # kdecore
|
||||
macro_bool_to_01(ACL_FOUND HAVE_POSIX_ACL) # kio
|
||||
kde4_bool_to_01(Libintl_FOUND HAVE_LIBINTL) # kdecore
|
||||
kde4_bool_to_01(ACL_FOUND HAVE_POSIX_ACL) # kio
|
||||
|
||||
check_include_files(fstab.h HAVE_FSTAB_H) # kio, kdecore
|
||||
check_include_files(mntent.h HAVE_MNTENT_H) # solid, kio, kdecore
|
||||
|
@ -27,11 +27,11 @@ check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H) # kio, kd
|
|||
check_include_files(paths.h HAVE_PATHS_H) # kdecore
|
||||
|
||||
# TODO: separate to config-x11.h
|
||||
macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # kdecore
|
||||
macro_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR) # kdeui
|
||||
macro_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # kdeui
|
||||
macro_bool_to_01(X11_Xscreensaver_FOUND HAVE_XSCREENSAVER) # kidletime
|
||||
macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kidletime
|
||||
kde4_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # kdecore
|
||||
kde4_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR) # kdeui
|
||||
kde4_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # kdeui
|
||||
kde4_bool_to_01(X11_Xscreensaver_FOUND HAVE_XSCREENSAVER) # kidletime
|
||||
kde4_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kidletime
|
||||
|
||||
|
||||
# Use check_symbol_exists to check for symbols in a reliable
|
||||
|
|
|
@ -69,7 +69,6 @@ set(cmakeFiles
|
|||
kde4_exec.sh.in
|
||||
KDE4Defaults.cmake
|
||||
KDE4Macros.cmake
|
||||
MacroBoolTo01.cmake
|
||||
MacroLibrary.cmake
|
||||
MacroOptionalAddSubdirectory.cmake
|
||||
MacroOptionalFindPackage.cmake
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# KDE4_ADD_TEST
|
||||
# KDE4_ADD_WIDGET
|
||||
# KDE4_INSTALL_AUTH_HELPER_FILES
|
||||
# KDE4_ADD_DBUS_SERVICE
|
||||
# KDE4_BOOL_TO_01
|
||||
|
||||
# Copyright (c) 2006-2009 Alexander Neundorf, <neundorf@kde.org>
|
||||
# Copyright (c) 2006, 2007, Laurent Montel, <montel@kde.org>
|
||||
|
@ -281,3 +283,14 @@ macro(KDE4_ADD_DBUS_SERVICE _sources)
|
|||
)
|
||||
endforeach()
|
||||
endmacro(KDE4_ADD_DBUS_SERVICE)
|
||||
|
||||
# KDE4_BOOL_TO_01(VAR RESULT)
|
||||
# This macro evaluates its first argument and sets the second argument
|
||||
# either to 0 or 1 depending on the value of the first one
|
||||
macro(KDE4_BOOL_TO_01 _var _result)
|
||||
if(${_var})
|
||||
set(${_result} 1)
|
||||
else()
|
||||
set(${_result} 0)
|
||||
endif()
|
||||
endmacro(KDE4_BOOL_TO_01)
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN )
|
||||
# This macro evaluates its first argument
|
||||
# and sets all the given vaiables either to 0 or 1
|
||||
# depending on the value of the first one
|
||||
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
MACRO(MACRO_BOOL_TO_01 FOUND_VAR )
|
||||
FOREACH (_current_VAR ${ARGN})
|
||||
IF(${FOUND_VAR})
|
||||
SET(${_current_VAR} 1)
|
||||
ELSE(${FOUND_VAR})
|
||||
SET(${_current_VAR} 0)
|
||||
ENDIF(${FOUND_VAR})
|
||||
ENDFOREACH(_current_VAR)
|
||||
ENDMACRO(MACRO_BOOL_TO_01)
|
|
@ -7,4 +7,3 @@
|
|||
|
||||
INCLUDE(MacroOptionalFindPackage)
|
||||
INCLUDE(MacroOptionalAddSubdirectory)
|
||||
INCLUDE(MacroBoolTo01)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
macro_bool_to_01(BZIP2_FOUND HAVE_BZIP2_SUPPORT)
|
||||
kde4_bool_to_01(BZIP2_FOUND HAVE_BZIP2_SUPPORT)
|
||||
if(BZIP2_FOUND AND BZIP2_NEED_PREFIX)
|
||||
set(NEED_BZ2_PREFIX 1)
|
||||
endif(BZIP2_FOUND AND BZIP2_NEED_PREFIX)
|
||||
endif()
|
||||
|
||||
macro_bool_to_01(LIBLZMA_FOUND HAVE_XZ_SUPPORT)
|
||||
kde4_bool_to_01(LIBLZMA_FOUND HAVE_XZ_SUPPORT)
|
||||
|
|
Loading…
Add table
Reference in a new issue