Skip to content

Commit 1f40710

Browse files
authored
Merge pull request #49 from virxkane/win32-mingw-fixes
Desktop: fix build failures on win32/mingw.
2 parents 99867c5 + b27406a commit 1f40710

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ endif (NOT WIN32 AND NOT CR3_FREETYPE)
214214

215215
if (NOT FREETYPE_FOUND)
216216
message("System FREETYPE not found, will build local one\n")
217+
if (NOT HarfBuzz_FOUND)
218+
SET(HARFBUZZ_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/harfbuzz/src)
219+
SET(HARFBUZZ_LIBRARIES harfbuzz)
220+
endif (NOT HarfBuzz_FOUND)
217221
ADD_SUBDIRECTORY(thirdparty/freetype)
218222
SET(FREETYPE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/freetype/include)
219223
SET(FREETYPE_LIBRARIES freetype)

crengine/src/wordfmt.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "../include/wordfmt.h"
2222

2323
#ifdef _WIN32
24+
#if defined(_MSC_VER) || (defined(__MINGW64_VERSION_MAJOR) && defined(NO_OLDNAMES)) || (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && !defined(_EMULATE_GLIBC))
2425
extern "C" {
2526
int strcasecmp(const char *s1, const char *s2) {
2627
return _stricmp(s1,s2);
@@ -29,6 +30,7 @@ extern "C" {
2930
// int optind = 0;
3031
}
3132
#endif
33+
#endif // _WIN32
3234

3335
#ifdef _DEBUG
3436
#define TRACE(x, ...) CRLog::trace(x)

0 commit comments

Comments
 (0)