From 1e0fe319ee3fad59a8e078d6e0d17f91cff06468 Mon Sep 17 00:00:00 2001 From: Zhaosheng Pan Date: Wed, 23 Sep 2020 21:46:37 +0800 Subject: [PATCH] Update README.md --- README.md | 53 +++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index ad014c7..94b0452 100644 --- a/README.md +++ b/README.md @@ -5,27 +5,32 @@ files. ## Build -Linux/Cygwin/OS X using makefiles: - -```sh -mkdir build -cd build -cmake [-DCMAKE_BUILD_TYPE=] -G "Unix Makefiles" .. -make -``` - -Windows using Visual Studio 2013: - -```sh -mkdir build -cd build -cmake [-DCMAKE_BUILD_TYPE=] -G "Visual Studio 12" .. -``` - -OS X using Xcode: - -```sh -mkdir build -cd build -cmake [-DCMAKE_BUILD_TYPE=] -G Xcode .. -``` + mkdir build + cd build + cmake [-DCMAKE_BUILD_TYPE=] .. + make + +## CMake Support + +Use `FetchContent`: + + include(FetchContent) + FetchContent_Declare(naivedsp + GIT_REPOSITORY "https://github.com/brglng/libwav.git" + GIT_SHALLOW ON + ) + FetchContent_MakeAvailable(naivedsp) + add_executable(yourprogram yourprogram.c) + target_link_libraries(yourprogram wav::wav) + +Use `add_subdirectory`: + + add_subdirectory(naivedsp) + add_executable(yourprogram yourprogram.c) + target_link_libraries(yourprogram wav::wav) + +Use `find_package`: + + find_package(naivedsp) + add_executable(yourprogram yourprogram.c) + target_link_libraries(yourprogram wav::wav)