summaryrefslogtreecommitdiff
path: root/debian/patches/solid_no_double_build.diff
blob: 96fe30fca929ce05c0781ff04966ca83f16255b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
 solid/solid/CMakeLists.txt |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/solid/solid/CMakeLists.txt
+++ b/solid/solid/CMakeLists.txt
@@ -366,7 +366,14 @@
 install(FILES org.freedesktop.PowerManagement.Inhibit.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
 
 ########### static lib for tests  ###############
+macro(AUTOMOC_COPY _from_target _to_target)
+    set(_srcfile ${CMAKE_CURRENT_BINARY_DIR}/${_from_target}_automoc.cpp)
+    set(_dstfile ${CMAKE_CURRENT_BINARY_DIR}/${_to_target}_automoc.cpp)
+    add_custom_command(OUTPUT ${_dstfile} COMMAND ${CMAKE_COMMAND} -E copy
+        ${_srcfile} ${_dstfile} MAIN_DEPENDENCY ${_srcfile})
+endmacro(AUTOMOC_COPY _from_target _to_target)
 
+automoc_copy(solid solid_static)
 kde4_add_library(solid_static STATIC ${solid_LIB_SRCS})
 
 target_link_libraries(solid_static ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY} ${solid_OPTIONAL_LIBS})