How do I get all source files in VS22

61 Views Asked by At

I created a program in c++ using the CryptoPP library. The program compiled and runs fine. Now how can I move all nessecary files to src folder so it is compilable with one or 2 commands, It took so many steps to use the cryptopp in vs22, but when I put the project on github, how can they just git clone and build the program easily.

1

There are 1 best solutions below

0
VonC On

You can try and use abdes/cryptopp-cmake, which contains CMake files for Wei Dai's Crypto++ (https://github.com/weidai11/cryptopp) for those who use the library in Modern CMake projects.
That means CMake 3.11+ and maybe even CMake 3.24+.

Standard usage

  • Get this project using your favorite method (clone as submodule, get with FetchContent, get with CPM...)

  • In your master CMakeLists.txt, add the following:

    add_subdirectory(xxxx)
    # where xxx is the location where you put the cryptopp-cmake files
    

That's pretty much it. You'll be able to link against cryptopp or the scoped alias cryptopp::cryptopp and have cmake handle everything else for you.

You can see such a project as a test/example at abdes/cryptopp-cmake/test.