From d6e4fbe0850bec85dffa26f86551b5ddccaecefe Mon Sep 17 00:00:00 2001 From: laikh Date: Wed, 6 May 2020 12:14:26 +0800 Subject: [PATCH] Fix mingw Windows build --- CMakeLists.txt | 5 ++++- components/CMakeLists.txt | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4cc9ccd55..5db93ddd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -304,7 +304,10 @@ endif() set(BOOST_COMPONENTS system filesystem program_options iostreams) if(WIN32) - set(BOOST_COMPONENTS ${BOOST_COMPONENTS} locale zlib) + set(BOOST_COMPONENTS ${BOOST_COMPONENTS} locale) + if(MSVC) + set(BOOST_COMPONENTS ${BOOST_COMPONENTS} zlib) + endif(MSVC) endif(WIN32) IF(BOOST_STATIC) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index f626fe714..e7fc8b2c2 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -267,9 +267,6 @@ endif (GIT_CHECKOUT) if (WIN32) target_link_libraries(components shlwapi) - if(MINGW) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOGDI") - endif(MINGW) endif() # Fix for not visible pthreads functions for linker with glibc 2.15