mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-04 02:06:22 -04:00
build: automatically use system-installed libfmt
This commit is contained in:
parent
a4bd54c04f
commit
593b22a8a9
@ -41,7 +41,6 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
option(USE_RICEPP_PACKAGE "use pre-built RICEPP package" OFF)
|
option(USE_RICEPP_PACKAGE "use pre-built RICEPP package" OFF)
|
||||||
set(PREFER_SYSTEM_LIBFMT ON)
|
|
||||||
set(PREFER_SYSTEM_ZSTD ON)
|
set(PREFER_SYSTEM_ZSTD ON)
|
||||||
set(PREFER_SYSTEM_XXHASH ON)
|
set(PREFER_SYSTEM_XXHASH ON)
|
||||||
else()
|
else()
|
||||||
@ -52,7 +51,6 @@ else()
|
|||||||
option(ENABLE_UBSAN "enable undefined behaviour sanitizer" OFF)
|
option(ENABLE_UBSAN "enable undefined behaviour sanitizer" OFF)
|
||||||
option(ENABLE_COVERAGE "enable code coverage" OFF)
|
option(ENABLE_COVERAGE "enable code coverage" OFF)
|
||||||
option(USE_JEMALLOC "build with jemalloc" ON)
|
option(USE_JEMALLOC "build with jemalloc" ON)
|
||||||
option(PREFER_SYSTEM_LIBFMT "use system libfmt if available" OFF)
|
|
||||||
option(PREFER_SYSTEM_ZSTD "use system zstd if available" OFF)
|
option(PREFER_SYSTEM_ZSTD "use system zstd if available" OFF)
|
||||||
option(PREFER_SYSTEM_XXHASH "use system xxHash if available" OFF)
|
option(PREFER_SYSTEM_XXHASH "use system xxHash if available" OFF)
|
||||||
option(PREFER_SYSTEM_GTEST "use system gtest if available" OFF)
|
option(PREFER_SYSTEM_GTEST "use system gtest if available" OFF)
|
||||||
@ -210,9 +208,9 @@ if(WITH_MAN_PAGES)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PREFER_SYSTEM_LIBFMT)
|
find_package(fmt 10.0 CONFIG QUIET)
|
||||||
find_package(fmt 10.0 CONFIG)
|
|
||||||
else()
|
if(NOT fmt_FOUND)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
fmt
|
fmt
|
||||||
@ -227,8 +225,6 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Boost 1.67 REQUIRED COMPONENTS chrono iostreams program_options)
|
|
||||||
|
|
||||||
find_package(range-v3 0.12.0 CONFIG QUIET)
|
find_package(range-v3 0.12.0 CONFIG QUIET)
|
||||||
|
|
||||||
if(NOT range-v3_FOUND)
|
if(NOT range-v3_FOUND)
|
||||||
@ -245,6 +241,8 @@ if(NOT range-v3_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(Boost 1.67 REQUIRED COMPONENTS chrono iostreams program_options)
|
||||||
|
|
||||||
if(STATIC_BUILD_DO_NOT_USE)
|
if(STATIC_BUILD_DO_NOT_USE)
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user