aboutsummaryrefslogtreecommitdiff
path: root/data/CMakeLists.txt
blob: 2a60d058b66e8858af26f93736951a9670ac82e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# ayatana-indicator3-0.4.pc

if (FLAVOUR_GTK3)
    if (ENABLE_IDO)
        configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator3.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.${API_VERSION}.pc" @ONLY)
    else()
        configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator3-no-IDO.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.${API_VERSION}.pc" @ONLY)
    endif()
    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.${API_VERSION}.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
else()
    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-0.${API_VERSION}.pc" @ONLY)
    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-0.${API_VERSION}.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
endif()

# ayatana-indicators.target (only required once, so let's do it with FLAVOUR_GTK3)

if (FLAVOUR_GTK3)

    pkg_check_modules(SYSTEMD systemd)

    if (${SYSTEMD_FOUND})
        if (${SYSTEMD_VERSION} VERSION_LESS 247)
            set(SYSTEMD_USER_UNIT_DIR ${CMAKE_INSTALL_PREFIX}/lib/systemd/user)
        else()
            pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemd_user_unit_dir)
        endif()
        install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicators.target" DESTINATION "${SYSTEMD_USER_UNIT_DIR}")
    endif()

endif()