As part of my private build of Firestorm, the Open Source third-party viewer for Second Life from Linden Lab, I have added new library dependencies for something I am working on (adding metadata to snapshots).
This blog post details how I added them, making use of CMake and modifying various files.
I present it in the hope that it may prove useful to others.
NOTE: This article assumes that you have a working private build of Firestorm. If you have not, then please see this article first.
This isn’t the totally correct way of doing things as it doesn’t use autobuild.xml, but it works well enough for my purposes for now.
The procedure is to build your new libraries separately to Firestorm as a pre-build step, and then inject them as dependencies into the Firestorm build.
For my purposes, I have added a dependency on exiv2, which itself has dependencies on zlib and expat
Building these is beyond the scope of this article.
NOTE: The following is all for the 64-bit Windows build. I have not yet done this for a Linux build.
Once built, the new libraries need to be copied into the build directory. Ordinarily, autobuild would handle this but for now I use a small batch file which I run manually:
xcopy ..\exiv2\dist\2013\x64\dll\Release\include\exiv2\*.* .\build-vc120-64\packages\include\exiv2\ /Y xcopy ..\exiv2\dist\2013\x64\dll\Release\lib\exiv2.lib .\build-vc120-64\packages\lib\release\ /Y xcopy ..\exiv2\dist\2013\x64\dll\Release\bin\*.dll .\build-vc120-64\packages\lib\release\ /Y
This assumes that the exiv2 directory is located at the same level as 3p-fmodstudio and the firestorm source, with the batch file itself in the firestorm source directory. It also assumes you are building the 64-bit Windows version of Firestorm.
Unless you delete your build-vc120-64 folder or change your libraries, you shouldn’t need to do this again.
So, with that out of the way, here are my changes. They are all relative to the root of the Firestorm source tree.
The first is:
The next change is:
This adds the new DLLs to the list of input dependencies.
The next change is:
Finally, now that the libraries are available:
This adds the import library for exiv2 to the llimage module, since this is where I am actually using the exiv2 library.
If you are adding different libraries then your mileage may vary, but this should give you a good starting point for adding extra dependencies to Firestorm.
I haven’t yet worked out how to leverage autobuild.xml, although I assume it is going to be not dissimilar to how FModStudio and the other libraries work. If you can work it out then please drop me a comment below and let me know what you did.