From 348085b41eae5776e62bf2e647d3b304e4d9203a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Jano=C5=A1ev?= Date: Fri, 16 Nov 2018 13:14:06 +0100 Subject: [PATCH] fix windows build --- CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df325ae67..1db4ec0c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -546,10 +546,12 @@ else() add_cxx_flag_if_supported(-Wformat-security CXX_SECURITY_FLAGS) # -fstack-protector - add_c_flag_if_supported(-fstack-protector C_SECURITY_FLAGS) - add_cxx_flag_if_supported(-fstack-protector CXX_SECURITY_FLAGS) - add_c_flag_if_supported(-fstack-protector-strong C_SECURITY_FLAGS) - add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS) + if (NOT WIN32) + add_c_flag_if_supported(-fstack-protector C_SECURITY_FLAGS) + add_cxx_flag_if_supported(-fstack-protector CXX_SECURITY_FLAGS) + add_c_flag_if_supported(-fstack-protector-strong C_SECURITY_FLAGS) + add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS) + endif() # linker if (NOT WIN32) @@ -792,7 +794,8 @@ endif() include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) if(MINGW) - set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj") + set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32) set(ICU_LIBRARIES ${Boost_LOCALE_LIBRARY} icuio icuin icuuc icudt icutu iconv) elseif(APPLE OR OPENBSD OR ANDROID) set(EXTRA_LIBRARIES "")