Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/FindPolkitQt-1.cmake
- This file was added.
1 | /************************************************************************* | ||||
---|---|---|---|---|---|
2 | * Copyright (c) 2010 Dario Freddi <drf@kde.org> * | ||||
3 | * * | ||||
4 | * This program is free software; you can redistribute it and/or * | ||||
5 | * modify it under the terms of the GNU General Public License as * | ||||
6 | * published by the Free Software Foundation; either version 3 of * | ||||
7 | * the License, or (at your option) any later version. * | ||||
8 | * * | ||||
9 | * This program is distributed in the hope that it will be useful, * | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||||
12 | * GNU General Public License for more details. * | ||||
13 | * * | ||||
14 | * You should have received a copy of the GNU General Public License * | ||||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>.* | ||||
16 | *************************************************************************/ | ||||
17 | | ||||
18 | # Support POLKITQT-1_MIN_VERSION for compatibility: | ||||
19 | | ||||
20 | if ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION ) | ||||
21 | set ( PolkitQt-1_FIND_VERSION ${POLKITQT-1_MIN_VERSION} ) | ||||
22 | endif ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION ) | ||||
23 | | ||||
24 | set( _PolkitQt-1_FIND_QUIETLY ${PolkitQt-1_FIND_QUIETLY} ) | ||||
25 | find_package( PolkitQt-1 ${PolkitQt-1_FIND_VERSION} QUIET NO_MODULE PATHS ${LIB_INSTALL_DIR}/PolkitQt-1/cmake ) | ||||
26 | set( PolkitQt-1_FIND_QUIETLY ${_PolkitQt-1_FIND_QUIETLY} ) | ||||
27 | | ||||
28 | include( FindPackageHandleStandardArgs ) | ||||
29 | find_package_handle_standard_args( PolkitQt-1 DEFAULT_MSG PolkitQt-1_CONFIG ) | ||||
30 | | ||||
31 | if (POLKITQT-1_FOUND) | ||||
32 | if (NOT POLKITQT-1_INSTALL_DIR STREQUAL CMAKE_INSTALL_PREFIX) | ||||
33 | message("WARNING: Installation prefix does not match PolicyKit install prefixes. You probably will need to move files installed " | ||||
34 | "in POLICY_FILES_INSTALL_DIR and by dbus_add_activation_system_service to the ${POLKITQT-1_INSTALL_DIR} prefix") | ||||
35 | endif (NOT POLKITQT-1_INSTALL_DIR STREQUAL CMAKE_INSTALL_PREFIX) | ||||
36 | endif (POLKITQT-1_FOUND) |