CMake: Add option to link against system-wide Gflags library
It is disabled by default, so should not affect existing configurations. Main benefits of this goes as: - Linux distros can use that to avoid libraries duplication and link blender package against gflags package from the system. - It it easier to test whether Blender works with updated version of Gflags prior to re-bundling the library.
This commit is contained in:
@@ -6,6 +6,7 @@ if(WITH_GTESTS)
|
||||
|
||||
add_definitions(${GFLAGS_DEFINES})
|
||||
add_definitions(${GLOG_DEFINES})
|
||||
add_definitions(-DBLENDER_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE})
|
||||
|
||||
# Otherwise we get warnings here that we cant fix in external projects
|
||||
remove_strict_flags()
|
||||
|
@@ -24,7 +24,7 @@
|
||||
set(INC
|
||||
.
|
||||
..
|
||||
../../../extern/gflags/src
|
||||
${GFLAGS_INCLUDE_DIRS}
|
||||
../../../extern/gtest/include
|
||||
)
|
||||
|
||||
|
@@ -28,7 +28,7 @@
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
BLENDER_GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &argv, true);
|
||||
google::InitGoogleLogging(argv[0]);
|
||||
|
||||
return RUN_ALL_TESTS();
|
||||
|
Reference in New Issue
Block a user