Building Modules Into Zorba
Once you have created a module project (see
Writing Your Own Modules) containing modules and schemas, there are two different ways that you can build those modules directly into Zorba, such that they are on Zorba's default URI and Library paths and will be found automatically.These same techniques can be used with non-core modules developed by the Zorba team.
Installing Modules Into Zorba
If you are building your module by itself against a Zorba installation, DECLARE_ZORBA_MODULE() will automatically create an INSTALL() rule for your module that will install the module (including its external function shared library, if any) directly into the Zorba installation. Simply invoking the "install" target of the project will do this. Note that on many systems, if Zorba is installed into a system-wide location, you may require root or administrator privileges to install your module in this location.
Building Zorba With Additional Modules
If you are building Zorba yourself, you may have it automatically build any number of module projects along with itself. In that case, when you install Zorba, all modules from all module projects will be included in the install image, ready for immediate use.To do so, all you need to do is locate all your module projects in subdirectories of a single directory. That is, given a directory named, for instnace,
zorba_modules, every subdirectory of that directory should contain a top-level
CMakeLists.txt file defining a module project.Then, when configuring Zorba, simply define the variable
ZORBA_MODULES_DIR to be the full path to this single directory:
cmake -DZORBA_MODULES_DIR=/path/to/zorba_modules ....