How to build gflags & glog - t-kuha/caffe-win-dependency GitHub Wiki

gflags

  • Configure with CMake
> cmake <gflags source> ^
-G"Visual Studio 15 2017 Win64" -Thost=x64 ^
-DCMAKE_INSTALL_PREFIX=_install ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_STATIC_LIBS=ON ^
-DCMAKE_CXX_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG"
  • Build it!
> cmake --build . --config Release --target install

glog

  • CMake

    • Turn BUILD_TESTING off
  • Open Visual Studio solution

    • Change "/MD" -> "/MT" in projects "gflags_static" & "gflags_nothreads_static"
  • Build it!