void-packages/srcpkgs/kdevelop/patches/kdevelop-4.7.3.cmake-allow-dup-targets-in-po-subdirs.patch
2016-04-20 09:36:23 +02:00

21 lines
965 B
Diff

cmake 3.x policy CMP0002 forbids same target name to be defined several times.
But the 30 po/*/CMakeList.txt files do it, so allow it or patch each.
Error message was:
dules/FindGettext.cmake:232 (ADD_CUSTOM_TARGET):
add_custom_target cannot create target "pofiles" because another target
with the same name already exists. The existing target is a custom target
created in source directory "/builddir/kdevelop-4.7.3/po/fi". See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
po/gl/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES)
--- CMakeLists.txt.orig 2016-01-22 19:20:15.000000000 +0100
+++ CMakeLists.txt 2016-04-15 10:41:04.185750138 +0200
@@ -91,4 +91,6 @@
configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake)
include(MacroOptionalAddSubdirectory)
+set_property(GLOBAL
+ PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1)
macro_optional_add_subdirectory( po )