diff options
| -rw-r--r-- | modules/FindKDE4Internal.cmake | 38 | ||||
| -rw-r--r-- | modules/FindPolkitQt.cmake | 100 | ||||
| -rw-r--r-- | modules/KDE4Macros.cmake | 57 | ||||
| -rw-r--r-- | modules/MacroKAuth.cmake | 62 | 
4 files changed, 123 insertions, 134 deletions
| diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 74439e3b..12441cb9 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -210,6 +210,24 @@  #   INSTALL_DESTINATION <installdest>, or to <installdest>/<subdir> if  #   SUBDIR <subdir> is specified.  # +#  KDE4_INSTALL_AUTH_ACTIONS( HELPER_ID ACTIONS_FILE ) +#   This macro generates an action file, depending on the backend used, for applications using KAuth. +#   It accepts the helper id (the DBUS name) and a file containing the actions (check kdelibs/kdecore/auth/example +#   for file format). The macro will take care of generating the file according to the backend specified,  +#   and to install it in the right location. This (at the moment) means that on Linux (PolicyKit) a .policy +#   file will be generated and installed into the policykit action directory (usually /usr/share/PolicyKit/policy/), +#   and on Mac (Authorization Services) will be added to the system action registry using the native MacOS API during +#   the install phase +# +#  KDE4_INSTALL_AUTH_HELPER_FILES( HELPER_TARGET HELPER_ID HELPER_USER ) +#   This macro adds the needed files for an helper executable meant to be used by applications using KAuth. +#   It accepts the helper target, the helper ID (the DBUS name) and the user under which the helper will run on. +#   This macro takes care of generate the needed files, and install them in the right location. This boils down +#   to a DBus policy to let the helper register on the system bus, and a service file for letting the helper +#   being automatically activated by the system bus. +#   *WARNING* You have to install the helper in ${LIBEXEC_INSTALL_DIR} to make sure everything will work. +# +#  #  #  A note on the possible values for CMAKE_BUILD_TYPE and how KDE handles  #  the flags for those buildtypes. FindKDE4Internal supports the values @@ -392,24 +410,26 @@ if (_kdeBootStrapping)     set(EXECUTABLE_OUTPUT_PATH ${kdelibs_BINARY_DIR}/bin )     if (WIN32) -      set(LIBRARY_OUTPUT_PATH            ${EXECUTABLE_OUTPUT_PATH} ) +      set(LIBRARY_OUTPUT_PATH               ${EXECUTABLE_OUTPUT_PATH} )        # CMAKE_CFG_INTDIR is the output subdirectory created e.g. by XCode and MSVC -      set(KDE4_KCFGC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler ) +      set(KDE4_KCFGC_EXECUTABLE             ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler ) -      set(KDE4_MEINPROC_EXECUTABLE       ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4 ) -      set(KDE4_MAKEKDEWIDGETS_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets ) +      set(KDE4_MEINPROC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4 ) +      set(KDE4_KAUTH_POLICY_GEN_EXECUTABLE  ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kauth-policy-gen ) +      set(KDE4_MAKEKDEWIDGETS_EXECUTABLE    ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets )     else (WIN32) -      set(LIBRARY_OUTPUT_PATH            ${CMAKE_BINARY_DIR}/lib ) -      set(KDE4_KCFGC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler${CMAKE_EXECUTABLE_SUFFIX}.shell ) - -      set(KDE4_MEINPROC_EXECUTABLE       ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4${CMAKE_EXECUTABLE_SUFFIX}.shell ) -      set(KDE4_MAKEKDEWIDGETS_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets${CMAKE_EXECUTABLE_SUFFIX}.shell ) +      set(LIBRARY_OUTPUT_PATH               ${CMAKE_BINARY_DIR}/lib ) +      set(KDE4_KCFGC_EXECUTABLE             ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler${CMAKE_EXECUTABLE_SUFFIX}.shell ) +      set(KDE4_KAUTH_POLICY_GEN_EXECUTABLE  ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kauth-policy-gen${CMAKE_EXECUTABLE_SUFFIX}.shell ) +      set(KDE4_MEINPROC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4${CMAKE_EXECUTABLE_SUFFIX}.shell ) +      set(KDE4_MAKEKDEWIDGETS_EXECUTABLE    ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets${CMAKE_EXECUTABLE_SUFFIX}.shell )     endif (WIN32)     set(KDE4_LIB_DIR ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})     # when building kdelibs, make the kcfg rules depend on the binaries...     set( _KDE4_KCONFIG_COMPILER_DEP kconfig_compiler) +   set( _KDE4_KAUTH_POLICY_GEN_EXECUTABLE_DEP kauth-policy-gen)     set( _KDE4_MAKEKDEWIDGETS_DEP makekdewidgets)     set( _KDE4_MEINPROC_EXECUTABLE_DEP meinproc4) diff --git a/modules/FindPolkitQt.cmake b/modules/FindPolkitQt.cmake index b445b2e8..500b69d3 100644 --- a/modules/FindPolkitQt.cmake +++ b/modules/FindPolkitQt.cmake @@ -4,98 +4,70 @@  #  POLKITQT_FOUND - system has Polkit-qt  #  POLKITQT_INCLUDE_DIR - the Polkit-qt include directory  #  POLKITQT_LIBRARIES - Link these to use all Polkit-qt libs -#  POLKITQT_CORE_LIBRARY -#  POLKITQT_GUI_LIBRARY +#  POLKITQT_CORE_LIBRARY - Link this to use the polkit-qt-core library only +#  POLKITQT_GUI_LIBRARY - Link this to use GUI elements in polkit-qt (polkit-qt-gui)  #  POLKITQT_DEFINITIONS - Compiler switches required for using Polkit-qt -# Copyright (c) 2008, Adrien Bustany, <madcat@mymadcat.com>  # Copyright (c) 2009, Daniel Nicoletti, <dantti85-pk@yahoo.com.br>  # Copyright (c) 2009, Dario Freddi, <drf54321@gmail.com>  # Copyright (c) 2009, Michal Malek, <michalm@jabster.pl>  # -# Redistribution and use is allowed according to the terms of the GPLv2+ license. +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file.  if (POLKITQT_INCLUDE_DIR AND POLKITQT_LIB)      set(POLKITQT_FIND_QUIETLY TRUE)  endif (POLKITQT_INCLUDE_DIR AND POLKITQT_LIB) -include(FindPkgConfig) -  if (NOT POLKITQT_MIN_VERSION)    set(POLKITQT_MIN_VERSION "0.9.0")  endif (NOT POLKITQT_MIN_VERSION) -pkg_search_module( POLKITQT polkit-qt ) - -if (POLKITQT_FOUND) -    if (POLKITQT_VERSION VERSION_LESS POLKITQT_MIN_VERSION) -        message(STATUS "Found Polkit-Qt release < ${POLKITQT_MIN_VERSION}") -        message(STATUS "You need Polkit-Qt version ${POLKITQT_MIN_VERSION} or newer to compile this component") -        set(POLKITQT_FOUND FALSE) -        return() -    else (POLKITQT_VERSION VERSION_LESS POLKITQT_MIN_VERSION) -        message(STATUS "Found Polkit-Qt release >= ${POLKITQT_MIN_VERSION}") -        if ( NOT POLKITQT_PREFIX STREQUAL CMAKE_INSTALL_PREFIX ) -            message("WARNING: Installation prefix does not match PolicyKit install prefixes. You probably will need to move files installed " -                    "in POLICY_FILES_INSTALL_DIR and by dbus_add_activation_system_service to the ${POLKITQT_PREFIX} prefix") -        endif (NOT POLKITQT_PREFIX STREQUAL CMAKE_INSTALL_PREFIX) -    endif (POLKITQT_VERSION VERSION_LESS POLKITQT_MIN_VERSION) -else (POLKITQT_FOUND) -    set(POLKITQT_FOUND FALSE) -    message(STATUS "Cannot find Polkit-Qt library!") -    return() -endif (POLKITQT_FOUND) - +if (NOT WIN32) +   # use pkg-config to get the directories and then use these values +   # in the FIND_PATH() and FIND_LIBRARY() calls +   find_package(PkgConfig) +   pkg_check_modules(PC_POLKITQT QUIET polkit-qt) +   set(POLKITQT_DEFINITIONS ${PC_POLKITQT_CFLAGS_OTHER}) +endif (NOT WIN32) -# find_path( POLKITQT_INCLUDE_DIR PolicyKit/policykit-qt/Polkit-qt )  find_path( POLKITQT_INCLUDE_DIR -    NAMES PolicyKit/polkit-qt/ -    HINTS ${POLKITQT_INCLUDEDIR} +     NAMES polkit-qt/auth.h +     PATH_SUFFIXES PolicyKit  ) -  find_library( POLKITQT_CORE_LIBRARY       NAMES polkit-qt-core  -    HINTS ${POLKITQT_LIBDIR} +    HINTS ${PC_POLKITQT_LIBDIR}  )  find_library( POLKITQT_GUI_LIBRARY       NAMES polkit-qt-gui  -    HINTS ${POLKITQT_LIBDIR} +    HINTS ${PC_POLKITQT_LIBDIR} +) +find_library( POLKITQT_LIBRARIES +    NAMES polkit-qt-gui polkit-qt-core  +    HINTS ${PC_POLKITQT_LIBDIR}  ) -if (POLKITQT_INCLUDE_DIR AND POLKITQT_CORE_LIBRARY AND POLKITQT_GUI_LIBRARY) -   set(POLKITQT_FOUND TRUE) -else (POLKITQT_INCLUDE_DIR AND POLKITQT_CORE_LIBRARY AND POLKITQT_GUI_LIBRARY) -   set(POLKITQT_FOUND FALSE) -endif (POLKITQT_INCLUDE_DIR AND POLKITQT_CORE_LIBRARY AND POLKITQT_GUI_LIBRARY) - -set(POLKITQT_LIBRARIES ${POLKITQT_CORE_LIBRARY} ${POLKITQT_GUI_LIBRARY}) +include(FindPackageHandleStandardArgs) -set(POLKITQT_INCLUDE_DIR ${POLKITQT_INCLUDE_DIR}/PolicyKit/polkit-qt ${POLKITQT_INCLUDE_DIR}/PolicyKit/) +# handle the QUIETLY and REQUIRED arguments and set POLKITQT_FOUND to TRUE if  +# all listed variables are TRUE +find_package_handle_standard_args(PolkitQt DEFAULT_MSG POLKITQT_LIBRARIES POLKITQT_INCLUDE_DIR) -#if (POLKITQT_PREFIX != ${CMAKE_INSTALL_PREFIX}) -#message("Warning: Move polkit files to /usr prefix") -#endif() -set(POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/PolicyKit/policy/) +mark_as_advanced(POLKITQT_INCLUDE_DIR POLKITQT_CORE_LIBRARY POLKITQT_GUI_LIBRARY POLKITQT_LIBRARIES)  if (POLKITQT_FOUND) -  if (NOT POLKITQT_FIND_QUIETLY) -    message(STATUS "Found Polkit-Qt: ${POLKITQT_LIBRARIES}") -  endif (NOT POLKITQT_FIND_QUIETLY) -else (POLKITQT_FOUND) -  if (POLKITQT_FIND_REQUIRED) -    message(FATAL_ERROR "Could NOT find Polkit-Qt") -  endif (POLKITQT_FIND_REQUIRED) +    if (PC_POLKITQT_VERSION VERSION_LESS POLKITQT_MIN_VERSION) +        message(STATUS "Found Polkit-Qt release < ${POLKITQT_MIN_VERSION}") +        message(STATUS "You need Polkit-Qt version ${POLKITQT_MIN_VERSION} or newer to compile this component") +        set(POLKITQT_FOUND FALSE) +        return() +    else (PC_POLKITQT_VERSION VERSION_LESS POLKITQT_MIN_VERSION) +        if ( NOT PC_POLKITQT_PREFIX STREQUAL CMAKE_INSTALL_PREFIX ) +            message("WARNING: Installation prefix does not match PolicyKit install prefixes. You probably will need to move files installed " +                    "in POLICY_FILES_INSTALL_DIR and by dbus_add_activation_system_service to the ${PC_POLKITQT_PREFIX} prefix") +        endif (NOT PC_POLKITQT_PREFIX STREQUAL CMAKE_INSTALL_PREFIX) +    endif (PC_POLKITQT_VERSION VERSION_LESS POLKITQT_MIN_VERSION)  endif (POLKITQT_FOUND) -mark_as_advanced(POLKITQT_INCLUDE_DIR POLKITQT_LIB) - -macro(dbus_add_activation_system_service _sources) -    pkg_search_module( DBUS dbus-1 ) -    foreach (_i ${_sources}) -        get_filename_component(_service_file ${_i} ABSOLUTE) -        string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i}) -        set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_output_file}) -        configure_file(${_service_file} ${_target}) -        install(FILES ${_target} DESTINATION ${DBUS_PREFIX}/share/dbus-1/system-services ) -    endforeach (_i ${ARGN}) -endmacro(dbus_add_activation_system_service _sources) +set(POLKITQT_POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/PolicyKit/policy/) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 13efea0d..b9feb310 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -22,6 +22,8 @@  # KDE4_ADD_APP_ICON  # KDE4_CREATE_MANPAGE  # KDE4_CREATE_BASIC_CMAKE_VERSION_FILE (function) +# KDE4_INSTALL_AUTH_HELPER_FILES +# KDE4_AUTH_INSTALL_ACTIONS  # Copyright (c) 2006-2009 Alexander Neundorf, <neundorf@kde.org>  # Copyright (c) 2006, 2007, Laurent Montel, <montel@kde.org> @@ -1207,6 +1209,61 @@ macro (KDE4_HANDLE_RPATH_FOR_LIBRARY _target_NAME)     endif (NOT CMAKE_SKIP_RPATH)  endmacro (KDE4_HANDLE_RPATH_FOR_LIBRARY) +# This macro adds the needed files for an helper executable meant to be used by applications using KAuth. +# It accepts the helper target, the helper ID (the DBUS name) and the user under which the helper will run on. +# This macro takes care of generate the needed files, and install them in the right location. This boils down +# to a DBus policy to let the helper register on the system bus, and a service file for letting the helper +# being automatically activated by the system bus. +# *WARNING* You have to install the helper in ${LIBEXEC_INSTALL_DIR} to make sure everything will work. +function(KDE4_INSTALL_AUTH_HELPER_FILES HELPER_TARGET HELPER_ID HELPER_USER) +     +  if (_kdeBootStrapping) +    set(_stubFilesDir  ${CMAKE_SOURCE_DIR}/kdecore/auth/backends/dbus/ ) +  else (_kdeBootStrapping) +    set(_stubFilesDir  ${KDE4_DATA_INSTALL_DIR}/kauth/ ) +  endif (_kdeBootStrapping) + +  configure_file(${_stubFilesDir}/dbus_policy.stub +                 ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf) +  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf  +          DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/) +        +  configure_file(${_stubFilesDir}/dbus_service.stub +                 ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service) +  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service  +          DESTINATION ${DBUS_SYSTEM_SERVICES_INSTALL_DIR}) +endfunction(KDE4_INSTALL_AUTH_HELPER_FILES) + +# This macro generates an action file, depending on the backend used, for applications using KAuth. +# It accepts the helper id (the DBUS name) and a file containing the actions (check kdelibs/kdecore/auth/example +# for file format). The macro will take care of generating the file according to the backend specified,  +# and to install it in the right location. This (at the moment) means that on Linux (PolicyKit) a .policy +# file will be generated and installed into the policykit action directory (usually /usr/share/PolicyKit/policy/), +# and on Mac (Authorization Services) will be added to the system action registry using the native MacOS API during +# the install phase +function(KDE4_INSTALL_AUTH_ACTIONS HELPER_ID ACTIONS_FILE) + +  if(APPLE) +    install(CODE "execute_process(COMMAND ${KDE4_KAUTH_POLICY_GEN_EXECUTABLE} ${ACTIONS_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") +  elseif(UNIX) +    set(_output ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.policy) +    get_filename_component(_input ${ACTIONS_FILE} ABSOLUTE) +     +    add_custom_command(OUTPUT ${_output}  +                       COMMAND ${KDE4_KAUTH_POLICY_GEN_EXECUTABLE} ${_input} > ${_output}  +                       MAIN_DEPENDENCY ${_input} +                       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +                       COMMENT "Generating ${HELPER_ID}.policy" +                       DEPENDS ${_KDE4_KAUTH_POLICY_GEN_EXECUTABLE_DEP}) +    add_custom_target("actions for ${HELPER_ID}" ALL DEPENDS ${_output}) + +    if (POLKITQT_FOUND) +      install(FILES ${_output} DESTINATION ${POLKITQT_POLICY_FILES_INSTALL_DIR}) +    endif (POLKITQT_FOUND) +  endif() + +endfunction(KDE4_INSTALL_AUTH_ACTIONS) +  macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename)     message(FATAL_ERROR "_KDE4_EXPORT_LIBRARY_DEPENDENCIES() was an internal macro and has been removed again. Just remove the code which calls it, there is no substitute.") diff --git a/modules/MacroKAuth.cmake b/modules/MacroKAuth.cmake index f05bc8b4..2bde63ce 100644 --- a/modules/MacroKAuth.cmake +++ b/modules/MacroKAuth.cmake @@ -1,63 +1,3 @@ +message(FATAL_ERROR "Don't include(MacroKAuth) anymore, it's now included in find_package(KDE4). This file will be removed soon, and will not appear in KDE 4.4 release.") -execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data --locate kauth/dbus_service.stub OUTPUT_VARIABLE KDE4_KAUTH_DBUS_SERVICE_STUB ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) -message(STATUS "KAuth: DBus service stub file found at ${KDE4_KAUTH_DBUS_SERVICE_STUB}") -execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data --locate kauth/dbus_policy.stub OUTPUT_VARIABLE KDE4_KAUTH_DBUS_POLICY_STUB ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) -message(STATUS "KAuth: DBus policy stub file found at ${KDE4_KAUTH_DBUS_POLICY_STUB}") -execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path libexec --locate kauth-policy-gen OUTPUT_VARIABLE KDE4_KAUTH_POLICY_GEN ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) -set( KDE4_KAUTH_DBUS_POLICY_STUB ${DATA_INSTALL_DIR}/kauth/dbus_policy.stub) -set( KDE4_KAUTH_DBUS_SERVICE_STUB ${DATA_INSTALL_DIR}/kauth/dbus_service.stub) -set( KDE4_KAUTH_POLICY_GEN ${LIBEXEC_INSTALL_DIR}/kauth-policy-gen) - -if(NOT KDE4_KAUTH_DBUS_SERVICE_STUB) -	message(FATAL_ERROR "DBus service stub file couldn't be found (required by kde4_auth_add_helper macro)") -endif(NOT KDE4_KAUTH_DBUS_SERVICE_STUB) - -if(NOT KDE4_KAUTH_DBUS_POLICY_STUB) -	message(FATAL_ERROR "DBus policy stub file couldn't be found (required by kde4_auth_add_helper macro)") -endif(NOT KDE4_KAUTH_DBUS_POLICY_STUB) - -if(NOT KDE4_KAUTH_POLICY_GEN) -	message(FATAL_ERROR "KAuth policy generator tool couldn't be found (required by kde4_auth_register_actions macro)") -endif(NOT KDE4_KAUTH_POLICY_GEN) - -macro(kde4_auth_add_helper _HELPER_TARGET _HELPER_ID _HELPER_USER) -     -    set(HELPER_ID ${_HELPER_ID}) -    set(HELPER_TARGET ${_HELPER_TARGET}) -    set(HELPER_USER ${_HELPER_USER}) -     -    kde4_add_executable(${HELPER_TARGET} ${ARGN}) -    target_link_libraries(${HELPER_TARGET} ${KDE4_KDECORE_LIBS}) -    install(TARGETS ${HELPER_TARGET} DESTINATION ${LIBEXEC_INSTALL_DIR}) -     -    configure_file(${KDE4_KAUTH_DBUS_POLICY_STUB} ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf) -    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/) - -    configure_file(${KDE4_KAUTH_DBUS_SERVICE_STUB} ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service) -    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service DESTINATION ${DBUS_SYSTEM_SERVICES_INSTALL_DIR}) -     - -endmacro(kde4_auth_add_helper) - -macro(kde4_auth_register_actions HELPER_ID ACTIONS_FILE) - -if(APPLE) -    install(CODE "execute_process(COMMAND ${KDE4_KAUTH_POLICY_GEN} ${ACTIONS_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") -elseif(UNIX) -    set(_output ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.policy) -    get_filename_component(_input ${ACTIONS_FILE} ABSOLUTE) -     -    add_custom_command(OUTPUT ${_output}  -                       COMMAND ${KDE4_KAUTH_POLICY_GEN} ${_input} > ${_output}  -                       MAIN_DEPENDENCY ${_input} -                       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -                       COMMENT "Generating ${HELPER_ID}.policy") -    add_custom_target("actions for ${HELPER_ID}" ALL DEPENDS ${_output}) - -    if (POLKITQT_FOUND) -    install(FILES ${_output} DESTINATION ${POLICY_FILES_INSTALL_DIR}) -    endif (POLKITQT_FOUND) -endif() - -endmacro(kde4_auth_register_actions) | 
