What i did to link cryptopp and cryptocpp-cmake
mkovags opened this issue · comments
Hey!
In README.md
you're asking for suggestions, here's what I did:
git submodule add https://github.com/noloader/cryptopp-cmake
git submodule add https://github.com/weidai11/cryptopp.git
cd cryptocpp
ln -s ../cryptopp-cmake/ .
ln -s cryptopp-cmake/cryptopp-config.cmake .
Then on the README.md
, instruct to run the following (or create a script that automatically sets up the repository):
git submodule update --init --recursive
cd cryptocpp
ln -s ../cryptopp-cmake/ .
ln -s cryptopp-cmake/cryptopp-config.cmake .
This will have almost the same effect of the instructions given with the added benefit that you get build consistency, because everything is a submodule pointing to the same commit hash for everyone.
Interesting. I took a different approach. In my cryptopp.cmake:
set(build_files
CMakeLists.txt
cryptopp-config.cmake
)
list(TRANSFORM build_files PREPEND ${CMAKE_CURRENT_LIST_DIR}/cryptopp/cryptopp-cmake/)
file(COPY ${build_files} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/cryptopp/cryptopp/)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/cryptopp/cryptopp)
And I added submodules for cryptopp and cryptopp-cmake, both in a cryptopp directory.
What do you think about this approach #67?
Well, git submodules are a bit nicer because you control when they're updated, can fork and have your own tree, etc, but I guess that would work too.