vs2015 编译 google protobuf 3.5.1

 

下载

protobuf 3.5.1:  https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-all-3.5.1.zip

cmake: https://cmake.org     我用的是 https://cmake.org/files/v3.11/cmake-3.11.0-rc2-win64-x64.msi

 

编译

使用 VS2015开发人员命令提示  进入 protobuf 的  cmake 目录

执行命令:

mkdir release & cd release
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=../../../../install ../..

nmake

nmake install

-----

mkdir debug & cd debug

cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../../../install ../..

nmake

nmake install

 

posted @ 2018-03-07 21:59  Y4ng  阅读(1959)  评论(0编辑  收藏  举报