Use CMake find_dependency in CMake config file instead of find_package

Authored by cullmann on Aug 17 2019, 2:51 PM.

Description

Use CMake find_dependency in CMake config file instead of find_package

Summary:
find_dependency is preferred in config files to correctly propagate the QUIET and REQUIRED parameters from the enclosing find_package call. See https://cmake.org/cmake/help/v3.0/module/CMakeFindDependencyMacro.html#module:CMakeFindDependencyMacro.

The macro does not support COMPONENTS before CMake 3.8 so I split the original find_package up into two find_dependency calls. I also removed the NO_MODULE parameter. This is consistent with how the rest of KDE uses find_dependency.

Reviewers: Framework: Syntax Highlighting, dhaumann, cgiboudeaux

Reviewed By: Framework: Syntax Highlighting, dhaumann, cgiboudeaux

Subscribers: cgiboudeaux, kwrite-devel, kde-frameworks-devel

Tags: Framework: Syntax Highlighting, Kate, Frameworks

Differential Revision: https://phabricator.kde.org/D23208