Skip to content

Commit

Permalink
fix: OVERRIDE_FIND_PACKAGE for fmt and gtest
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Aug 30, 2024
1 parent 74398b7 commit bd91c9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,16 +346,19 @@ endif()

if(PREFER_SYSTEM_LIBFMT)
find_package(fmt 10 CONFIG)
else()
else(PREFER_SYSTEM_LIBFMT)
include_directories(${fmt_SOURCE_DIR}/include)

include(FetchContent)
FetchContent_Declare(
fmt
GIT_REPOSITORY ${LIBFMT_GIT_REPO}
GIT_TAG 10.1.0
GIT_TAG 10.2.1
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(fmt)
include_directories(${fmt_SOURCE_DIR}/include)
endif()

endif(PREFER_SYSTEM_LIBFMT)

find_package(Boost 1.67 REQUIRED COMPONENTS chrono iostreams program_options)

Expand Down Expand Up @@ -482,6 +485,7 @@ if(WITH_TESTS)
googletest
GIT_REPOSITORY ${GOOGLETEST_GIT_REPO}
GIT_TAG v1.13.0
OVERRIDE_FIND_PACKAGE
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion tools

0 comments on commit bd91c9d

Please sign in to comment.