mclow on boost-1.77.0.beta1
target_link_librariesrequires gil being created as a library, which I believe GIL's CMakeLists.txt doesn't do. I checked out conan version, but I got weird issue with
settings.compileris not defined
ldddoesn't say that executable is linked to libpng, so I guess I messed up cmake
How can I link to GIL in CMake?
it seems like GIL has dependencies into boost, which makes that approach a bit hard.
Well, you should get familiar with how GIL does it for CI :-)
Here you can see GIL dependencies within Boost itself
Step 1: Lightweight clone of Boost superproject (without
git clone https://github.com/boostorg/boost.git
Step 2: Clone libraries required by GIL
Method 1: Roll required
git submodule update --init-s manually as https://github.com/boostorg/gil/blob/develop/.ci/get-boost.sh#L28-L86
Method 2: Run
python tools/boostdep/depinst/depinst.py gil that does it automatically https://github.com/boostorg/boostdep/blob/develop/depinst/depinst.py
Step 3: Deploy headers of libraries required by GIL
Method 1: Just build your project with
b2 and the magic should happen.
Method 2: Run
b2 headers inside the Boost superproject tree and it will deploy all required Boost headers where all Boost libraries look for them (ie.
boost/ subdirectory of the tree)
Finally, to configure your CMake project using GIL headers you just need:
find_package(Boost REQUIRED) add_executable(myexe ...) target_link_libraries(myexe Boost::boost)
apt-get install libboost-devto get all Boost headers and they you can just
git clone ..../boostorg/gil.gitand build GIL-based programs using the system-wide installed Boost.
lightweightmode in here https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md#using-cmake
developmay be not working well :-) Prefer fairly recent Boost releases