File: CMakeLists.txt

package info (click to toggle)
kexi 1:3.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 29,524 kB
  • sloc: cpp: 98,982; ansic: 4,492; sql: 955; sh: 628; python: 556; xml: 350; java: 107; makefile: 20
file content (40 lines) | stat: -rw-r--r-- 1,887 bytes parent folder | download
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
32
33
34
35
36
37
38
39
40
# Adds app icons, updates the source_var list
macro(kexi_add_app_icons source_var)
    set(_files
        ${CMAKE_CURRENT_SOURCE_DIR}/data/16-apps-kexi.png
        ${CMAKE_CURRENT_SOURCE_DIR}/data/32-apps-kexi.png
        ${CMAKE_CURRENT_SOURCE_DIR}/data/48-apps-kexi.png
        ${CMAKE_CURRENT_SOURCE_DIR}/data/64-apps-kexi.png
        ${CMAKE_CURRENT_SOURCE_DIR}/data/128-apps-kexi.png
        ${CMAKE_CURRENT_SOURCE_DIR}/data/256-apps-kexi.png
    )
    if(NOT APPLE)
        # Add larger icons. Not on Mac because iconutil is limited to 256x256 on at least
        # OS X 10.9; that size is probably large enough not to bother testing for OS version here.
        list(APPEND _files
            ${CMAKE_CURRENT_SOURCE_DIR}/data/512-apps-kexi.png
            ${CMAKE_CURRENT_SOURCE_DIR}/data/1024-apps-kexi.png
        )
    endif()
    ecm_add_app_icon(${source_var} ICONS ${_files})
    ecm_install_icons(ICONS ${_files}
                      DESTINATION ${ICON_INSTALL_DIR}
                      THEME hicolor)
    list(APPEND ${source_var} ${_files})
    unset(_files)
endmacro()

# Adds metadata files to the source_var list
macro(kexi_add_app_metadata_files source_var)
    list(APPEND ${source_var}
         ${CMAKE_CURRENT_SOURCE_DIR}/data/org.kde.kexi.desktop.cmake
         ${CMAKE_CURRENT_SOURCE_DIR}/data/org.kde.kexi.appdata.xml)
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/org.kde.kexi.desktop.cmake
                   ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kexi-${KEXI_DISTRIBUTION_VERSION}.desktop)

    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kexi-${KEXI_DISTRIBUTION_VERSION}.desktop
            DESTINATION ${XDG_APPS_INSTALL_DIR})
    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/org.kde.kexi.appdata.xml
            DESTINATION ${CMAKE_INSTALL_METAINFODIR}
            RENAME org.kde.kexi-${KEXI_DISTRIBUTION_VERSION}.appdata.xml)
endmacro()