fix: Fix dual linking of gflags when CMake variable BUILD_SHARED_LIBS
is cached
#12359
+13
−0
BUILD_SHARED_LIBS
is cached
#12359