From 79344fc5b6f0a561b4ec6e6ec52e4149929ab9f6 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Tue, 11 Dec 2018 20:37:41 +0100 Subject: [PATCH] CMake: Fix locale_t type check Test failed when xlocale.h did not exist. --- build/cmake/setup.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/cmake/setup.cmake b/build/cmake/setup.cmake index 5656b9dc30..c3d66de91e 100644 --- a/build/cmake/setup.cmake +++ b/build/cmake/setup.cmake @@ -641,7 +641,10 @@ endif() if(wxUSE_XLOCALE) check_include_file(xlocale.h HAVE_XLOCALE_H) - set(CMAKE_EXTRA_INCLUDE_FILES xlocale.h locale.h) + set(CMAKE_EXTRA_INCLUDE_FILES locale.h) + if(HAVE_XLOCALE_H) + list(APPEND CMAKE_EXTRA_INCLUDE_FILES xlocale.h) + endif() check_type_size(locale_t LOCALE_T) set(CMAKE_EXTRA_INCLUDE_FILES) endif()