[Nix-dev] *.desktop not found in build/data

Markus Schneider MarkusSchn at gmx.de
Tue Mar 14 08:29:44 CET 2017


I suppose the problem is the following cmake macro (Translations.cmake):

macro (configure_file_translation SOURCE RESULT PO_DIR)
    find_program (INTLTOOL_MERGE_EXECUTABLE intltool-merge)
    set(EXTRA_PO_DIR ${PO_DIR}/extra/)
    get_filename_component(EXTRA_PO_DIR ${EXTRA_PO_DIR} ABSOLUTE)

    # Intltool can't create a new directory.
    get_filename_component(RESULT_DIRECTORY ${RESULT} DIRECTORY)
    file(MAKE_DIRECTORY ${RESULT_DIRECTORY})

    set (INTLTOOL_FLAG "")
    if (${SOURCE} MATCHES ".desktop")
        set (INTLTOOL_FLAG "--desktop-style")
    elseif (${SOURCE} MATCHES ".gschema")
        set (INTLTOOL_FLAG "--schemas-style")
    elseif (${SOURCE} MATCHES ".xml")
        set (INTLTOOL_FLAG "--xml-style")
    endif ()
    execute_process (WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${INTLTOOL_MERGE_EXECUTABLE} --quiet ${INTLTOOL_FLAG} ${EXTRA_PO_DIR} ${SOURCE} ${RESULT})
endmacro ()

which is called as 

include (Translations)
configure_file_translation(${CMAKE_SOURCE_DIR}/data/open-pantheon-terminal-here.desktop.in ${CMAKE_BINARY_DIR}/data/open-pantheon-terminal-here.desktop ${CMAKE_SOURCE_DIR}/po/)
configure_file_translation(${CMAKE_SOURCE_DIR}/data/org.pantheon.terminal.desktop.in ${CMAKE_BINARY_DIR}/data/org.pantheon.terminal.desktop ${CMAKE_SOURCE_DIR}/po/)
configure_file_translation(${CMAKE_SOURCE_DIR}/data/pantheon-terminal.appdata.xml.in ${CMAKE_BINARY_DIR}/data/pantheon-terminal.appdata.xml ${CMAKE_SOURCE_DIR}/po/)

in CMakeLists.txt. However I still can't figure out how to solve this problem.


More information about the nix-dev mailing list