11Zip
11Zip copied to clipboard
How to install for use in VS project?
I have a VS C++ project that auto updates my project by downloading the latest zip file from URL. I would like to extract it to a directory I have already created on the users machine.
How do I install and use this within my project? I am a bit confused and don't want to mess anything up
Using Windows as my OS
Usually, you would use a CMakelists.txt to generate your Visual Studio project
11Zip includes a library CMakelists that you can include using the add_subdirectory
CMake command
What do you usually use for dependencies in Visual Studio ?
If you don't want to use CMake, you should be able to create a subproject in Visual Studio, add the 11Zip source files in it, add the proper include path in your main project and you should be good to go.
I use this lib as follow (with fetch content on my fork to get benefice of pull request just proposed):
include(FetchContent)
FetchContent_Declare(
Zip
GIT_REPOSITORY https://github.com/XavierBerger/11Zip.git
GIT_TAG master
)
FetchContent_MakeAvailable(Zip)
Not familiar with FetchContent but you should be able to do a target_link_libraries
after the fetch :)