[sword-devel] SWORD 1.7.0RC2

Mark Trompell mark at foresightlinux.org
Wed Aug 7 00:26:12 MST 2013


Afaik cmake has a way to get this information from pkgconfig (not on windows though).
--- Ursprüngl. Mitteilung ---
Von: Jaak Ristioja
Gesend.:  07.08.2013, 00:53 
An: sword-devel at crosswire.org
Betreff: Re: [sword-devel] SWORD 1.7.0RC2


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Aug 6, 2013 at 11:12 AM, Troy A. Griffitts wrote:
> My only mention of this is to show that we're not simply speaking 
> of obtaining version information when discussion whether or not to 
> use pkg-config.

Just to be clear, I'm not against providing sword.pc files so that
people could use pkg-config in projects to detect Sword and required
compile options. But I'm not sure whether it were a proper place for
passing #defines such as SWORD_VERSION. For feature test macros (see
"man 7 feature_test_macros") this is probably still a good place thou.

As for the ease of use pkg-config aims to provide, I know a similar
way to also improve Sword for projects using CMake so that those need
no more CMake code than a regular FIND_PACKAGE() call, which will
define the respective Sword_INCLUDE_DIRS, Sword_LIBRARIES,
Sword_DEFINITIONS, Sword_VERSION_MINOR etc variables. For BibleTime
this approach would mean we could delete the cmake/FindSword.cmake
sword detection logic file and just use FIND_PACKAGE(Sword 1.7.0
REQUIRED) to have all the respective variables defined. Using this
approach Sword can put the version define into the Sword_DEFINITIONS
variable, and I'd be happy that I don't have to mess around fixing
BibleTime's logic for detecting Sword. This also beats trying to use
pkg-config from inside CMake.

If this approach were to be implemented by Sword, the issue about
whether the version macro needs to be in #defined in an include header
file would probably become miniscule for BibleTime and other projects
using CMake. So from this perspective I think I can better understand
Troys standpoint. :) But although this pkg-config like approach for
CMake projects would practically solve the issue BibleTime currently
has with 1.7.0RC2, I still retain my position that generally it were
good to define the version macro in a header file.

Since Sword has two parallel build systems, both need to be maintained
(both should generate the same files for installation, including the
generated *.pc, *.h etc files). As far as I'm familiar with both build
systems, neither makes it technically infeasible to implement what has
been discussed in this thread. I'm willing to help as much as I can,
but I'm more familiar with pure M4, pure CMake and poking Greg via IRC
than with autotools. :)

On 06.08.2013 19:26, Greg Hellings wrote:
> CMake supports the same syntax as autotools for populating files 
> such as sword.pc. Since CMake already has the version information 
> in the string form, the only difficult part from my viewpoint is
> to properly parse that into whatever final form we decide, whether 
> that's a _MAJOR, _MINOR and _PATCH or a single numeric version
> with expanded numbers of variables.

Personally, I'd add both forms just in case, but if I had to choose,
I'd choose a single numeric version because it would result in simpler
C/C++ preprocessor commands for most common version checks.

***

Troy, can you please give us some information about the current
SWORD_NUMVERSION values? From the commit (SVN 2952), I conclude that
it equals (MAJOR * 10^5) + (MINOR * 10^3) + PATCH, but how exactly
does PATCH relate to regular, alpha-, beta- and RC versions?

Blessings,
Jaak
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQgcBAEBAgAGBQJSAX5/AAoJEEqsYmEt1rCOcqs/+QF4LlrXtT9wg4pIo+JMQlpI
/VV4lzN72o+Gt3pd53Rcv5xvBeHGA8Cxq+9YZM4lIIJVGnQwZDicwlSu0Fu3riWH
hoacrKKKfPEDsZ58UWxKaUQlEQA6Wc+CL5aEWljYrqx7mrxMrSUEGu5WTYGCvXAk
066MUWClxBVxz+XOrRNDQiKSixJh7Z+bdb36Hf2OaEeGnJw/rJHPPlZzVWsG3UWp
35dv+e9ksvYeXKLxUVmn3pdn+k5cSN6ufIplGXTUqrmi9loZFXVwX2qW+mTDBPGQ
+JcCNY06ut7WwrsgvGk77zq4UZD4mc/qYA1AGJGxP83QkORnbdREIfrgFslNEkZJ
gRbV2v5K5clSA7z8QWooeQBtTtrXmtVnMkR87TlcOqMuIrOU5/XMCY3jEbE+UyRa
50hObW1KsEeG5ziICC1iWWAc4YV0hCXKfcbreQToS+TInzrD0ZJipkHtdlzTorQg
L7BRNYP881tdSIJIj5mr0NLcWMIYrTbbUEs+h8G3TlkXcsn5bkDsJfsjDFZaQpS4
WGsnrxO8bxZwOwlgk0/mpLQXaIZF2Jbs6tfGcsNEhOnNQGKTLW4E84z/fGvtpOBH
zvhd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wpExGXlconjI2AZ
=Mlww
-----END PGP SIGNATURE-----

_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list