In data domenica 06 settembre 2009 15:57:59, Alexander Neundorf ha scritto:
> Sure ? I don't see it.

You are right. We replaced that macro with stubs some time ago and I 
completely forgot about it. Whatever, here comes FindPolkitQt.cmake without 
the macro, but featuring fixes (and license change). If this one's good for 
commit, I will commit files&fixes for kdelibs, then I'll do the same for 
kdebase. Could you please tell me the correct procedure to bump up the kde 
version? we definitely need to, after these changes

> 
> > At the moment nothing else in KDE requires
> > such a thing, and I do not know if anything apart from KAuth will ever
> > need it.
> >
> > > If it stays in FindPolKitQt.cmake, give it the prefix "POLKITQT_".
> >
> > Ok, please tell me if I should keep it there given what I've written
> > before
> >
> > > And since it installs something, an "INSTALL" in the name would be good
> > > ;-)
> >
> > Ok, I just copied the macro name :D
> > dbus_install_activation_system_service?
> 
> Sounds good.
> 
> Alex
> 

-- 
-------------------

Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B
# - Try to find Polkit-qt
# Once done this will define
#
#  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_DEFINITIONS - Compiler switches required for using Polkit-qt

# Copyright (c) 2009, Daniel Nicoletti, <[email protected]>
# Copyright (c) 2009, Dario Freddi, <[email protected]>
# Copyright (c) 2009, Michal Malek, <[email protected]>
#
# 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)

if (NOT POLKITQT_MIN_VERSION)
  set(POLKITQT_MIN_VERSION "0.9.0")
endif (NOT POLKITQT_MIN_VERSION)

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
     NAMES polkit-qt/auth.h
     PATH_SUFFIXES PolicyKit
)
find_library( POLKITQT_CORE_LIBRARY 
    NAMES polkit-qt-core 
    HINTS ${PC_POLKITQT_LIBDIR}
)
find_library( POLKITQT_GUI_LIBRARY 
    NAMES polkit-qt-gui 
    HINTS ${PC_POLKITQT_LIBDIR}
)
find_library( POLKITQT_LIBRARIES
    NAMES polkit-qt-gui polkit-qt-core 
    HINTS ${PC_POLKITQT_LIBDIR}
)

include(FindPackageHandleStandardArgs)

# handle the QUIETLY and REQUIRED arguments and set POLKIQT_FOUND to TRUE if 
# all listed variables are TRUE
find_package_handle_standard_args(PolkitQt DEFAULT_MSG POLKITQT_LIBRARIES POLKITQT_INCLUDE_DIR)

mark_as_advanced(POLKITQT_INCLUDE_DIR POLKITQT_CORE_LIBRARY POLKITQT_GUI_LIBRARY POLKITQT_LIBRARIES)

if (POLKITQT_FOUND)
    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)

set(POLKITQT_POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/PolicyKit/policy/)

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to