Set QT_PLUGIN_PATH

The MR
  1. adds a note, that the tests in the build tree depend on the install tree.
  2. extends the QT_PLUGIN_PATH with KDE_INSTALL_FULL_QTPLUGINDIR in cmake before creating the tests. That removes the need to source prefix.sh before calling cmake.
remotes/origin/work/fhek/foreground_background_text
Andreas Naumann 4 years ago committed by Albert Astals Cid
parent d1ecad897c
commit 293337d994
  1. 7
      CMakeLists.txt
  2. 6
      README.md

@ -53,6 +53,13 @@ include(ECMAddAppIcon)
include(CMakePackageConfigHelpers)
include(ECMSetupQtPluginMacroNames)
# append the plugins from the install tree folder to the QT_PLUGIN_PATH
if(UNIX)
set(ENV{QT_PLUGIN_PATH} "$ENV{QT_PLUGIN_PATH}:${KDE_INSTALL_FULL_QTPLUGINDIR}")
elseif(WIN32)
set(ENV{QT_PLUGIN_PATH} "$ENV{QT_PLUGIN_PATH};${KDE_INSTALL_FULL_QTPLUGINDIR}")
endif()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

@ -58,13 +58,17 @@ make
make install
```
Okular also builds tests in the build tree. To run them, you have to run `make install` first.
If you install Okular in a different path than your system install directory it is possible that you need to run
```bash
source build/prefix.sh; okular
source prefix.sh
```
so that the correct Okular instance and libraries are picked up.
Afterwards one can run `okular` inside the shell instance.
The source command is also required to run the tests manually.
As stated above, Okular has various build targets.
Two of them are executables.

Loading…
Cancel
Save