common_w32res.rc: White space edits
[xz/debian.git] / cmake / tuklib_mbstr.cmake
blob71e16cc5a3e02ca4cdf4f5bffb0f8e7bad8a9266
1 # SPDX-License-Identifier: 0BSD
3 #############################################################################
5 # tuklib_mbstr.cmake - see tuklib_mbstr.m4 for description and comments
7 # Author: Lasse Collin
9 #############################################################################
11 include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
12 include(CheckSymbolExists)
14 function(tuklib_mbstr TARGET_OR_ALL)
15     check_symbol_exists(mbrtowc wchar.h HAVE_MBRTOWC)
16     tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_MBRTOWC)
18     # NOTE: wcwidth() requires _GNU_SOURCE or _XOPEN_SOURCE on GNU/Linux.
19     check_symbol_exists(wcwidth wchar.h HAVE_WCWIDTH)
20     tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_WCWIDTH)
21 endfunction()