diff options
author | Christian Dywan <christian@twotoasts.de> | 2018-10-06 17:49:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-06 17:49:49 +0200 |
commit | f6f7dcde23407bd61a4568dbd5012fc0221ebfe7 (patch) | |
tree | ba4f3dea97a8f5293e77cd4de218fffb46a9c588 /cmake | |
parent | 8a94c0824715343567811b49378692c113062c42 (diff) | |
download | midori-git-f6f7dcde23407bd61a4568dbd5012fc0221ebfe7.tar.gz |
Fix intltool, gresource and gir targets (#77)
add_custom_command should be used to generate files
rather than add_custom_target which builds unconditionally.
DEPENDS needs to specify all source files.
For gresource.xml all ui files are dependencies.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindIntltool.cmake | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/cmake/FindIntltool.cmake b/cmake/FindIntltool.cmake index bba21772..e4ec4a3a 100644 --- a/cmake/FindIntltool.cmake +++ b/cmake/FindIntltool.cmake @@ -2,7 +2,7 @@ # # Jim Nelson <jim@yorba.org> # Copyright 2012-2013 Yorba Foundation -# Copyright (C) 2013 Christian Dywan +# Copyright (C) 2013-2018 Christian Dywan find_program (INTLTOOL_MERGE_EXECUTABLE intltool-merge) find_program (INTLTOOL_UPDATE_EXECUTABLE intltool-update) @@ -10,17 +10,19 @@ find_program (INTLTOOL_UPDATE_EXECUTABLE intltool-update) if (INTLTOOL_MERGE_EXECUTABLE) set (INTLTOOL_MERGE_FOUND TRUE) macro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir) - add_custom_target ("${desktop_id}.desktop" ALL - ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir} - ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.desktop.in ${desktop_id}.desktop + add_custom_command (OUTPUT ${desktop_id}.desktop + COMMAND ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir} + ${desktop_id}.desktop.in ${desktop_id}.desktop + DEPENDS ${desktop_id}.desktop.in ) install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${desktop_id}.desktop" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") endmacro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir) macro (INTLTOOL_MERGE_APPDATA desktop_id po_dir) - add_custom_target ("${desktop_id}.appdata.xml" ALL - ${INTLTOOL_MERGE_EXECUTABLE} --xml-style ${CMAKE_SOURCE_DIR}/${po_dir} - ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.appdata.xml.in ${desktop_id}.appdata.xml + add_custom_target (OUTPUT "${desktop_id}.appdata.xml" + COMMAND ${INTLTOOL_MERGE_EXECUTABLE} --xml-style ${CMAKE_SOURCE_DIR}/${po_dir} + ${desktop_id}.appdata.xml.in ${desktop_id}.appdata.xml + DEPENDS ${desktop_id}.appdata.xml.in ) install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${desktop_id}.appdata.xml" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/appdata") |