diff --git a/CMakeLists.txt b/CMakeLists.txt index d3dc3c42a..1eea1ad2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index c29063f5c..69075719b 100644 --- a/README.md +++ b/README.md @@ -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.