X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flibchdr%2Fdeps%2Fzstd-1.5.6%2Fbuild%2Fcmake%2FREADME.md;fp=deps%2Flibchdr%2Fdeps%2Fzstd-1.5.5%2Fbuild%2Fcmake%2FREADME.md;h=4c9d3a08b688a6d1075c8e60edeb1ef7b6ca18e4;hb=f535537faaef474f7d31e50949eea1f15a58ee09;hp=a460dd16187ffb7108860f27a97bc58d6d010e31;hpb=db02598e737b8d50cd347fe2ef13cb85ade051dd;p=pcsx_rearmed.git diff --git a/deps/libchdr/deps/zstd-1.5.5/build/cmake/README.md b/deps/libchdr/deps/zstd-1.5.6/build/cmake/README.md similarity index 77% rename from deps/libchdr/deps/zstd-1.5.5/build/cmake/README.md rename to deps/libchdr/deps/zstd-1.5.6/build/cmake/README.md index a460dd16..4c9d3a08 100644 --- a/deps/libchdr/deps/zstd-1.5.5/build/cmake/README.md +++ b/deps/libchdr/deps/zstd-1.5.6/build/cmake/README.md @@ -41,6 +41,38 @@ cmake -DZSTD_BUILD_TESTS=ON -DZSTD_LEGACY_SUPPORT=OFF .. make ``` +### how to use it with CMake FetchContent + +For all options available, you can see it on +```cmake +include(FetchContent) + +set(ZSTD_BUILD_STATIC ON) +set(ZSTD_BUILD_SHARED OFF) + +FetchContent_Declare( + zstd + URL "https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz" + DOWNLOAD_EXTRACT_TIMESTAMP TRUE + SOURCE_SUBDIR build/cmake +) + +FetchContent_MakeAvailable(zstd) + +target_link_libraries( + ${PROJECT_NAME} + PRIVATE + libzstd_static +) + +# On windows and macos this is needed +target_include_directories( + ${PROJECT_NAME} + PRIVATE + ${zstd_SOURCE_DIR}/lib +) +``` + ### referring [Looking for a 'cmake clean' command to clear up CMake output](https://stackoverflow.com/questions/9680420/looking-for-a-cmake-clean-command-to-clear-up-cmake-output)