mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00

the code for translating strings in kdelibs (see kdelibs/kdecore/localization/kcatalog.cpp) has finally made me roll my own - locking global mutex, saving and restoring environment variables on every string translation is not very good, is it? Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
31 lines
854 B
CMake
31 lines
854 B
CMake
# Try to find gettextpo, once done this will define:
|
|
#
|
|
# GETTEXTPO_FOUND - system has gettextpo
|
|
# GETTEXTPO_INCLUDES - the gettextpo include directory
|
|
# GETTEXTPO_LIBRARIES - the libraries needed to use gettextpo
|
|
#
|
|
# Copyright (C) 2022 Ivailo Monev <xakepa10@gmail.com>
|
|
#
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
# gettextpo does not provide pkg-config files
|
|
|
|
find_path(GETTEXTPO_INCLUDES
|
|
NAMES gettext-po.h
|
|
HINTS $ENV{GETTEXTPODIR}/include
|
|
)
|
|
|
|
find_library(GETTEXTPO_LIBRARIES
|
|
NAMES gettextpo
|
|
HINTS $ENV{GETTEXTPODIR}/lib
|
|
)
|
|
|
|
find_package_handle_standard_args(GettextPO
|
|
VERSION_VAR PC_GETTEXTPO_VERSION
|
|
REQUIRED_VARS GETTEXTPO_LIBRARIES GETTEXTPO_INCLUDES
|
|
)
|
|
|
|
mark_as_advanced(GETTEXTPO_INCLUDES GETTEXTPO_LIBRARIES)
|