Dear Devs,

Kicad has a dependency on expat. It can either be provided by expat or by 
wxWidgets. However, cmake does not look for expat and as such if not found, a 
linker error occurs (which is bad, since it happens near the end of the 
building process). 

This patch adds a non-required dependency on expat (since it can be provided by 
wxWidgets) and if it finds the library it adds it to the linker flag (-lexpat). 
If the library is not found, it is added as a component to wxWidgets library.

This patch allows me to build kicad, with the system provided library for 
expat. I have tested this on OSX, but I think it is needed on all platforms.


Note, all dependencies in the CMake files are of type QUIET, which means not 
required.  It also means, the compiler will try to build kicad, whether it 
finds the libraries or not. From a quick look it might make sense to make 
wxWidgets REQUIRED and to make expat REQUIRED if it is not provided by 
wxWidgets. This is not added to this patch, because I would like to hear your 
opinion on this first.

/Martijn

Attachment: cmake-expat-dependancy.patch
Description: Binary data



_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to