libs: adjusted FreeType for windows compilation

This commit is contained in:
Remy Marquis 2017-07-01 16:12:02 +02:00
parent 9eda0bd17e
commit b06f948872
1 changed files with 18 additions and 1 deletions

View File

@ -323,6 +323,23 @@ else ()
set(BASE_SRCS ${BASE_SRCS} src/base/ftdebug.c) set(BASE_SRCS ${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)
set(BASE_SRCS set(BASE_SRCS
@ -331,7 +348,7 @@ if (BUILD_FRAMEWORK)
) )
endif () endif ()
set(CMAKE_DEBUG_POSTFIX d) #set(CMAKE_DEBUG_POSTFIX d)
add_library(freetype add_library(freetype
${PUBLIC_HEADERS} ${PUBLIC_HEADERS}