136 lines (85 with data), 4.0 kB
Detailed instructions for building and installing
cmake doesn't produce any output into the source directory, by default.
Instead it uses extra build directories for that. This makes the
make clean procedure obsolete, because you only have to remove the build
1. By using a terminal, navigate to the top-level source-directory
2. Create and enter a build directory:
mkdir build && cd build
3. Run cmake to generate the Makefiles:
cmake .. -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=~/usr/
This command enables debug-symbols to be built
and installs all files into a `usr` sub-directory in your home-directory.
If cmake complains about any missing libraries,
you need to install development versions for those.
Make sure cmake finishes with no error until you proceed.
3. Compile and install the source:
4. If you installed into a non-standard prefix
(like suggested in the cmake-command-line above),
you need to make sure that some environment variables are set:
5. After installing new versions of .desktop files or other
freedesktop.org-related files, you need to run:
to update all caches to use these files.
This is especially important when creating new plugins.
They won't be loadable by (or even visible to) the KDE's plugin-system,
until you ran kbuildsycoca4.
Note that you need to have the environment variables from step 5 set.
6. On fresh builds, it's necessary to update the mime database.
This will be done by the following command:
Where /path/to/mime is the path, where the ktechlab.xml gets installed to.
(there should be ~/usr/share/mime/packages/ktechlab.xml in this case)
If building and installing has been successfully completed, the command
Should launch KTechLab. Note that in some cases the KTechLab plugins
might be disabled, so they need to be enabled from the menu:
Setting -> Configure KTechLab -> Plugins,
and enable all the KTechLab-related plugins.
Sometimes it's easier to launch KTechLab from a script,
mostly for debugging purposes.
The script presented below sets the environment-variables and
installs all the mime-types before launching the KTechLab
executable located in the current directory:
# export XDG_DATA_DIRS=~/usr/share:$XDG_DATA_DIRS
kbuildsycoca4 &> /dev/null
Compilers and Options
Compiler options can be set via ccmake or directly as a command-line option
for cmake. The most easy way would be to use ccmake.
To compile in debug symbols use:
cmake -DCMAKE_BUILD_TYPE=debug ..
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `cmake' the
Some interesting cmake variables include:
This makes cmake to create verbose Makefiles to see options given
to gcc and friends