Currently googletest is build as static lib. Setting BUILD_SHARED_LIBS to ON will build it as shared lib but also will cause linker errors as googletest needs GTEST_LINKED_AS_SHARED_LIBRARY set during build ( google/googletest#292 ).
We need a nice solution, which will add GTEST_LINKED_AS_SHARED_LIBRARY definition during googletest build when BUILD_SHARED_LIBS is ON.
Currently googletest is build as static lib. Setting BUILD_SHARED_LIBS to ON will build it as shared lib but also will cause linker errors as googletest needs GTEST_LINKED_AS_SHARED_LIBRARY set during build ( google/googletest#292 ).
We need a nice solution, which will add GTEST_LINKED_AS_SHARED_LIBRARY definition during googletest build when BUILD_SHARED_LIBS is ON.