Skip to content

Commit

Permalink
[cmake] Check if fmt is already a target
Browse files Browse the repository at this point in the history
  • Loading branch information
donrolih committed Oct 23, 2024
1 parent 0a72c32 commit af12c25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ CPMAddPackage(
)

# fmt
CPMAddPackage("gh:fmtlib/fmt#11.0.2")
# Check if fmt is already a target; important when using as an outside library in nrgljubljana_interface
if (NOT TARGET fmt::fmt)
CPMAddPackage("gh:fmtlib/fmt#11.0.2")
endif()

# range-v3
CPMAddPackage("gh:ericniebler/range-v3#0.12.0")
Expand Down

0 comments on commit af12c25

Please sign in to comment.