citra-emu
/
citra
Archived
1
0
Fork 0

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

@ -98,6 +98,7 @@ option(USE_SYSTEM_SOUNDTOUCH "Use the system SoundTouch (instead of the bundled
option(USE_SYSTEM_CPP_HTTPLIB "Use the system cpp-httplib (instead of the bundled one)" OFF)
option(USE_SYSTEM_JSON "Use the system JSON (nlohmann-json3) package (instead of the bundled one)" OFF)
option(USE_SYSTEM_DYNARMIC "Use the system dynarmic (instead of the bundled one)" OFF)
option(USE_SYSTEM_FMT "Use the system fmt (instead of the bundled one)" OFF)
if (CITRA_USE_PRECOMPILED_HEADERS)
message(STATUS "Using Precompiled Headers.")

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)

View File

@ -173,7 +173,7 @@ endif()
create_target_directory_groups(citra_common)
target_link_libraries(citra_common PUBLIC fmt::fmt library-headers microprofile Boost::boost Boost::serialization Boost::iostreams)
target_link_libraries(citra_common PUBLIC fmt library-headers microprofile Boost::boost Boost::serialization Boost::iostreams)
target_link_libraries(citra_common PRIVATE libzstd_static)
if ("x86_64" IN_LIST ARCHITECTURE)

View File

@ -479,7 +479,7 @@ create_target_directory_groups(citra_core)
target_link_libraries(citra_core PUBLIC citra_common PRIVATE audio_core network video_core)
target_link_libraries(citra_core PRIVATE Boost::boost Boost::serialization Boost::iostreams httplib)
target_link_libraries(citra_core PUBLIC dds-ktx PRIVATE cryptopp fmt::fmt lodepng open_source_archives)
target_link_libraries(citra_core PUBLIC dds-ktx PRIVATE cryptopp fmt lodepng open_source_archives)
if (ENABLE_WEB_SERVICE)
target_link_libraries(citra_core PRIVATE web_service)