Skip to content

Build gtest on visual studio

MrD edited this page Jun 27, 2015 · 1 revision

In libloaorder readme we read

Just generate an MSVC solution using Google Test's CMake config, and build the gtest-main project.

I do not know why it is not advised to use the msvc solutions that come with gtest (in gtest-1.7.0\msvc) but let's build this using CMake:

  1. run CMake (from start menu for instance) specify the paths then hit configure:

paths and variables I specified the output directory as build - could not find standard practices on this

  1. Specify the python path then rehit configure:

python cmake

  1. Finally hit generate. This will create MSVS solution files in gtest-1.7.0/build directory.

  2. Doubleclick on gtest.sln and build it in Visual Studio - both release and debug are useful I think but I only built release. Go to build/Release folder grab gtest.lib and gtest_main.lib and drop them into gtest-1.7.0/. This last step will make CMake for libloadorder pick them up.

Best practices are on the TODO list

Clone this wiki locally