2018-11-02 05:47:44 +02:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2021-11-26 11:18:37 +02:00
|
|
|
index 526dfcf60..241f706b7 100644
|
2018-11-02 05:47:44 +02:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2021-11-26 11:18:37 +02:00
|
|
|
@@ -97,7 +97,7 @@ endif()
|
|
|
|
|
|
|
|
include(CMakeDependentOption)
|
2020-10-13 03:13:33 +03:00
|
|
|
|
2018-11-02 05:47:44 +02:00
|
|
|
-if(MSVC)
|
|
|
|
+if(MSVC AND NOT VCPKG_TOOLCHAIN)
|
2021-11-26 11:18:37 +02:00
|
|
|
option(WITH_GFLAGS "build with GFlags" OFF)
|
2020-10-13 03:13:33 +03:00
|
|
|
option(WITH_XPRESS "build with windows built in compression" OFF)
|
|
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc)
|
2021-11-26 11:18:37 +02:00
|
|
|
@@ -142,10 +142,7 @@ else()
|
2020-10-21 02:12:34 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_SNAPPY)
|
|
|
|
- find_package(Snappy CONFIG)
|
|
|
|
- if(NOT Snappy_FOUND)
|
|
|
|
- find_package(Snappy REQUIRED)
|
|
|
|
- endif()
|
|
|
|
+ find_package(Snappy CONFIG REQUIRED)
|
|
|
|
add_definitions(-DSNAPPY)
|
|
|
|
list(APPEND THIRDPARTY_LIBS Snappy::snappy)
|
|
|
|
endif()
|
2021-11-26 11:18:37 +02:00
|
|
|
@@ -169,16 +166,19 @@ else()
|
2020-12-18 03:53:17 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_LZ4)
|
|
|
|
- find_package(lz4 REQUIRED)
|
|
|
|
+ find_package(lz4 CONFIG REQUIRED)
|
|
|
|
add_definitions(-DLZ4)
|
|
|
|
list(APPEND THIRDPARTY_LIBS lz4::lz4)
|
2020-10-21 02:12:34 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_ZSTD)
|
|
|
|
- find_package(zstd REQUIRED)
|
|
|
|
+ find_package(zstd CONFIG REQUIRED)
|
|
|
|
add_definitions(-DZSTD)
|
|
|
|
- include_directories(${ZSTD_INCLUDE_DIR})
|
|
|
|
- list(APPEND THIRDPARTY_LIBS zstd::zstd)
|
2020-12-18 03:53:17 +08:00
|
|
|
+ if(TARGET zstd::libzstd_shared)
|
2021-11-26 11:18:37 +02:00
|
|
|
+ list(APPEND THIRDPARTY_LIBS zstd::libzstd_shared)
|
2020-12-18 03:53:17 +08:00
|
|
|
+ elseif(TARGET zstd::libzstd_static)
|
2021-11-26 11:18:37 +02:00
|
|
|
+ list(APPEND THIRDPARTY_LIBS zstd::libzstd_static)
|
2020-12-18 03:53:17 +08:00
|
|
|
+ endif()
|
2020-10-21 02:12:34 +03:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2021-11-26 11:18:37 +02:00
|
|
|
@@ -438,9 +438,9 @@ endif()
|
2020-12-18 03:53:17 +08:00
|
|
|
|
|
|
|
option(WITH_TBB "build with Threading Building Blocks (TBB)" OFF)
|
|
|
|
if(WITH_TBB)
|
|
|
|
- find_package(TBB REQUIRED)
|
|
|
|
+ find_package(TBB CONFIG REQUIRED)
|
|
|
|
add_definitions(-DTBB)
|
|
|
|
- list(APPEND THIRDPARTY_LIBS TBB::TBB)
|
|
|
|
+ list(APPEND THIRDPARTY_LIBS TBB::tbb)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Stall notifications eat some performance from inserts
|