aboutsummaryrefslogtreecommitdiff
path: root/data/CMakeLists.txt
blob: 507df29b7fc3efb95ebd75017c26eccea5937505 (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
31
# ayatana-settings.8

install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.8" DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man8")

# ayatana-settings.desktop

find_package (Intltool REQUIRED)
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.desktop.intl" @ONLY)
intltool_merge_translations ("${CMAKE_PROJECT_NAME}.desktop.intl" "${CMAKE_PROJECT_NAME}.desktop" ALL UTF8)
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.desktop" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/applications")

# icons/ContrastHigh/scalable/apps/ayatana-settings.svg
# icons/hicolor/scalable/apps/ayatana-settings.svg

install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/icons" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}")

# ayatana-settings-gresource.c

find_program (GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED)

add_custom_command (
    OUTPUT "${CMAKE_PROJECT_NAME}-gresource.c"
    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
    COMMAND "${GLIB_COMPILE_RESOURCES}"
    ARGS --target "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-gresource.c" --generate-source "${CMAKE_PROJECT_NAME}.xml"
    VERBATIM
    MAIN_DEPENDENCY "${CMAKE_PROJECT_NAME}.xml"
    DEPENDS "${CMAKE_PROJECT_NAME}.ui"
)

add_custom_target ("data" DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-gresource.c")