vcpkg/ports/ktx/0001-Use-vcpkg-zstd.patch
Stephen Just 2aec96fc77
[KTX] Add port (#15336)
* [KTX] Add port

* Apply formatting

* Install bash for windows

* Attempt to fix bash root and osx build since I can't repro either

* Fix windows build

* Disable on x86 which is not supported, use vcpkg-supplied zstd headers

* Fixes

* Fix cut/paste error

* Update based on review comments
2021-01-10 23:59:25 -08:00

17 lines
658 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index de38d5fe..1244ce55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -283,9 +283,10 @@ macro(commom_lib_settings lib write )
endif()
if(WIN32)
+ find_package(zstd CONFIG REQUIRED)
target_link_libraries(
${lib}
- ${CMAKE_CURRENT_SOURCE_DIR}/other_lib/win/Release-x64/zstd_static.lib
+ $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>
)
# By wrapping in generator expression we force multi configuration generators (like Visual Studio)
# to take the exact path and not change it.