Browse Source

adapting amalgation to support the workaround

Stasik0 10 years ago
parent
commit
0ff237108b
2 changed files with 10 additions and 6 deletions
  1. 3 3
      CMakeLists.txt
  2. 7 3
      examples/networklayer_tcp.c

+ 3 - 3
CMakeLists.txt

@@ -44,13 +44,13 @@ set(exported_headers ${PROJECT_BINARY_DIR}/src_generated/ua_config.h
                      ${PROJECT_SOURCE_DIR}/include/ua_connection.h
                      ${PROJECT_SOURCE_DIR}/include/ua_log.h
                      ${PROJECT_SOURCE_DIR}/include/ua_server.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_client.h)
+                     ${PROJECT_SOURCE_DIR}/include/ua_client.h
+                     ${PROJECT_BINARY_DIR}/src_generated/ua_transport_generated.h	#TODO: needed until networklayer_tcp is fixed properly
+                     ${PROJECT_SOURCE_DIR}/src/ua_types_encoding_binary.h) 			#TODO: needed until networklayer_tcp is fixed properly
 set(internal_headers ${PROJECT_SOURCE_DIR}/src/ua_util.h
                      ${PROJECT_SOURCE_DIR}/deps/queue.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_transport_generated.h
                      ${PROJECT_SOURCE_DIR}/src/ua_securechannel.h
                      ${PROJECT_SOURCE_DIR}/src/ua_session.h
-                     ${PROJECT_SOURCE_DIR}/src/ua_types_encoding_binary.h
                      ${PROJECT_SOURCE_DIR}/src/server/ua_nodes.h
                      ${PROJECT_SOURCE_DIR}/src/server/ua_nodestore.h
                      ${PROJECT_SOURCE_DIR}/src/server/ua_session_manager.h

+ 7 - 3
examples/networklayer_tcp.c

@@ -31,9 +31,13 @@
 
 #include "networklayer_tcp.h" // UA_MULTITHREADING is defined in here
 
-#include "ua_types.h" //TODO: this is a hack - refactor
-#include "ua_transport_generated.h" //TODO: this is a hack - refactor
-#include "ua_types_encoding_binary.h" //TODO: this is a hack - refactor
+#ifdef NOT_AMALGATED
+	#include "ua_types.h" //TODO: this is a hack - refactor
+	#include "ua_transport_generated.h" //TODO: this is a hack - refactor
+	#include "ua_types_encoding_binary.h" //TODO: this is a hack - refactor
+#else
+    #include "open62541.h"
+#endif
 
 #ifdef UA_MULTITHREADING
 #include <urcu/uatomic.h>