CMake: Add option to link against system-wide Gflags library
[blender.git] / extern / CMakeLists.txt
index 45aa4a9d94dc4f24a9a12f31eee24f9f215ecf76..f7e98525b8bf132b5629d319ff7c6022bd855bb0 100644 (file)
@@ -99,7 +99,9 @@ if(WITH_LIBMV)
 endif()
 
 if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
-       add_subdirectory(gflags)
+       if (NOT WITH_SYSTEM_GFLAGS)
+               add_subdirectory(gflags)
+       endif()
        add_subdirectory(glog)
 endif()