CMake: Add option to link against system-wide Gflags library
[blender.git] / source / blenderplayer / CMakeLists.txt
index 58bebc66a3e274d6abb1cb1330d8cdfe9d58c65a..e0afd84db820297a7e013d322a9a7c4374a13951 100644 (file)
@@ -177,10 +177,13 @@ endif()
                extern_wcwidth
                bf_intern_libmv
                extern_glog
-               extern_gflags
                extern_sdlew
        )
 
+       if(NOT WITH_SYSTEM_GFLAGS)
+               list(APPEND BLENDER_SORTED_LIBS extern_gflags)
+       endif()
+
        if(WITH_MOD_CLOTH_ELTOPO)
                list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
        endif()