Improve support to mingw

This commit is contained in:
ArthurSonzogni
2020-07-16 20:58:58 +02:00
committed by Arthur Sonzogni
parent dbfc5d0503
commit 454b14c5c6
3 changed files with 34 additions and 19 deletions

View File

@@ -104,11 +104,15 @@ foreach(lib screen dom component)
endif()
# Add as many warning as possible:
if (MSVC)
target_compile_options(${lib} PRIVATE "/W4")
target_compile_options(${lib} PRIVATE "/WX")
target_compile_options(${lib} PRIVATE "/wd4244")
target_compile_options(${lib} PRIVATE "/wd4267")
if (WIN32)
if (MSVC)
target_compile_options(${lib} PRIVATE "/W4")
target_compile_options(${lib} PRIVATE "/WX")
target_compile_options(${lib} PRIVATE "/wd4244")
target_compile_options(${lib} PRIVATE "/wd4267")
endif()
# Force Win32 to UNICODE
target_compile_definitions(${lib} PRIVATE UNICODE _UNICODE)
else()
target_compile_options(${lib} PRIVATE "-Wall")
target_compile_options(${lib} PRIVATE "-Wextra")
@@ -117,10 +121,6 @@ foreach(lib screen dom component)
target_compile_options(${lib} PRIVATE "-Wno-sign-compare")
endif()
# Force Win32 to UNICODE
if(MSVC)
target_compile_definitions(${lib} PRIVATE UNICODE _UNICODE)
endif()
endforeach()
if(FTXUI_ENABLE_INSTALL)