summaryrefslogtreecommitdiffstats
path: root/gentoo/trinity-base/kdenetwork-filesharing/files/kdenetwork-bug1330i2-fix-filesharing-parallel-compilation.patch
blob: 956b28f4b57648b8cd8135ebac0272ee31a5a47e (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
diff --git a/filesharing/advanced/kcm_sambaconf/CMakeLists.txt b/filesharing/advanced/kcm_sambaconf/CMakeLists.txt
index 41723ee..d466124 100644
--- a/filesharing/advanced/kcm_sambaconf/CMakeLists.txt
+++ b/filesharing/advanced/kcm_sambaconf/CMakeLists.txt
@@ -37,6 +37,24 @@ tde_add_library( filesharesamba STATIC_PIC AUTOMOC
     filemodedlgimpl.cpp smbpasswdfile.cpp passwd.cpp hiddenfileview.cpp
     dictmanager.cpp qmultichecklistitem.cpp smbconfconfigwidget.cpp
     linuxpermissionchecker.cpp expertuserdlg.ui
+  DEPENDENCIES filesharesamba_generate_headers
+)
+
+#  Those headers are also required by target in another subdirectory. 
+# So we have to add such target for our generated header files to avoid
+# race conditions.
+# SEE cmake FAQ: http://www.cmake.org/Wiki/CMake_FAQ
+#
+add_custom_target( filesharesamba_generate_headers 
+  DEPENDS  
+    ${CMAKE_CURRENT_BINARY_DIR}/share.h 
+    ${CMAKE_CURRENT_BINARY_DIR}/share.h 
+    ${CMAKE_CURRENT_BINARY_DIR}/socketoptionsdlg.h
+    ${CMAKE_CURRENT_BINARY_DIR}/userselectdlg.h
+    ${CMAKE_CURRENT_BINARY_DIR}/groupselectdlg.h
+    ${CMAKE_CURRENT_BINARY_DIR}/usertab.h
+    ${CMAKE_CURRENT_BINARY_DIR}/filemodedlg.h
+    ${CMAKE_CURRENT_BINARY_DIR}/expertuserdlg.h
 )
 
 
diff --git a/filesharing/advanced/propsdlgplugin/CMakeLists.txt b/filesharing/advanced/propsdlgplugin/CMakeLists.txt
index 26d94f5..bd96ae6 100644
--- a/filesharing/advanced/propsdlgplugin/CMakeLists.txt
+++ b/filesharing/advanced/propsdlgplugin/CMakeLists.txt
@@ -11,7 +11,8 @@
 
 include_directories(
   ${CMAKE_CURRENT_BINARY_DIR}
-  ${CMAKE_CURRENT_BINARY_DIR}/../kcm_sambaconf
+  ${CMAKE_BINARY_DIR}/filesharing/advanced/kcm_sambaconf
+  ${CMAKE_SOURCE_DIR}/filesharing/advanced/kcm_sambaconf
   ${TDE_INCLUDE_DIR}
   ${TQT_INCLUDE_DIRS}
 )
@@ -32,7 +33,7 @@ install( FILES
 
 tde_add_library( propsdlgplugin_common STATIC_PIC AUTOMOC
   SOURCES propertiespage.cpp propertiespagegui.ui
-  DEPENDENCIES filesharesamba
+  DEPENDENCIES filesharesamba_generate_headers 
 )
 
 
diff --git a/filesharing/advanced/propsdlgplugin/propertiespage.cpp b/filesharing/advanced/propsdlgplugin/propertiespage.cpp
index 5ff1af7..6042b9e 100644
--- a/filesharing/advanced/propsdlgplugin/propertiespage.cpp
+++ b/filesharing/advanced/propsdlgplugin/propertiespage.cpp
@@ -44,9 +44,9 @@
 #include "../nfs/nfsdialog.h"
 
 // Samba related
-#include "../kcm_sambaconf/sambafile.h"
-#include "../kcm_sambaconf/sambashare.h"
-#include "../kcm_sambaconf/sharedlgimpl.h"
+#include "sambafile.h"
+#include "sambashare.h"
+#include "sharedlgimpl.h"
 
 #include "propertiespage.h"