summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2021-11-01 18:47:53 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2021-11-01 18:47:53 +0900
commit58baf01dab5d45b890534bf8a1eb42d677332407 (patch)
tree236f9826c8f7457b1090d9fb3e6eca16f414e3e7
parenta811f9c0bc72c486b66fea1828cc832e81208ed8 (diff)
downloadpolkit-tqt-58baf01dab5d45b890534bf8a1eb42d677332407.tar.gz
polkit-tqt-58baf01dab5d45b890534bf8a1eb42d677332407.zip
Updated cmake files to allow building the package, although it is just a
dummy package (not functional). Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--CMakeLists.txt367
-rw-r--r--ConfigureChecks.cmake28
-rw-r--r--agent/CMakeLists.txt67
-rw-r--r--agent/dummy-agent.cpp37
-rw-r--r--agent/dummy-agent.h56
-rw-r--r--core/CMakeLists.txt77
-rw-r--r--core/dummy-core.cpp37
-rw-r--r--core/dummy-core.h56
-rw-r--r--gui/CMakeLists.txt67
-rw-r--r--gui/dummy-gui.cpp37
-rw-r--r--gui/dummy-gui.h56
-rw-r--r--polkit-tqt-1.pc.cmake11
-rw-r--r--polkit-tqt-agent-1.pc.cmake11
-rw-r--r--polkit-tqt-agent.pc.cmake10
-rw-r--r--polkit-tqt-core-1.pc.cmake11
-rw-r--r--polkit-tqt-core.pc.cmake10
-rw-r--r--polkit-tqt-gui-1.pc.cmake11
-rw-r--r--polkit-tqt-gui.pc.cmake11
-rw-r--r--polkit-tqt.pc.cmake11
19 files changed, 723 insertions, 248 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 756f1679a..0e5c4a058 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,156 +1,227 @@
+#################################################
+#
+# (C) 2021 Michele Calgaro
+# Michele (DOT) Calgaro (AT) yahoo.it
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
## Polkit TQt Library
-project("PolkitTQt-1")
-
-cmake_minimum_required(VERSION 2.6.0)
-
-set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
-
-set(TQT_MIN_VERSION "4.4.0")
-
-find_package(Qt4 REQUIRED)
-find_package(Automoc4 REQUIRED)
-find_package(Polkit REQUIRED)
-find_package(GObject REQUIRED)
-find_package(GIO REQUIRED)
-
-add_definitions(-DTQT_NO_KEYWORDS)
-
-include (${TQT_USE_FILE})
-include (InstallSettings)
-include (MacroWriteBasicCMakeVersionFile)
-include (CheckFunctionExists)
-
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${POLKIT_INCLUDE_DIR}
- ${POLKIT_AGENT_INCLUDE_DIR}
- ${GLIB2_INCLUDE_DIR}
- ${GOBJECT_INCLUDE_DIR}
- ${GIO_INCLUDE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/core
- ${CMAKE_CURRENT_SOURCE_DIR}/includes
- ${TQT_TQTXML_INCLUDE_DIR}
+project("polkit-tqt")
+
+set(POLKIT-TQT_VERSION_MAJOR 0)
+set(POLKIT-TQT_VERSION_MINOR 103)
+set(POLKIT-TQT_VERSION_PATCH 0)
+set(POLKIT-TQT_VERSION_STRING
+ "${POLKIT-TQT_VERSION_MAJOR}.${POLKIT-TQT_VERSION_MINOR}.${POLKIT-TQT_VERSION_PATCH}")
+
+
+##### cmake setup ###############################
+
+cmake_minimum_required( VERSION 2.8.12 )
+
+include( FindPkgConfig )
+include( CheckCXXSourceCompiles )
+include( CheckSymbolExists )
+
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
+include( TDEMacros )
+
+
+##### optional stuff
+
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
+
+
+##### configure checks ##########################
+
+include( ConfigureChecks.cmake )
+
+
+##### install paths setup #######################
+
+tde_setup_install_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
+tde_setup_install_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" )
+tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
+tde_setup_install_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}" )
+tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
+
+
+##### write pkgconfig file ######################
+
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
+
+configure_file( polkit-tqt.pc.cmake polkit-tqt.pc @ONLY )
+install( FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-tqt.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
+configure_file( polkit-tqt-agent.pc.cmake polkit-tqt-agent.pc @ONLY )
+install( FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-tqt-agent.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
+configure_file( polkit-tqt-core.pc.cmake polkit-tqt-core.pc @ONLY )
+install( FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-tqt-core.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
+configure_file( polkit-tqt-gui.pc.cmake polkit-tqt-gui.pc @ONLY )
+install( FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-tqt-gui.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
+
+
+##### build setup ###############################
+
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
+set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
+
+add_definitions(
+ -DTQT_THREAD_SUPPORT
+ ${TQT_CFLAGS_OTHER}
)
-# Check for older polkit
-set(CMAKE_REQUIRED_INCLUDES ${POLKIT_INCLUDE_DIR} ${POLKIT_AGENT_INCLUDE_DIR})
-set(CMAKE_REQUIRED_LIBRARIES ${POLKIT_LIBRARIES} ${POLKIT_AGENT_LIBRARY})
-check_function_exists(polkit_agent_listener_register HAVE_POLKIT_AGENT_LISTENER_REGISTER)
-check_function_exists(polkit_authority_get_sync HAVE_POLKIT_AUTHORITY_GET_SYNC)
-
-if (NOT HAVE_POLKIT_AGENT_LISTENER_REGISTER OR NOT HAVE_POLKIT_AUTHORITY_GET_SYNC)
- message(STATUS "You have an older polkit-1 version: Polkit-TQt-1 will be built in compatibility mode")
- add_definitions(-DPOLKIT_TQT_1_COMPATIBILITY_MODE)
-endif (NOT HAVE_POLKIT_AGENT_LISTENER_REGISTER OR NOT HAVE_POLKIT_AUTHORITY_GET_SYNC)
-
-if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2)
- option(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR "Prefer to install the <package>Config.cmake files to lib/cmake/<package> instead of lib/<package>/cmake" TRUE)
-endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2)
-
-set(POLKITTQT-1_VERSION_MAJOR 0 CACHE INT "PolkitTQt-1's major version number" FORCE)
-set(POLKITTQT-1_VERSION_MINOR 103 CACHE INT "PolkitTQt-1's minor version number" FORCE)
-set(POLKITTQT-1_VERSION_PATCH 0 CACHE INT "PolkitTQt-1's release version number" FORCE)
-set(POLKITTQT-1_VERSION_STRING
- "${POLKITTQT-1_VERSION_MAJOR}.${POLKITTQT-1_VERSION_MINOR}.${POLKITTQT-1_VERSION_PATCH}")
-
-# The SONUMBER of the polkit-qt-1 libraries
-set(POLKITTQT-1_ABI_VERSION 1)
-# The version number of the polkit-qt-1 libraries
-set(POLKITTQT-1_LIBRARY_VERSION "${POLKITTQT-1_ABI_VERSION}.${POLKITTQT-1_VERSION_MINOR}.${POLKITTQT-1_VERSION_PATCH}")
-
-configure_file(polkittqt1-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkittqt1-version.h)
-
-install(FILES
- gui/polkittqt1-gui-action.h
- gui/polkittqt1-gui-actionbutton.h
- gui/polkittqt1-gui-actionbuttons.h
-
- core/polkittqt1-authority.h
- core/polkittqt1-details.h
- core/polkittqt1-identity.h
- core/polkittqt1-subject.h
- core/polkittqt1-temporaryauthorization.h
- core/polkittqt1-actiondescription.h
-
- agent/polkittqt1-agent-listener.h
- agent/polkittqt1-agent-session.h
-
- ${CMAKE_CURRENT_BINARY_DIR}/polkittqt1-version.h
- polkittqt1-export.h
-
- DESTINATION
- ${INCLUDE_INSTALL_DIR}/polkit-qt-1 COMPONENT Devel)
-
-install(FILES
- includes/PolkitTQt1/Authority
- includes/PolkitTQt1/Details
- includes/PolkitTQt1/Identity
- includes/PolkitTQt1/Subject
- includes/PolkitTQt1/TemporaryAuthorization
- includes/PolkitTQt1/ActionDescription
- DESTINATION
- ${INCLUDE_INSTALL_DIR}/polkit-qt-1/PolkitTQt1 COMPONENT Devel)
-
-install(FILES
- includes/PolkitTQt1/Gui/Action
- includes/PolkitTQt1/Gui/ActionButton
- includes/PolkitTQt1/Gui/ActionButtons
- DESTINATION
- ${INCLUDE_INSTALL_DIR}/polkit-qt-1/PolkitTQt1/Gui COMPONENT Devel)
-
-install(FILES
- includes/PolkitTQt1/Agent/Listener
- includes/PolkitTQt1/Agent/Session
- DESTINATION
- ${INCLUDE_INSTALL_DIR}/polkit-qt-1/PolkitTQt1/Agent COMPONENT Devel)
-
-if(NOT WIN32)
- # Pkgconfig
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-1.pc @ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-core-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-core-1.pc
- @ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-core-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-gui-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-gui-1.pc @ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-gui-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-agent-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-agent-1.pc
- @ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-agent-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
-endif(NOT WIN32)
-
-# CMake Config files
-configure_file(PolkitTQt-1Config.cmake.in "${CMAKE_BINARY_DIR}/PolkitTQt-1Config.cmake" @ONLY)
-
-# this file is used by to check if the installed version can be used.
-macro_write_basic_cmake_version_file(${CMAKE_BINARY_DIR}/PolkitTQt-1ConfigVersion.cmake
- ${POLKITTQT-1_VERSION_MAJOR} ${POLKITTQT-1_VERSION_MINOR} ${POLKITTQT-1_VERSION_PATCH})
-
-if(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
- set(_PolkitTQt-1Config_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/PolkitTQt-1)
-else(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
- set(_PolkitTQt-1Config_INSTALL_DIR ${LIB_INSTALL_DIR}/PolkitTQt-1/cmake)
-endif(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
-
-install(FILES ${CMAKE_BINARY_DIR}/PolkitTQt-1ConfigVersion.cmake
- ${CMAKE_BINARY_DIR}/PolkitTQt-1Config.cmake
- DESTINATION ${_PolkitTQt-1Config_INSTALL_DIR} )
-
-option(BUILD_EXAMPLES "Builds a set of examples for polkit-qt-1" OFF)
-if (BUILD_EXAMPLES)
- add_subdirectory(examples)
-endif (BUILD_EXAMPLES)
-
-add_subdirectory(cmake)
-
-option(BUILD_TEST "Builds unit tests for polkit-qt-1" OFF)
-if (BUILD_TEST)
- add_subdirectory(test)
-endif (BUILD_TEST)
+
+##### source directories ########################
add_subdirectory(core)
add_subdirectory(gui)
add_subdirectory(agent)
-# Always last!
-include (PolkitTQt-1Dist)
+
+
+
+## find_package(Qt4 REQUIRED)
+## find_package(Polkit REQUIRED)
+## find_package(GObject REQUIRED)
+## find_package(GIO REQUIRED)
+##
+## add_definitions(-DTQT_NO_KEYWORDS)
+##
+## include (${TQT_USE_FILE})
+## include (InstallSettings)
+## include (MacroWriteBasicCMakeVersionFile)
+## include (CheckFunctionExists)
+##
+## include_directories(
+## ${CMAKE_CURRENT_BINARY_DIR}
+## ${POLKIT_INCLUDE_DIR}
+## ${POLKIT_AGENT_INCLUDE_DIR}
+## ${GLIB2_INCLUDE_DIR}
+## ${GOBJECT_INCLUDE_DIR}
+## ${GIO_INCLUDE_DIR}
+## ${CMAKE_CURRENT_SOURCE_DIR}
+## ${CMAKE_CURRENT_SOURCE_DIR}/core
+## ${CMAKE_CURRENT_SOURCE_DIR}/includes
+## ${TQT_TQTXML_INCLUDE_DIR}
+## )
+##
+## # Check for older polkit
+## set(CMAKE_REQUIRED_INCLUDES ${POLKIT_INCLUDE_DIR} ${POLKIT_AGENT_INCLUDE_DIR})
+## set(CMAKE_REQUIRED_LIBRARIES ${POLKIT_LIBRARIES} ${POLKIT_AGENT_LIBRARY})
+## check_function_exists(polkit_agent_listener_register HAVE_POLKIT_AGENT_LISTENER_REGISTER)
+## check_function_exists(polkit_authority_get_sync HAVE_POLKIT_AUTHORITY_GET_SYNC)
+##
+## if (NOT HAVE_POLKIT_AGENT_LISTENER_REGISTER OR NOT HAVE_POLKIT_AUTHORITY_GET_SYNC)
+## message(STATUS "You have an older polkit-1 version: Polkit-TQt-1 will be built in compatibility mode")
+## add_definitions(-DPOLKIT_TQT_1_COMPATIBILITY_MODE)
+## endif (NOT HAVE_POLKIT_AGENT_LISTENER_REGISTER OR NOT HAVE_POLKIT_AUTHORITY_GET_SYNC)
+##
+## if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2)
+## option(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR "Prefer to install the <package>Config.cmake files to lib/cmake/<package> instead of lib/<package>/cmake" TRUE)
+## endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2)
+##
+## # The SONUMBER of the polkit-qt-1 libraries
+## set(POLKIT-TQT_ABI_VERSION 1)
+## # The version number of the polkit-qt-1 libraries
+## set(POLKIT-TQT_LIBRARY_VERSION "${POLKIT-TQT_ABI_VERSION}.${POLKIT-TQT_VERSION_MINOR}.${POLKIT-TQT_VERSION_PATCH}")
+##
+## configure_file(polkittqt1-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkittqt1-version.h)
+##
+## install(FILES
+## gui/polkittqt1-gui-action.h
+## gui/polkittqt1-gui-actionbutton.h
+## gui/polkittqt1-gui-actionbuttons.h
+##
+## core/polkittqt1-authority.h
+## core/polkittqt1-details.h
+## core/polkittqt1-identity.h
+## core/polkittqt1-subject.h
+## core/polkittqt1-temporaryauthorization.h
+## core/polkittqt1-actiondescription.h
+##
+## agent/polkittqt1-agent-listener.h
+## agent/polkittqt1-agent-session.h
+##
+## ${CMAKE_CURRENT_BINARY_DIR}/polkittqt1-version.h
+## polkittqt1-export.h
+##
+## DESTINATION
+## ${INCLUDE_INSTALL_DIR}/polkit-qt-1 COMPONENT Devel)
+##
+## install(FILES
+## includes/PolkitTQt1/Authority
+## includes/PolkitTQt1/Details
+## includes/PolkitTQt1/Identity
+## includes/PolkitTQt1/Subject
+## includes/PolkitTQt1/TemporaryAuthorization
+## includes/PolkitTQt1/ActionDescription
+## DESTINATION
+## ${INCLUDE_INSTALL_DIR}/polkit-qt-1/PolkitTQt1 COMPONENT Devel)
+##
+## install(FILES
+## includes/PolkitTQt1/Gui/Action
+## includes/PolkitTQt1/Gui/ActionButton
+## includes/PolkitTQt1/Gui/ActionButtons
+## DESTINATION
+## ${INCLUDE_INSTALL_DIR}/polkit-qt-1/PolkitTQt1/Gui COMPONENT Devel)
+##
+## install(FILES
+## includes/PolkitTQt1/Agent/Listener
+## includes/PolkitTQt1/Agent/Session
+## DESTINATION
+## ${INCLUDE_INSTALL_DIR}/polkit-qt-1/PolkitTQt1/Agent COMPONENT Devel)
+##
+## if(NOT WIN32)
+## # Pkgconfig
+## configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-1.pc @ONLY)
+## install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
+## configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-core-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-core-1.pc
+## @ONLY)
+## install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-core-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
+## configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-gui-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-gui-1.pc @ONLY)
+## install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-gui-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
+## configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-agent-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-agent-1.pc
+## @ONLY)
+## install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-agent-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
+## endif(NOT WIN32)
+##
+## # CMake Config files
+## configure_file(PolkitTQt-1Config.cmake.in "${CMAKE_BINARY_DIR}/PolkitTQt-1Config.cmake" @ONLY)
+##
+## # this file is used by to check if the installed version can be used.
+## macro_write_basic_cmake_version_file(${CMAKE_BINARY_DIR}/PolkitTQt-1ConfigVersion.cmake
+## ${POLKIT-TQT_VERSION_MAJOR} ${POLKIT-TQT_VERSION_MINOR} ${POLKIT-TQT_VERSION_PATCH})
+##
+## if(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
+## set(_PolkitTQt-1Config_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/PolkitTQt-1)
+## else(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
+## set(_PolkitTQt-1Config_INSTALL_DIR ${LIB_INSTALL_DIR}/PolkitTQt-1/cmake)
+## endif(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
+##
+## install(FILES ${CMAKE_BINARY_DIR}/PolkitTQt-1ConfigVersion.cmake
+## ${CMAKE_BINARY_DIR}/PolkitTQt-1Config.cmake
+## DESTINATION ${_PolkitTQt-1Config_INSTALL_DIR} )
+##
+## option(BUILD_EXAMPLES "Builds a set of examples for polkit-qt-1" OFF)
+## if (BUILD_EXAMPLES)
+## add_subdirectory(examples)
+## endif (BUILD_EXAMPLES)
+##
+## add_subdirectory(cmake)
+##
+## option(BUILD_TEST "Builds unit tests for polkit-qt-1" OFF)
+## if (BUILD_TEST)
+## add_subdirectory(test)
+## endif (BUILD_TEST)
+##
+##
+## # Always last!
+## include (PolkitTQt-1Dist)
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 000000000..fef675949
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,28 @@
+#################################################
+#
+# (C) 2021 Michele Calgaro
+# Michele (DOT) Calgaro (AT) yahoo.it
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+##### setup architecture flags ##################
+
+tde_setup_architecture_flags( )
+
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
+tde_setup_largefiles( )
+
+
+# tqt
+find_package( TQt )
+
+# gcc visibility
+if( WITH_GCC_VISIBILITY )
+ tde_setup_gcc_visibility( )
+endif( )
diff --git a/agent/CMakeLists.txt b/agent/CMakeLists.txt
index d131071b1..4f5159c90 100644
--- a/agent/CMakeLists.txt
+++ b/agent/CMakeLists.txt
@@ -1,25 +1,58 @@
+#################################################
+#
+# (C) 2021 Michele Calgaro
+# Michele (DOT) Calgaro (AT) yahoo.it
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TQT_INCLUDE_DIRS}
)
-set(polkit_tqt_agent_SRCS
- polkittqt1-agent-session.cpp
- polkittqt1-agent-listener.cpp
- listeneradapter.cpp
- polkittqtlistener.cpp
+link_directories(
+ ${TQT_LIBRARY_DIRS}
)
-automoc4_add_library(polkit-tqt-agent-1 SHARED ${polkit_tqt_agent_SRCS})
-target_link_libraries(polkit-tqt-agent-1
- ${POLKIT_LIBRARIES}
- ${TQT_TQTCORE_LIBRARY}
- ${POLKIT_AGENT_LIBRARY}
- polkit-tqt-core-1
+
+##### install headers ###########################
+
+install( FILES
+ dummy-agent.h
+ DESTINATION ${INCLUDE_INSTALL_DIR} )
+
+
+##### polkit-tqt-agent (shared) #########################
+
+tde_add_library( polkit-tqt-agent SHARED AUTOMOC
+ SOURCES ${polkit_tqt_MOCS}
+ dummy-agent.cpp
+ VERSION 0.0.0
+ LINK ${TQT_LIBRARIES}
+ DESTINATION ${LIB_INSTALL_DIR}
)
-set_target_properties(polkit-tqt-agent-1 PROPERTIES VERSION ${POLKITTQT-1_LIBRARY_VERSION}
- SOVERSION ${POLKITTQT-1_ABI_VERSION}
- DEFINE_SYMBOL MAKE_POLKITTQT1_LIB)
-install(TARGETS polkit-tqt-agent-1 ${INSTALL_TARGETS_DEFAULT_ARGS})
+## set(polkit_tqt_agent_SRCS
+## polkittqt1-agent-session.cpp
+## polkittqt1-agent-listener.cpp
+## listeneradapter.cpp
+## polkittqtlistener.cpp
+## )
+## target_link_libraries(polkit-tqt-agent-1
+## ${POLKIT_LIBRARIES}
+## ${TQT_TQTCORE_LIBRARY}
+## ${POLKIT_AGENT_LIBRARY}
+## polkit-tqt-core-1
+## )
+##
+## set_target_properties(polkit-tqt-agent-1 PROPERTIES VERSION ${POLKITTQT-1_LIBRARY_VERSION}
+## SOVERSION ${POLKITTQT-1_ABI_VERSION}
+## DEFINE_SYMBOL MAKE_POLKITTQT1_LIB)
+##
+## install(TARGETS polkit-tqt-agent-1 ${INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/agent/dummy-agent.cpp b/agent/dummy-agent.cpp
new file mode 100644
index 000000000..2d7fcdcab
--- /dev/null
+++ b/agent/dummy-agent.cpp
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the Polkit-tqt project
+ * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br>
+ * Copyright (C) 2009 Dario Freddi <drf@kde.org>
+ * Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com>
+ * Copyright (C) 2009 Radek Novacek <rnovacek@redhat.com>
+ *
+ * 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.
+ */
+
+#include "dummy-agent.h"
+
+namespace PolkitTQt
+{
+
+
+DummyAgent* DummyAgent::instance()
+{
+ return 0;
+}
+
+}
+
+#include "dummy-agent.moc"
diff --git a/agent/dummy-agent.h b/agent/dummy-agent.h
new file mode 100644
index 000000000..4a69b208d
--- /dev/null
+++ b/agent/dummy-agent.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the Polkit-tqt project
+ * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br>
+ * Copyright (C) 2009 Dario Freddi <drf@kde.org>
+ * Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com>
+ * Copyright (C) 2009 Radek Novacek <rnovacek@redhat.com>
+ *
+ * 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 DUMMY_AGENT_H
+#define DUMMY_AGENT_H
+
+#define POLKIT_TQT_EXPORT TQ_EXPORT
+
+
+/**
+ * \namespace PolkitTQt1 PolkitTQt
+ *
+ * \brief Namespace wrapping Polkit-TQt classes
+ *
+ * This namespace wraps all Polkit-TQt classes.
+ */
+namespace PolkitTQt
+{
+
+/**
+ * \class DummyAgent
+ *
+ * \brief Convenience class for TQt/KDE applications
+ *
+ * This class is a dummy used for initial basic compiling.
+ */
+class POLKIT_TQT_EXPORT DummyAgent
+{
+public:
+
+ static DummyAgent* instance();
+};
+
+}
+
+#endif
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index feca7c96d..ed7519be0 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -1,31 +1,64 @@
+#################################################
+#
+# (C) 2021 Michele Calgaro
+# Michele (DOT) Calgaro (AT) yahoo.it
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TQT_INCLUDE_DIRS}
)
-set(polkit_tqt_core_SRCS
- polkittqt1-authority.cpp
- polkittqt1-identity.cpp
- polkittqt1-subject.cpp
- polkittqt1-temporaryauthorization.cpp
- polkittqt1-details.cpp
- polkittqt1-actiondescription.cpp
+link_directories(
+ ${TQT_LIBRARY_DIRS}
)
-automoc4_add_library(polkit-tqt-core-1 SHARED ${polkit_tqt_core_SRCS})
-target_link_libraries(polkit-tqt-core-1
- ${TQT_TQTCORE_LIBRARY}
- ${TQT_TQTDBUS_LIBRARY}
- ${TQT_TQTXML_LIBRARY}
- ${POLKIT_LIBRARIES}
- ${GLIB2_LIBRARIES}
- ${GOBJECT_LIBRARIES}
- ${GIO_LIBRARIES}
+##### install headers ###########################
+
+install( FILES
+ dummy-core.h
+ DESTINATION ${INCLUDE_INSTALL_DIR} )
+
+
+##### polkit-tqt-core (shared) #########################
+
+tde_add_library( polkit-tqt-core SHARED AUTOMOC
+ SOURCES ${polkit_tqt_MOCS}
+ dummy-core.cpp
+ VERSION 0.0.0
+ LINK ${TQT_LIBRARIES}
+ DESTINATION ${LIB_INSTALL_DIR}
)
-set_target_properties(polkit-tqt-core-1 PROPERTIES VERSION ${POLKITTQT-1_LIBRARY_VERSION}
- SOVERSION ${POLKITTQT-1_ABI_VERSION}
- DEFINE_SYMBOL MAKE_POLKITTQT1_LIB)
-install(TARGETS polkit-tqt-core-1 ${INSTALL_TARGETS_DEFAULT_ARGS})
+## set(polkit_tqt_core_SRCS
+## polkittqt1-authority.cpp
+## polkittqt1-identity.cpp
+## polkittqt1-subject.cpp
+## polkittqt1-temporaryauthorization.cpp
+## polkittqt1-details.cpp
+## polkittqt1-actiondescription.cpp
+## )
+##
+## target_link_libraries(polkit-tqt-core-1
+## ${TQT_TQTCORE_LIBRARY}
+## ${TQT_TQTDBUS_LIBRARY}
+## ${TQT_TQTXML_LIBRARY}
+## ${POLKIT_LIBRARIES}
+## ${GLIB2_LIBRARIES}
+## ${GOBJECT_LIBRARIES}
+## ${GIO_LIBRARIES}
+## )
+##
+## set_target_properties(polkit-tqt-core-1 PROPERTIES VERSION ${POLKITTQT-1_LIBRARY_VERSION}
+## SOVERSION ${POLKITTQT-1_ABI_VERSION}
+## DEFINE_SYMBOL MAKE_POLKITTQT1_LIB)
+##
+## install(TARGETS polkit-tqt-core-1 ${INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/core/dummy-core.cpp b/core/dummy-core.cpp
new file mode 100644
index 000000000..a06506b44
--- /dev/null
+++ b/core/dummy-core.cpp
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the Polkit-tqt project
+ * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br>
+ * Copyright (C) 2009 Dario Freddi <drf@kde.org>
+ * Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com>
+ * Copyright (C) 2009 Radek Novacek <rnovacek@redhat.com>
+ *
+ * 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.
+ */
+
+#include "dummy-core.h"
+
+namespace PolkitTQt
+{
+
+
+DummyCore* DummyCore::instance()
+{
+ return 0;
+}
+
+}
+
+#include "dummy-core.moc"
diff --git a/core/dummy-core.h b/core/dummy-core.h
new file mode 100644
index 000000000..13b0fdcef
--- /dev/null
+++ b/core/dummy-core.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the Polkit-tqt project
+ * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br>
+ * Copyright (C) 2009 Dario Freddi <drf@kde.org>
+ * Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com>
+ * Copyright (C) 2009 Radek Novacek <rnovacek@redhat.com>
+ *
+ * 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 DUMMY_CORE_H
+#define DUMMY_CORE_H
+
+#define POLKIT_TQT_EXPORT TQ_EXPORT
+
+
+/**
+ * \namespace PolkitTQt1 PolkitTQt
+ *
+ * \brief Namespace wrapping Polkit-TQt classes
+ *
+ * This namespace wraps all Polkit-TQt classes.
+ */
+namespace PolkitTQt
+{
+
+/**
+ * \class DummyCore
+ *
+ * \brief Convenience class for TQt/KDE applications
+ *
+ * This class is a dummy used for initial basic compiling.
+ */
+class POLKIT_TQT_EXPORT DummyCore
+{
+public:
+
+ static DummyCore* instance();
+};
+
+}
+
+#endif
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index ca420fb79..7db12e36e 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -1,26 +1,59 @@
+#################################################
+#
+# (C) 2021 Michele Calgaro
+# Michele (DOT) Calgaro (AT) yahoo.it
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TQT_INCLUDE_DIRS}
)
-set(polkit_tqt_gui_SRCS
- polkittqt1-gui-action.cpp
- polkittqt1-gui-actionbutton.cpp
- polkittqt1-gui-actionbuttons.cpp
+link_directories(
+ ${TQT_LIBRARY_DIRS}
)
-automoc4_add_library(polkit-tqt-gui-1 SHARED ${polkit_tqt_gui_SRCS})
-target_link_libraries(polkit-tqt-gui-1
- ${TQT_TQTCORE_LIBRARY}
- ${TQT_TQTGUI_LIBRARY}
- ${TQT_TQTDBUS_LIBRARY}
- ${POLKIT_LIBRARIES}
- polkit-tqt-core-1
+##### install headers ###########################
+
+install( FILES
+ dummy-gui.h
+ DESTINATION ${INCLUDE_INSTALL_DIR} )
+
+
+##### polkit-tqt-gui (shared) #########################
+
+tde_add_library( polkit-tqt-gui SHARED AUTOMOC
+ SOURCES ${polkit_tqt_MOCS}
+ dummy-gui.cpp
+ VERSION 0.0.0
+ LINK ${TQT_LIBRARIES}
+ DESTINATION ${LIB_INSTALL_DIR}
)
-set_target_properties(polkit-tqt-gui-1 PROPERTIES VERSION ${POLKITTQT-1_LIBRARY_VERSION}
- SOVERSION ${POLKITTQT-1_ABI_VERSION}
- DEFINE_SYMBOL MAKE_POLKITTQT1_LIB)
-install(TARGETS polkit-tqt-gui-1 ${INSTALL_TARGETS_DEFAULT_ARGS})
+## set(polkit_tqt_gui_SRCS
+## polkittqt1-gui-action.cpp
+## polkittqt1-gui-actionbutton.cpp
+## polkittqt1-gui-actionbuttons.cpp
+## )
+##
+## target_link_libraries(polkit-tqt-gui-1
+## ${TQT_TQTCORE_LIBRARY}
+## ${TQT_TQTGUI_LIBRARY}
+## ${TQT_TQTDBUS_LIBRARY}
+## ${POLKIT_LIBRARIES}
+## polkit-tqt-core-1
+## )
+##
+## set_target_properties(polkit-tqt-gui-1 PROPERTIES VERSION ${POLKITTQT-1_LIBRARY_VERSION}
+## SOVERSION ${POLKITTQT-1_ABI_VERSION}
+## DEFINE_SYMBOL MAKE_POLKITTQT1_LIB)
+##
+## install(TARGETS polkit-tqt-gui-1 ${INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/gui/dummy-gui.cpp b/gui/dummy-gui.cpp
new file mode 100644
index 000000000..d40e5e631
--- /dev/null
+++ b/gui/dummy-gui.cpp
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the Polkit-tqt project
+ * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br>
+ * Copyright (C) 2009 Dario Freddi <drf@kde.org>
+ * Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com>
+ * Copyright (C) 2009 Radek Novacek <rnovacek@redhat.com>
+ *
+ * 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.
+ */
+
+#include "dummy-gui.h"
+
+namespace PolkitTQt
+{
+
+
+DummyGui* DummyGui::instance()
+{
+ return 0;
+}
+
+}
+
+#include "dummy-gui.moc"
diff --git a/gui/dummy-gui.h b/gui/dummy-gui.h
new file mode 100644
index 000000000..f7c2f216f
--- /dev/null
+++ b/gui/dummy-gui.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the Polkit-tqt project
+ * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br>
+ * Copyright (C) 2009 Dario Freddi <drf@kde.org>
+ * Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com>
+ * Copyright (C) 2009 Radek Novacek <rnovacek@redhat.com>
+ *
+ * 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 DUMMY_GUI_H
+#define DUMMY_GUI_H
+
+#define POLKIT_TQT_EXPORT TQ_EXPORT
+
+
+/**
+ * \namespace PolkitTQt1 PolkitTQt
+ *
+ * \brief Namespace wrapping Polkit-TQt classes
+ *
+ * This namespace wraps all Polkit-TQt classes.
+ */
+namespace PolkitTQt
+{
+
+/**
+ * \class DummyGui
+ *
+ * \brief Convenience class for TQt/KDE applications
+ *
+ * This class is a dummy used for initial basic compiling.
+ */
+class POLKIT_TQT_EXPORT DummyGui
+{
+public:
+
+ static DummyGui* instance();
+};
+
+}
+
+#endif
diff --git a/polkit-tqt-1.pc.cmake b/polkit-tqt-1.pc.cmake
deleted file mode 100644
index 550314a83..000000000
--- a/polkit-tqt-1.pc.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@CMAKE_INSTALL_PREFIX@/include
-
-Name: polkit-tqt-1
-Description: Convenience library for using polkit with a TQt-styled API
-Version: @POLKITTQT-1_VERSION_STRING@
-Requires: polkit-tqt-core-1 polkit-tqt-gui-1 polkit-tqt-agent-1
-Libs: -L${libdir} -lpolkit-tqt-core-1 -lpolkit-tqt-gui-1 -lpolkit-tqt-agent-1
-Cflags: -I${includedir}
diff --git a/polkit-tqt-agent-1.pc.cmake b/polkit-tqt-agent-1.pc.cmake
deleted file mode 100644
index 1a52eea85..000000000
--- a/polkit-tqt-agent-1.pc.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@CMAKE_INSTALL_PREFIX@/include
-
-Name: polkit-tqt-agent-1
-Description: Convenience library for using polkit Agent with a TQt-styled API
-Version: @POLKITTQT-1_VERSION_STRING@
-Requires: TQtCore TQtGui
-Libs: -L${libdir} -lpolkit-tqt-agent-1
-Cflags: -I${includedir}
diff --git a/polkit-tqt-agent.pc.cmake b/polkit-tqt-agent.pc.cmake
new file mode 100644
index 000000000..ad959c899
--- /dev/null
+++ b/polkit-tqt-agent.pc.cmake
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@PC_EXEC_PREFIX@
+libdir=@PC_LIB_DIR@
+includedir=@PC_INCLUDE_DIR@
+
+Name: polkit-tqt-agent
+Description: Convenience library for using polkit Agent with a TQt-styled API
+Version: @POLKIT-TQT_VERSION_STRING@
+Libs: -L${libdir} -lpolkit-tqt-agent
+Cflags: -I${includedir}
diff --git a/polkit-tqt-core-1.pc.cmake b/polkit-tqt-core-1.pc.cmake
deleted file mode 100644
index e497a8016..000000000
--- a/polkit-tqt-core-1.pc.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@CMAKE_INSTALL_PREFIX@/include
-
-Name: polkit-tqt-core-1
-Description: Convenience library for using polkit with a TQt-styled API, non-GUI classes
-Version: @POLKITTQT-1_VERSION_STRING@
-Requires: TQtCore
-Libs: -L${libdir} -lpolkit-tqt-core-1
-Cflags: -I${includedir}
diff --git a/polkit-tqt-core.pc.cmake b/polkit-tqt-core.pc.cmake
new file mode 100644
index 000000000..1b4f4690e
--- /dev/null
+++ b/polkit-tqt-core.pc.cmake
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@PC_EXEC_PREFIX@
+libdir=@PC_LIB_DIR@
+includedir=@PC_INCLUDE_DIR@
+
+Name: polkit-tqt-core
+Description: Convenience library for using polkit with a TQt-styled API, non-GUI classes
+Version: @POLKIT-TQT_VERSION_STRING@
+Libs: -L${libdir} -lpolkit-tqt-core
+Cflags: -I${includedir}
diff --git a/polkit-tqt-gui-1.pc.cmake b/polkit-tqt-gui-1.pc.cmake
deleted file mode 100644
index 220eba3a8..000000000
--- a/polkit-tqt-gui-1.pc.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@CMAKE_INSTALL_PREFIX@/include
-
-Name: polkit-tqt-gui-1
-Description: Convenience library for using polkit with a TQt-styled API, GUI classes
-Version: @POLKITTQT-1_VERSION_STRING@
-Requires: TQtCore TQtGui polkit-tqt-core-1
-Libs: -L${libdir} -lpolkit-tqt-gui-1
-Cflags: -I${includedir}
diff --git a/polkit-tqt-gui.pc.cmake b/polkit-tqt-gui.pc.cmake
new file mode 100644
index 000000000..86fc09177
--- /dev/null
+++ b/polkit-tqt-gui.pc.cmake
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@PC_EXEC_PREFIX@
+libdir=@PC_LIB_DIR@
+includedir=@PC_INCLUDE_DIR@
+
+Name: polkit-tqt-gui
+Description: Convenience library for using polkit with a TQt-styled API, GUI classes
+Version: @POLKIT-TQT_VERSION_STRING@
+Requires: polkit-tqt-core
+Libs: -L${libdir} -lpolkit-tqt-gui
+Cflags: -I${includedir}
diff --git a/polkit-tqt.pc.cmake b/polkit-tqt.pc.cmake
new file mode 100644
index 000000000..26c430b16
--- /dev/null
+++ b/polkit-tqt.pc.cmake
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@PC_EXEC_PREFIX@
+libdir=@PC_LIB_DIR@
+includedir=@PC_INCLUDE_DIR@
+
+Name: polkit-tqt
+Description: Convenience library for using polkit with a TQt-styled API
+Version: @POLKIT-TQT_VERSION_STRING@
+Requires: polkit-tqt-core polkit-tqt-gui polkit-tqt-agent
+Libs: -L${libdir} -lpolkit-tqt-core -lpolkit-tqt-gui -lpolkit-tqt-agent
+Cflags: -I${includedir}