Skip to content

Commit

Permalink
set IMPORTED_LINK_INTERFACE_LIBRARIES to ${LIBGFLAGS_LIBRARY} for glo…
Browse files Browse the repository at this point in the history
…g::glog (facebookexperimental#31)

Summary:
X-link: facebook/fb303#31

Previously Folly provided a polyfill of the `GflagsFlagSaver` symbol, which was removed since facebook/folly@4dadde1. Therefore, the `glog` should solve the `GflagsFlagSaver` symbol from `gflags`.

This diff added `gflags` libraries as a dependency of the CMake project `glog::glog` into `fbcode_builder`'s `FindGlog.cmake`, so that the `fbcode_builder` users will be able to automatically link with `gflags`.

Differential Revision: D39220438

fbshipit-source-id: d269c8e50ed20541054ea706394450043f8181ef
  • Loading branch information
Atry authored and facebook-github-bot committed Sep 1, 2022
1 parent 81d1542 commit 01a20da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build/fbcode_builder/CMake/FindGlog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ if (NOT TARGET glog::glog)
add_library(glog::glog UNKNOWN IMPORTED)
set_target_properties(glog::glog PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}")
set_target_properties(glog::glog PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${GLOG_LIBRARIES}")

find_package(Gflags)
if(GFLAGS_FOUND)
set_target_properties(glog::glog PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES ${LIBGFLAGS_LIBRARY})
endif()
endif()

0 comments on commit 01a20da

Please sign in to comment.