libs: adjusted FreeType for windows compilation

This commit is contained in:
Remy Marquis 2018-07-15 17:34:25 +02:00
parent 187755fee5
commit 36ae3e5fec

View file

@ -318,6 +318,24 @@ else ()
list(APPEND BASE_SRCS src/base/ftdebug.c) list(APPEND BASE_SRCS src/base/ftdebug.c)
endif () 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) if (BUILD_FRAMEWORK)
list(APPEND BASE_SRCS builds/mac/freetype-Info.plist) list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
endif () endif ()