File: FindIsoCodes.cmake

package info (click to toggle)
kf6-extra-cmake-modules 6.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,608 kB
  • sloc: python: 668; cpp: 330; ansic: 291; xml: 182; sh: 62; makefile: 8
file content (43 lines) | stat: -rw-r--r-- 1,329 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# SPDX-FileCopyrightText: 2016 Pino Toscano <pino@kde.org>
# SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause

#[=======================================================================[.rst:
FindIsoCodes
------------

Try to find iso-codes data files.
Once done this will define:

``IsoCodes_FOUND``
      Whether the system has iso-codes
``IsoCodes_PREFIX``
      The location in which the iso-codes data files are found
``IsoCodes_DOMAINS``
      The available domains provided by iso-codes

Since 5.80.0.
#]=======================================================================]

cmake_policy(VERSION 3.16)

find_package(PkgConfig QUIET)
pkg_check_modules(PKG_iso_codes QUIET iso-codes)

set(IsoCodes_VERSION ${PKG_iso_codes_VERSION})
set(IsoCodes_PREFIX ${PKG_iso_codes_PREFIX})
pkg_get_variable(IsoCodes_DOMAINS iso-codes domains)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(IsoCodes
    FOUND_VAR IsoCodes_FOUND
    REQUIRED_VARS IsoCodes_DOMAINS IsoCodes_PREFIX
    VERSION_VAR IsoCodes_VERSION
)

include(FeatureSummary)
set_package_properties(IsoCodes PROPERTIES
  URL "https://salsa.debian.org/iso-codes-team/iso-codes"
  DESCRIPTION "Data about various ISO standards (e.g. country, language, language scripts, and currency names)"
)