Debian Codegraph @

data/CMakeLists.txt

raw
1 # org.ayatana.common.gschema.xml
2
3 find_package(GSettings REQUIRED)
4 add_schema("org.ayatana.common.gschema.xml")
5
6 # ayatana-indicators.target
7
8 pkg_check_modules(SYSTEMD systemd)
9
10 if (${SYSTEMD_FOUND})
11 if (${SYSTEMD_VERSION} VERSION_LESS 247)
12
13 # This bit now becomes really hacky-whacky...
14
15 # As systemd is a build-requirement, there should be the
16 # systemd unit directory available on the build host, so
17 # let's look for that...
18
19 if (EXISTS "/usr/lib/systemd/user")
20 # Let's try /usr/lib/ ...
21 set(SYSTEMD_USER_UNIT_DIR "/usr/lib/systemd/user")
22 elseif (EXISTS "/usr/lib64/systemd/user")
23 # Let's try /usr/lib64/ ...
24 set(SYSTEMD_USER_UNIT_DIR "/usr/lib64/systemd/user")
25 else()
26 # Fallback to something that fails on Debian and Ubuntu
27 # but might work on other distributions...
28 set(SYSTEMD_USER_UNIT_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/systemd/user")
29 endif()
30
31 else()
32 pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemd_user_unit_dir)
33 endif()
34 install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicators.target" DESTINATION "${SYSTEMD_USER_UNIT_DIR}")
35 endif()