diff --git a/CMakeLists.txt b/CMakeLists.txt index ef2b20deb..eb92a22d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,10 +88,9 @@ if( NOT DEFINED CMAKE_CXX_STANDARD ) endif() include(CMakeDependentOption) -CMAKE_DEPENDENT_OPTION(WITH_GFLAGS "build with GFlags" ON - "NOT MSVC;NOT MINGW" OFF) if(MSVC) + option(WITH_GFLAGS "build with GFlags" OFF) option(WITH_XPRESS "build with windows built in compression" OFF) include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc) else() @@ -107,6 +106,11 @@ else() endif() endif() + if(MINGW) + option(WITH_GFLAGS "build with GFlags" OFF) + else() + option(WITH_GFLAGS "build with GFlags" ON) + endif() set(GFLAGS_LIB) if(WITH_GFLAGS) # Config with namespace available since gflags 2.2.2