Skip to content

Commit

Permalink
docs: give a example to show how to import glog by add_subdirectory
Browse files Browse the repository at this point in the history
Change-Id: I2e77e155c134d36f36ff38f3d3bc396a48b07ff6
  • Loading branch information
loriskong committed Jan 23, 2024
1 parent 9b34110 commit 8aef0ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ target as needed.
Alternatively, glog can be incorporated into using the CMake command
:cmake:`add_subdirectory` to include glog directly from a subdirectory of your
project by replacing the :cmake:`find_package` call from the previous snippet by
:cmake:`add_subdirectory`. The CMake official `document <https://cmake.org/cmake/help/latest/module/FetchContent.html#overview>`__
shows the way that enables glog in your CMake project via :cmake:`FetchContent` and
:cmake:`add_subdirectory`. The :cmake:`glog::glog` target is in this case an
:cmake:`ALIAS` library target for the ``glog`` library target.

Expand Down

0 comments on commit 8aef0ed

Please sign in to comment.