externals: allow user to use system fmt (#7052)

This commit is contained in:
Castor215 2023-10-08 00:00:02 +01:00 committed by GitHub
parent 2961dcf0fd
commit f5b8888686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View file

@ -68,8 +68,15 @@ target_include_directories(dds-ktx INTERFACE ./dds-ktx)
# fmt and Xbyak need to be added before dynarmic
# libfmt
option(FMT_INSTALL "" ON)
add_subdirectory(fmt EXCLUDE_FROM_ALL)
if(USE_SYSTEM_FMT)
add_library(fmt INTERFACE)
find_package(fmt REQUIRED)
target_link_libraries(fmt INTERFACE fmt::fmt)
else()
option(FMT_INSTALL "" ON)
add_subdirectory(fmt EXCLUDE_FROM_ALL)
endif()
# Xbyak
if ("x86_64" IN_LIST ARCHITECTURE)