externals: allow user to use system fmt (#7052)
This commit is contained in:
parent
2961dcf0fd
commit
f5b8888686
4 changed files with 12 additions and 4 deletions
|
@ -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_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_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_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)
|
if (CITRA_USE_PRECOMPILED_HEADERS)
|
||||||
message(STATUS "Using Precompiled Headers.")
|
message(STATUS "Using Precompiled Headers.")
|
||||||
|
|
7
externals/CMakeLists.txt
vendored
7
externals/CMakeLists.txt
vendored
|
@ -68,8 +68,15 @@ target_include_directories(dds-ktx INTERFACE ./dds-ktx)
|
||||||
|
|
||||||
# fmt and Xbyak need to be added before dynarmic
|
# fmt and Xbyak need to be added before dynarmic
|
||||||
# libfmt
|
# libfmt
|
||||||
|
if(USE_SYSTEM_FMT)
|
||||||
|
add_library(fmt INTERFACE)
|
||||||
|
find_package(fmt REQUIRED)
|
||||||
|
target_link_libraries(fmt INTERFACE fmt::fmt)
|
||||||
|
else()
|
||||||
option(FMT_INSTALL "" ON)
|
option(FMT_INSTALL "" ON)
|
||||||
add_subdirectory(fmt EXCLUDE_FROM_ALL)
|
add_subdirectory(fmt EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Xbyak
|
# Xbyak
|
||||||
if ("x86_64" IN_LIST ARCHITECTURE)
|
if ("x86_64" IN_LIST ARCHITECTURE)
|
||||||
|
|
|
@ -173,7 +173,7 @@ endif()
|
||||||
|
|
||||||
create_target_directory_groups(citra_common)
|
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)
|
target_link_libraries(citra_common PRIVATE libzstd_static)
|
||||||
|
|
||||||
if ("x86_64" IN_LIST ARCHITECTURE)
|
if ("x86_64" IN_LIST ARCHITECTURE)
|
||||||
|
|
|
@ -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 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 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)
|
if (ENABLE_WEB_SERVICE)
|
||||||
target_link_libraries(citra_core PRIVATE web_service)
|
target_link_libraries(citra_core PRIVATE web_service)
|
||||||
|
|
Loading…
Reference in a new issue