summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt10
-rw-r--r--src/libraries/qmfclient/CMakeLists.txt9
-rw-r--r--src/libraries/qmfmessageserver/CMakeLists.txt9
-rw-r--r--src/libraries/qmfwidgets/CMakeLists.txt8
4 files changed, 36 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 887b8f25..175ea82d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,16 @@ if(BUILD_TESTING)
endif()
pkg_check_modules(ICU icu-i18n IMPORTED_TARGET)
+# it might be possible to get this functionality from Qt cmake content but those seem buried there
+# inside bigger modules
+find_package(ECM NO_MODULE)
+if (ECM_FOUND)
+ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+ include(ECMGeneratePkgConfigFile)
+else()
+ message("Extra-cmake-modules (ecm) not found, pkgconfig files won't be generated")
+endif()
+
# there's probably some better compiler agnostic way to enable more warnings, but this is a start
add_compile_options(-Wall -Wextra -Wpedantic)
diff --git a/src/libraries/qmfclient/CMakeLists.txt b/src/libraries/qmfclient/CMakeLists.txt
index 3b45c3f5..9eb339aa 100644
--- a/src/libraries/qmfclient/CMakeLists.txt
+++ b/src/libraries/qmfclient/CMakeLists.txt
@@ -176,3 +176,12 @@ install(TARGETS QmfClient
if (TARGET Qt6::LinguistTools)
qt_add_translations(libqmfclient)
endif()
+
+if (ECM_FOUND)
+ ecm_generate_pkgconfig_file(
+ BASE_NAME QmfClient
+ INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/qt6/QmfClient
+ DEPS Qt6Core PRIVATE Qt6Core5Compat PRIVATE Qt6DBus PRIVATE Qt6Sql PRIVATE Qt6Network
+ URL "https://codereview.qt-project.org/gitweb?p=qt-labs%2Fmessagingframework.git"
+ INSTALL)
+endif()
diff --git a/src/libraries/qmfmessageserver/CMakeLists.txt b/src/libraries/qmfmessageserver/CMakeLists.txt
index ba07da4e..8900a65a 100644
--- a/src/libraries/qmfmessageserver/CMakeLists.txt
+++ b/src/libraries/qmfmessageserver/CMakeLists.txt
@@ -40,3 +40,12 @@ set_target_properties(QmfMessageServer PROPERTIES
install(TARGETS QmfMessageServer
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/qt6/QmfMessageServer)
+
+if (ECM_FOUND)
+ ecm_generate_pkgconfig_file(
+ BASE_NAME QmfMessageServer
+ INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/qt6/QmfMessageServer
+ DEPS Qt6Core QmfClient PRIVATE Qt6Network
+ URL "https://codereview.qt-project.org/gitweb?p=qt-labs%2Fmessagingframework.git"
+ INSTALL)
+endif()
diff --git a/src/libraries/qmfwidgets/CMakeLists.txt b/src/libraries/qmfwidgets/CMakeLists.txt
index 88843c3c..88bcdb12 100644
--- a/src/libraries/qmfwidgets/CMakeLists.txt
+++ b/src/libraries/qmfwidgets/CMakeLists.txt
@@ -37,3 +37,11 @@ if (TARGET Qt6::LinguistTools)
qt_add_translations(libqmfwidgets)
endif()
+if (ECM_FOUND)
+ ecm_generate_pkgconfig_file(
+ BASE_NAME QmfWidgets
+ INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/qt6/QmfWidgets
+ DEPS Qt6Core Qt6Widgets QmfClient
+ URL "https://codereview.qt-project.org/gitweb?p=qt-labs%2Fmessagingframework.git"
+ INSTALL)
+endif()