-
Notifications
You must be signed in to change notification settings - Fork 7
Build
Note for stromx-studio: The instructions below also hold for building stromx-studio. Simply replace stromx by stromx-studio at all locations. However it is important that stromx is build and installed before stromx-studio can be compiled.
The simple build stores the build targets and the intermediate files in the source directories. This enables you to build stromx without creating an additional build directory. However, if you plan to change the code and push these changes to a remote repository an out-of-source build (explained below) is more convenient.
For the simple build it is assumed that the stromx sources are located in the directory path-to-src.
> cd path-to-src
> cmake .
> make
> make doc
The out-of-source build stores the build targets and the intermediate files in build directory separate from the source directories. This means that the source directory is never changed by the build process and can always be synced with a remote git repository. The only exception are the Config.h files which are generated in the source directory during the build. However, these files are ignored by git because of a respective entry in the .gitignore file.
The out-of-source build requires a source directory (which is assumed to be path-to-src here) and a build directory (assumed to be path-to-build here). The stromx sources must be located in the source directory, i.e. in path-to-src. Choices for source and build directories would be src/stromx and build/stromx or stromx/src and stromx/build.
> cd path-to-build
> cmake path-to-src
> make
> make doc
Specify an install prefix using either ccmake or cmake-gui:
> cd path-to-build
> ccmake path-to-src
or
> cd path-to-build
> cmake-gui path-to-src
A reasonable choice is to install stromx to your home directory (install prefix is /home/_username_) or to /usr/local. Usually these locations are included in the default path variables of your distribution. Then execute:
> make install
The differences between the simple and the out-of-source on Windows are the same as for Linux. There the source and build directories are specified in the CMake GUI. To build stromx using Visual Studio follow these steps:
- Start CMake and specify the source and build directories.
- Configure the build.
- Set the path to the headers and the libs of cppunit and libzip manually.
- Generate the build files. This creates a Visual Studio solution file in the build directory.
- Open the solution with Visual Studio and build the solution.
- Manually build the INSTALL project to install stromx.