mirror of
https://github.com/etlegacy/etlegacy-libs.git
synced 2025-04-08 23:42:48 +00:00
windows static build fixes
This commit is contained in:
parent
8ad3e03a9f
commit
75898ec483
2 changed files with 19 additions and 1 deletions
|
@ -125,6 +125,24 @@ include_directories("src/raster")
|
|||
include_directories("src/psaux")
|
||||
include_directories("src/psnames")
|
||||
|
||||
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)
|
||||
|
||||
add_library(freetype ${BASE_SRCS})
|
||||
|
||||
# Installations
|
||||
|
|
|
@ -97,7 +97,7 @@ if (MSVC)
|
|||
# Turn off Microsofts "security" warnings.
|
||||
add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo" )
|
||||
|
||||
if (STATIC_CRT)
|
||||
if (JANSSON_STATIC_CRT)
|
||||
set(CMAKE_C_FLAGS_RELEASE "/MT")
|
||||
set(CMAKE_C_FLAGS_DEBUG "/MTd")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue