add conan and cmake ways to build libconfuse #169
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I suggest to add new modern way to build libconfuse. It was tested on Ubuntu 22 with conan 2.0, works ok. Thanks for help.
Build & Install
using conan (better)
mkdir my_genimage && cd my_genimage
//to uninstall conan use: pip uninstall conan
//install conan
pip install conan --pre --user
pip install conan --user --upgrade
//download test example
git clone https://github.com/libconfuse/libconfuse
//put to original libconfuse/ folder files CMakeLists.txt and config.h.in (replace) and conanfile.txt
cd libconfuse/
rm -Rf build/
conan profile detect --force
conan install . --output-folder=build --build=missing
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .
sudo checkinstall --pkgname="libconfuse" --nodoc --pkgversion="1" --default
//to remove use: dpkg -r build-libconfuse
using cmake only
mkdir my_genimage && cd my_genimage
mkdir build-libconfuse
git clone https://github.com/libconfuse/libconfuse
//put to original libconfuse/ folder files CMakeLists.txt and config.h.in (replace)
cd libconfuse/
cmake -S libconfuse/ -B build_libconfuse/ -DCMAKE_BUILD_TYPE=Release
cmake --build build_libconfuse/ --parallel
cd build_libconfuse/
sudo checkinstall
//to remove use: dpkg -r build-libconfuse
P.S. If you still haven't conan install and update it:
Co-Authored-By: myd7349 myd7349@gmail.com