mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-08 01:36:41 +08:00
build: Fix build errors on Windows
- Fix string no output variables on UWP
On UWP, CMAKE_SYSTEM_PROCESSOR may be empty. As a result:
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_ARCHITECTURE)
will be treated as:
string(TOLOWER TARGET_ARCHITECTURE)
which, as a result, will cause a CMake error:
CMake Error at CMakeLists.txt:42 (string):
string no output variable specified
- Remove unnecessary header inclusions in uchardet.cpp
These extra inclusions cause build errors on Windows.
This commit is contained in:
parent
a49f8ef6ea
commit
5bcbd23acf
@ -39,7 +39,7 @@ if (BUILD_SHARED_LIBS)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
if (TARGET_ARCHITECTURE STREQUAL "")
|
||||
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_ARCHITECTURE)
|
||||
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" TARGET_ARCHITECTURE)
|
||||
endif (TARGET_ARCHITECTURE STREQUAL "")
|
||||
|
||||
if (TARGET_ARCHITECTURE MATCHES ".*(x86)|(amd).*")
|
||||
|
||||
@ -35,12 +35,9 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include "../uchardet.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <getopt.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef VERSION
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user