Changeset View
Changeset View
Standalone View
Standalone View
cmake/FindSystemSettings.cmake
- This file was added.
1 | # - Find Plasma's SystemSettings | ||||
---|---|---|---|---|---|
2 | # This module defines the following variables: | ||||
3 | # | ||||
4 | # SystemSettings_FOUND - true if found | ||||
5 | # SystemSettings_PATH - path to the bin (only when found) | ||||
6 | # | ||||
7 | # Copyright (c) 2020 Harald Sitter <sitter@kde.org> | ||||
8 | # | ||||
9 | # Redistribution and use in source and binary forms, with or without | ||||
10 | # modification, are permitted provided that the following conditions | ||||
11 | # are met: | ||||
12 | # 1. Redistributions of source code must retain the above copyright | ||||
13 | # notice, this list of conditions and the following disclaimer. | ||||
14 | # 2. Redistributions in binary form must reproduce the above copyright | ||||
15 | # notice, this list of conditions and the following disclaimer in the | ||||
16 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||||
17 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||||
18 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
19 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
20 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
21 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
22 | # SUCH DAMAGE. | ||||
23 | | ||||
24 | find_program(SystemSettings_PATH "systemsettings5" | ||||
25 | PATHS ${KDE_INSTALL_FULL_BINDIR} # We symlink by absolute path, so this is the only valid location! | ||||
26 | NO_DEFAULT_PATH | ||||
27 | ) | ||||
28 | | ||||
29 | include(FindPackageHandleStandardArgs) | ||||
30 | find_package_handle_standard_args(SystemSettings | ||||
31 | FOUND_VAR SystemSettings_FOUND | ||||
32 | REQUIRED_VARS SystemSettings_PATH | ||||
33 | ) | ||||
34 | mark_as_advanced(SystemSettings_PATH) |