diff --git a/CMakeLists.txt b/CMakeLists.txt index 591a9536..ebdc8a17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,21 +28,26 @@ include(CheckCXXSourceCompiles) option(WITH_TESTS "build with tests" OFF) option(WITH_BENCHMARKS "build with benchmarks" OFF) -option(WITH_PYTHON "build with Python scripting support" OFF) -option(WITH_LEGACY_FUSE "build fuse2 driver even if we have fuse3" OFF) -option(WITH_MAN_PAGES "build man pages using ronn" ON) -option(ENABLE_ASAN "enable address sanitizer" OFF) -option(ENABLE_TSAN "enable thread sanitizer" OFF) -option(ENABLE_UBSAN "enable undefined behaviour sanitizer" OFF) -option(ENABLE_COVERAGE "enable code coverage" OFF) -option(USE_JEMALLOC "build with jemalloc" ON) -option(PREFER_SYSTEM_LIBFMT "use system libfmt if available" OFF) -option(PREFER_SYSTEM_LIBARCHIVE "use system libarchive 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_GTEST "use system gtest if available" OFF) -option(DISABLE_CCACHE "disable ccache" OFF) -option(STATIC_BUILD_DO_NOT_USE "try static build (experimental)" OFF) +if(WIN32) + set(PREFER_SYSTEM_LIBFMT ON) + set(PREFER_SYSTEM_LIBARCHIVE ON) +else() + option(WITH_PYTHON "build with Python scripting support" OFF) + option(WITH_LEGACY_FUSE "build fuse2 driver even if we have fuse3" OFF) + option(WITH_MAN_PAGES "build man pages using ronn" ON) + option(ENABLE_ASAN "enable address sanitizer" OFF) + option(ENABLE_TSAN "enable thread sanitizer" OFF) + option(ENABLE_UBSAN "enable undefined behaviour sanitizer" OFF) + option(ENABLE_COVERAGE "enable code coverage" OFF) + option(USE_JEMALLOC "build with jemalloc" ON) + option(PREFER_SYSTEM_LIBFMT "use system libfmt if available" OFF) + option(PREFER_SYSTEM_LIBARCHIVE "use system libarchive 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_GTEST "use system gtest if available" OFF) + option(DISABLE_CCACHE "disable ccache" OFF) + option(STATIC_BUILD_DO_NOT_USE "try static build (experimental)" OFF) +endif() if(DEFINED ENV{DWARFS_LOCAL_REPO_PATH}) set(LIBFMT_GIT_REPO $ENV{DWARFS_LOCAL_REPO_PATH}/fmt)