Commit e131c44a authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

update folly-config.cmake to find the fmt dependency correctly

Summary:
D15485589 updated folly to depend on fmt.  This updates the installed
`folly-config.cmake` file to correctly find the `fmt` dependency, so that
downstream projects that depend on folly still work correctly.

Reviewed By: vitaut

Differential Revision: D18822127

fbshipit-source-id: 970751c7252bf62173d2d26cdc76e46fc08618ba
parent c0dfc62d
...@@ -10,9 +10,15 @@ ...@@ -10,9 +10,15 @@
@PACKAGE_INIT@ @PACKAGE_INIT@
include(CMakeFindDependencyMacro)
set_and_check(FOLLY_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") set_and_check(FOLLY_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(FOLLY_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@") set_and_check(FOLLY_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@")
# find_dependency() ends up changing PACKAGE_PREFIX_DIR, so save
# folly's prefix directory in the FOLLY_PREFIX_DIR variable
set(FOLLY_PREFIX_DIR "${PACKAGE_PREFIX_DIR}")
# Include the folly-targets.cmake file, which is generated from our CMake rules # Include the folly-targets.cmake file, which is generated from our CMake rules
if (NOT TARGET Folly::folly) if (NOT TARGET Folly::folly)
include("${FOLLY_CMAKE_DIR}/folly-targets.cmake") include("${FOLLY_CMAKE_DIR}/folly-targets.cmake")
...@@ -21,6 +27,9 @@ endif() ...@@ -21,6 +27,9 @@ endif()
# Set FOLLY_LIBRARIES from our Folly::folly target # Set FOLLY_LIBRARIES from our Folly::folly target
set(FOLLY_LIBRARIES Folly::folly) set(FOLLY_LIBRARIES Folly::folly)
# Find folly's dependencies
find_dependency(fmt)
if (NOT folly_FIND_QUIETLY) if (NOT folly_FIND_QUIETLY)
message(STATUS "Found folly: ${PACKAGE_PREFIX_DIR}") message(STATUS "Found folly: ${FOLLY_PREFIX_DIR}")
endif() endif()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment