Closed SoapZA closed 6 years ago
Fancy additions @SoapZA ! Is package(?) GNUInstallDirs always present for inclusion? Also, could you please elaborate why the pkg-config file is needed? Is the BUILD_SHARED_LIBS enabled with -DBUILD_SHARED_LIBS=ON
as all the other options? Why are you using @ONLY
in configure_file command? The docs say: "If @ONLY is specified, only variables of the form @VAR@ will be replaced and ${VAR} will be ignored", which does not make sense to me here.
GNUInstallDirs
is unconditionally present since CMake 2.8.5 (hence fine). It doesn't change any of your defaults, it just allows overriding thempkg-config
is an easy and simple way to discover dependencies. Say I want to install Spoa on my system and use it. What if it suddenly requires -lpthread
due to some inline functions? What if I require at least version 1.2 due to some feature? Without a way to get this information from the package, the consumer of Spoa has to guess these things and make assumptions, which is bad. pkg-config
is extremely common in the wild and most packages provide one (zlib, gtk, Qt, seqan, etc).-DBUILD_SHARED_LIBS=ON
will produce a libspoa.so
instead of a libspoa.a
. The default stays, namely to produce libspoa.a
.@ONLY
is a safety feature. You don't want to erroneously replace pkg-config's variables like ${libdir}
which are replaced by pkg-config when it parses the file.Thank you for the explanations!
Hi @rvaser this is PR to add pkg-config (in preparation for Meson) which makes dependency querying and general deployment a lot easier. I've also fixed some minor niggles.