Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>pull/1/head
parent
855818127b
commit
416bed9bc1
@ -1,26 +1,12 @@
|
|||||||
Polkit-tqt's build system uses cmake.
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
So to compile Polkit-tqt first create a build dir
|
Polkit-tqt relies on cmake to build.
|
||||||
|
|
||||||
mkdir build
|
Here are suggested default options:
|
||||||
cd build
|
|
||||||
|
|
||||||
then run cmake:
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
|
-DCMAKE_VERBOSE_MAKEFILE="ON" \
|
||||||
cmake ..
|
-DCMAKE_SKIP_RPATH="OFF" \
|
||||||
|
-DBUILD_ALL="ON" \
|
||||||
(a typical cmake option that is often used is: -DCMAKE_INSTALL_PREFIX=<prefix>)
|
-DWITH_ALL_OPTIONS="ON"
|
||||||
|
|
||||||
cmake then presents a configuration summary. At this point you may
|
|
||||||
want to install missing dependancies (if you do, remove the CMakeCache.txt)
|
|
||||||
and run cmake again.
|
|
||||||
|
|
||||||
Finally build Polkit-tqt:
|
|
||||||
|
|
||||||
make
|
|
||||||
|
|
||||||
And install it (in most cases root privileges are required):
|
|
||||||
|
|
||||||
make install
|
|
||||||
|
|
||||||
That's all :)
|
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
# PolkitTQt-1Config.cmake is generated by CMake from PolkitTQt-1Config.cmake.in.
|
|
||||||
# Any changed value in this file will be overwritten by CMake.
|
|
||||||
|
|
||||||
# set the PolkitTQt-1 version number
|
|
||||||
set(POLKITTQT-1_VERSION_MAJOR @POLKITTQT-1_VERSION_MAJOR@)
|
|
||||||
set(POLKITTQT-1_VERSION_MINOR @POLKITTQT-1_VERSION_MINOR@)
|
|
||||||
set(POLKITTQT-1_VERSION_PATCH @POLKITTQT-1_VERSION_PATCH@)
|
|
||||||
set(POLKITTQT-1_VERSION @POLKITTQT-1_VERSION_STRING@)
|
|
||||||
set(POLKITTQT-1_VERSION_STRING "@POLKITTQT-1_VERSION_STRING@")
|
|
||||||
|
|
||||||
# set the directories
|
|
||||||
if(NOT POLKITTQT-1_INSTALL_DIR)
|
|
||||||
set(POLKITTQT-1_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@")
|
|
||||||
endif(NOT POLKITTQT-1_INSTALL_DIR)
|
|
||||||
|
|
||||||
set(POLKITTQT-1_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@/polkit-tqt-1")
|
|
||||||
set(POLKITTQT-1_LIB_DIR "@LIB_INSTALL_DIR@")
|
|
||||||
set(POLKITTQT-1_POLICY_FILES_INSTALL_DIR "${POLKITTQT-1_INSTALL_DIR}/share/polkit-1/actions")
|
|
||||||
|
|
||||||
# Compatibility
|
|
||||||
if(WIN32)
|
|
||||||
if(MINGW)
|
|
||||||
set(POLKITTQT-1_CORE_LIBRARY "${POLKITTQT-1_LIB_DIR}/libpolkit-tqt-core-1.dll.a")
|
|
||||||
set(POLKITTQT-1_AGENT_LIBRARY "${POLKITTQT-1_LIB_DIR}/libpolkit-tqt-agent-1.dll.a")
|
|
||||||
set(POLKITTQT-1_GUI_LIBRARY "${POLKITTQT-1_LIB_DIR}/libpolkit-tqt-gui-1.dll.a")
|
|
||||||
else(MINGW)
|
|
||||||
set(POLKITTQT-1_CORE_LIBRARY "${POLKITTQT-1_LIB_DIR}/polkit-tqt-core-1.lib")
|
|
||||||
set(POLKITTQT-1_AGENT_LIBRARY "${POLKITTQT-1_LIB_DIR}/polkit-tqt-agent-1.lib")
|
|
||||||
set(POLKITTQT-1_GUI_LIBRARY "${POLKITTQT-1_LIB_DIR}/polkit-tqt-gui-1.lib")
|
|
||||||
endif(MINGW)
|
|
||||||
elseif(APPLE)
|
|
||||||
set(POLKITTQT-1_CORE_LIBRARY "${POLKITTQT-1_LIB_DIR}/libpolkit-tqt-core-1.dylib")
|
|
||||||
set(POLKITTQT-1_AGENT_LIBRARY "${POLKITTQT-1_LIB_DIR}/libpolkit-tqt-agent-1.dylib")
|
|
||||||
set(POLKITTQT-1_GUI_LIBRARY "${POLKITTQT-1_LIB_DIR}/libpolkit-tqt-gui-1.dylib")
|
|
||||||
else()
|
|
||||||
set(POLKITTQT-1_CORE_LIBRARY "${POLKITTQT-1_LIB_DIR}/libpolkit-tqt-core-1.so")
|
|
||||||
set(POLKITTQT-1_AGENT_LIBRARY "${POLKITTQT-1_LIB_DIR}/libpolkit-tqt-agent-1.so")
|
|
||||||
set(POLKITTQT-1_GUI_LIBRARY "${POLKITTQT-1_LIB_DIR}/libpolkit-tqt-gui-1.so")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(POLKITTQT-1_LIBRARIES ${POLKITTQT-1_GUI_LIBRARY} ${POLKITTQT-1_CORE_LIBRARY} ${POLKITTQT-1_AGENT_LIBRARY})
|
|
@ -1,106 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
|
|
||||||
* Copyright (C) 2009 Dario Freddi <drf@kde.org>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Library General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public License
|
|
||||||
* along with this library; see the file COPYING.LIB. If not, write to
|
|
||||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _POLKIT_TQT_VERSION_H_
|
|
||||||
#define _POLKIT_TQT_VERSION_H_
|
|
||||||
|
|
||||||
#include "polkit-tqt-export.h"
|
|
||||||
|
|
||||||
/// @brief PolkitTQt-1 version as string at compile time.
|
|
||||||
#define POLKIT_TQT_VERSION_STRING "${POLKITTQT-1_VERSION_STRING}"
|
|
||||||
|
|
||||||
/// @brief The major PolkitTQt-1 version number at compile time
|
|
||||||
#define POLKIT_TQT_VERSION_MAJOR ${POLKITTQT-1_VERSION_MAJOR}
|
|
||||||
|
|
||||||
/// @brief The minor PolkitTQt-1 version number at compile time
|
|
||||||
#define POLKIT_TQT_VERSION_MINOR ${POLKITTQT-1_VERSION_MINOR}
|
|
||||||
|
|
||||||
/// @brief The PolkitTQt-1 patch version number at compile time
|
|
||||||
#define POLKIT_TQT_VERSION_PATCH ${POLKITTQT-1_VERSION_PATCH}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Create a unique number from the major, minor and release number of a %PolkitTQt-1 version
|
|
||||||
*
|
|
||||||
* This function can be used for preprocessing. For version information at runtime
|
|
||||||
* use the version methods in the PolkitTQt-1 namespace.
|
|
||||||
*/
|
|
||||||
#define POLKIT_TQT_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief %PolkitTQt-1 Version as a unique number at compile time
|
|
||||||
*
|
|
||||||
* This macro calculates the %PolkitTQt-1 version into a number. It is mainly used
|
|
||||||
* through POLKIT_TQT_IS_VERSION in preprocessing. For version information at runtime
|
|
||||||
* use the version methods in the PolkitTQt-1 namespace.
|
|
||||||
*/
|
|
||||||
#define POLKIT_TQT_VERSION \
|
|
||||||
POLKIT_TQT_MAKE_VERSION(POLKIT_TQT_VERSION_MAJOR,POLKIT_TQT_VERSION_MINOR,POLKIT_TQT_VERSION_PATCH)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Check if the %PolkitTQt-1 version matches a certain version or is higher
|
|
||||||
*
|
|
||||||
* This macro is typically used to compile conditionally a part of code:
|
|
||||||
* \code
|
|
||||||
* #if POLKIT_TQT_IS_VERSION(2,1)
|
|
||||||
* // Code for PolkitTQt-1 2.1
|
|
||||||
* #else
|
|
||||||
* // Code for PolkitTQt-1 2.0
|
|
||||||
* #endif
|
|
||||||
* \endcode
|
|
||||||
*
|
|
||||||
* For version information at runtime
|
|
||||||
* use the version methods in the PolkitTQt-1 namespace.
|
|
||||||
*/
|
|
||||||
#define POLKIT_TQT_IS_VERSION(a,b,c) ( POLKIT_TQT_VERSION >= POLKIT_TQT_MAKE_VERSION(a,b,c) )
|
|
||||||
|
|
||||||
|
|
||||||
namespace PolkitTQt {
|
|
||||||
/**
|
|
||||||
* @brief Returns the major number of PolkitTQt-1's version, e.g.
|
|
||||||
* 1 for %PolkitTQt-1 1.0.2.
|
|
||||||
* @return the major version number at runtime.
|
|
||||||
*/
|
|
||||||
POLKIT_TQT_EXPORT unsigned int versionMajor();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Returns the minor number of PolkitTQt-1's version, e.g.
|
|
||||||
* 0 for %PolkitTQt-1 1.0.2.
|
|
||||||
* @return the minor version number at runtime.
|
|
||||||
*/
|
|
||||||
POLKIT_TQT_EXPORT unsigned int versionMinor();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Returns the patch number of PolkitTQt-1's version, e.g.
|
|
||||||
* 2 for %PolkitTQt-1 1.0.2.
|
|
||||||
* @return the release number at runtime.
|
|
||||||
*/
|
|
||||||
POLKIT_TQT_EXPORT unsigned int versionPatch();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Returns the %PolkitTQt-1 version as string, e.g. "1.0.2".
|
|
||||||
*
|
|
||||||
* On contrary to the macro POLKIT_TQT_VERSION_STRING this function returns
|
|
||||||
* the version number of PolkitTQt-1 at runtime.
|
|
||||||
* @return the %PolkitTQt-1 version. You can keep the string forever
|
|
||||||
*/
|
|
||||||
POLKIT_TQT_EXPORT const char* versionString();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in new issue