diff options
author | Heiko Becker <heirecka@exherbo.org> | 2021-11-30 00:17:47 +0100 |
---|---|---|
committer | Heiko Becker <heirecka@exherbo.org> | 2021-11-30 21:35:20 +0000 |
commit | 53a640542786bd80a54c29062a0047c82d2f1dc3 (patch) | |
tree | 1e4670fdb62dd3e743e2116cbf2521cccf551f32 /modules | |
parent | 225f1ccab60105783f7c9182fbe551adc427f994 (diff) | |
download | extra-cmake-modules-53a640542786bd80a54c29062a0047c82d2f1dc3.tar.gz extra-cmake-modules-53a640542786bd80a54c29062a0047c82d2f1dc3.tar.bz2 |
ECMGeneratePkgConfigFile: Add an URL parameter
While porting a manual configure_file invocation for kactivities'
.pc file to ecm_generate_pkgconfig_file I noticed that the URL keyword
was missing afterwards.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ECMGeneratePkgConfigFile.cmake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/ECMGeneratePkgConfigFile.cmake b/modules/ECMGeneratePkgConfigFile.cmake index 99d26ada..8c303981 100644 --- a/modules/ECMGeneratePkgConfigFile.cmake +++ b/modules/ECMGeneratePkgConfigFile.cmake @@ -22,6 +22,7 @@ projects. [LIB_INSTALL_DIR <dir>] [DEFINES -D<variable=value>...] [DESCRIPTION <library description>] # since 5.41.0 + [URL <url>] # since 5.89.0 [INSTALL]) ``BASE_NAME`` is the name of the module. It's the name projects will use to @@ -59,6 +60,9 @@ the library pass to the compiler when using it. will first try to get the description from the metainfo.yaml file or will create one based on ``LIB_NAME``. Since 5.41.0. +``URL`` An URL where people can get more information about and download the +package. Defaults to "https://www.kde.org/". Since 5.89.0. + ``INSTALL`` will cause the module to be installed to the ``pkgconfig`` subdirectory of ``LIB_INSTALL_DIR``, unless the ``ECM_PKGCONFIG_INSTALL_DIR`` cache variable is set to something different. Note that the first call to @@ -86,7 +90,7 @@ Since 1.3.0. function(ECM_GENERATE_PKGCONFIG_FILE) set(options INSTALL) - set(oneValueArgs BASE_NAME LIB_NAME FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR DESCRIPTION) + set(oneValueArgs BASE_NAME LIB_NAME FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR DESCRIPTION URL) set(multiValueArgs DEPS DEFINES) cmake_parse_arguments(EGPF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -133,6 +137,9 @@ function(ECM_GENERATE_PKGCONFIG_FILE) set(EGPF_DESCRIPTION "${EGPF_LIB_NAME} library.") endif() endif() + if(NOT EGPF_URL) + set(EGPF_URL "https://www.kde.org/") + endif() set(PKGCONFIG_TARGET_BASENAME ${EGPF_BASE_NAME}) set(PKGCONFIG_TARGET_LIBNAME ${EGPF_LIB_NAME}) @@ -167,6 +174,7 @@ function(ECM_GENERATE_PKGCONFIG_FILE) set(PKGCONFIG_TARGET_LIBS "\${prefix}/${EGPF_LIB_INSTALL_DIR}") endif() set(PKGCONFIG_TARGET_DESCRIPTION "${EGPF_DESCRIPTION}") + set(PKGCONFIG_TARGET_URL "${EGPF_URL}") set(PKGCONFIG_TARGET_DEFINES "") if(EGPF_DEFINES) set(PKGCONFIG_TARGET_DEFINES "${EGPF_DEFINE}") @@ -186,6 +194,7 @@ includedir=${PKGCONFIG_TARGET_INCLUDES} Name: ${PKGCONFIG_TARGET_LIBNAME} Description: ${PKGCONFIG_TARGET_DESCRIPTION} +URL: ${PKGCONFIG_TARGET_URL} Version: ${PROJECT_VERSION} Libs: -L\${prefix}/${EGPF_LIB_INSTALL_DIR} -l${PKGCONFIG_TARGET_LIBNAME} Cflags: -I${PKGCONFIG_TARGET_INCLUDES} ${PKGCONFIG_TARGET_DEFINES} |