mardi 28 mai 2019

cmake building external library from github submodule

I am trying to build a sample c++ project with cmake which depends on the external Pisatche library hosted in github. Installation guide list the following steps:

git clone https://github.com/oktal/pistache.git
git submodule update --init

cd pistache
mkdir -p {build,prefix}
cd build
cmake -G "Unix Makefiles" \
    -DCMAKE_BUILD_TYPE=Release \
    -DPISTACHE_BUILD_EXAMPLES=true \
    -DPISTACHE_BUILD_TESTS=true \
    -DPISTACHE_BUILD_DOCS=false \
    -DPISTACHE_USE_SSL=true \
    -DCMAKE_INSTALL_PREFIX=$PWD/../prefix \
    ../
make -j
make install

I would like to install this library from inside cmake and then link it to my executable. Any ideas how to do it?

Aucun commentaire:

Enregistrer un commentaire