Skip to content

Commit

Permalink
libs: adjusted FreeType for windows compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarquis committed Jul 15, 2018
1 parent 187755f commit 36ae3e5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions freetype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,24 @@ else ()
list(APPEND 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)
list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
endif ()
Expand Down

0 comments on commit 36ae3e5

Please sign in to comment.