Skip to content

Commit

Permalink
fix: ensure bundled fmt includes have priority over system/homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Aug 30, 2024
1 parent bd91c9d commit c1c6621
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ endif()
if(PREFER_SYSTEM_LIBFMT)
find_package(fmt 10 CONFIG)
else(PREFER_SYSTEM_LIBFMT)
include_directories(${fmt_SOURCE_DIR}/include)

include(FetchContent)
FetchContent_Declare(
Expand All @@ -358,6 +357,12 @@ else(PREFER_SYSTEM_LIBFMT)
)
FetchContent_MakeAvailable(fmt)

target_include_directories(fmt BEFORE PUBLIC
$<BUILD_INTERFACE:${fmt_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

include_directories(BEFORE ${fmt_SOURCE_DIR}/include)
endif(PREFER_SYSTEM_LIBFMT)

find_package(Boost 1.67 REQUIRED COMPONENTS chrono iostreams program_options)
Expand Down
2 changes: 1 addition & 1 deletion fbthrift
Submodule fbthrift updated 970 files
2 changes: 1 addition & 1 deletion folly
Submodule folly updated 116 files

0 comments on commit c1c6621

Please sign in to comment.