From b06f9488721fe1cc90f0b7ccbdde6d377d6559e1 Mon Sep 17 00:00:00 2001 From: Remy Marquis Date: Sat, 1 Jul 2017 16:12:02 +0200 Subject: [PATCH] libs: adjusted FreeType for windows compilation --- freetype/CMakeLists.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/freetype/CMakeLists.txt b/freetype/CMakeLists.txt index d1b053e2..91348ea9 100644 --- a/freetype/CMakeLists.txt +++ b/freetype/CMakeLists.txt @@ -323,6 +323,23 @@ else () set(BASE_SRCS ${BASE_SRCS} src/base/ftdebug.c) endif () +if(MSVC) + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHsc /O2") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /EHa /W3") + + set(CompilerFlags + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_RELEASE + CMAKE_C_FLAGS + CMAKE_C_FLAGS_DEBUG + CMAKE_C_FLAGS_RELEASE + ) + + foreach(CompilerFlag ${CompilerFlags}) + string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") + endforeach() +endif(MSVC) if (BUILD_FRAMEWORK) set(BASE_SRCS @@ -331,7 +348,7 @@ if (BUILD_FRAMEWORK) ) endif () -set(CMAKE_DEBUG_POSTFIX d) +#set(CMAKE_DEBUG_POSTFIX d) add_library(freetype ${PUBLIC_HEADERS}