Update FindGlog.cmake to create glog::glog target
This change to FindGlog.cmake was originally suggested by
@KrisThielemans
Change-Id: I9277e0c7ba730bffd938371859fd574a82248253
diff --git a/cmake/FindGlog.cmake b/cmake/FindGlog.cmake
index 1a7b6c0..13a43e7 100644
--- a/cmake/FindGlog.cmake
+++ b/cmake/FindGlog.cmake
@@ -345,6 +345,11 @@
endif (GLOG_LIBRARY AND
NOT "${LOWERCASE_GLOG_LIBRARY}" MATCHES ".*glog[^/]*")
+ # add glog::glog target
+ add_library(glog::glog INTERFACE IMPORTED)
+ target_include_directories(glog::glog INTERFACE ${GLOG_INCLUDE_DIRS})
+ target_link_libraries(glog::glog INTERFACE ${GLOG_LIBRARY})
+
glog_reset_find_library_prefix()
endif(NOT GLOG_FOUND)