Просмотр исходного кода

Fix wrongly included common architecture files

Jose Cabral лет назад: 6
Родитель
Сommit
38fb5bb338

+ 3 - 0
CMakeLists.txt

@@ -93,6 +93,8 @@ include_directories(${ua_directories_to_include})
 
 GET_PROPERTY(ua_architecture_headers GLOBAL PROPERTY UA_ARCHITECTURE_HEADERS)
 
+GET_PROPERTY(ua_architecture_headers_beginning GLOBAL PROPERTY UA_ARCHITECTURE_HEADERS_BEGINNING)
+
 GET_PROPERTY(ua_architecture_sources GLOBAL PROPERTY UA_ARCHITECTURE_SOURCES)
 
 set(ua_architecture_sources ${ua_architecture_sources}
@@ -385,6 +387,7 @@ else()
 endif()
 
 set(exported_headers ${exported_headers}
+                     ${ua_architecture_headers_beginning}
                      ${PROJECT_BINARY_DIR}/src_generated/ua_config.h 
                      ${PROJECT_SOURCE_DIR}/deps/ms_stdint.h
                      ${PROJECT_BINARY_DIR}/src_generated/ua_statuscodes.h

+ 0 - 2
arch/common/freeRTOS62541.h

@@ -45,6 +45,4 @@
     LOG; \
 }
 
-#define UA_LOG_SOCKET_ERRNO_GAI_WRAP UA_LOG_SOCKET_ERRNO_WRAP
-
 #endif /* ARCH_COMMON_FREERTOS62541_H_ */

+ 2 - 0
arch/common/lwip62541.h

@@ -51,4 +51,6 @@
 
 int gethostname_lwip(char* name, size_t len);
 
+#define UA_LOG_SOCKET_ERRNO_GAI_WRAP UA_LOG_SOCKET_ERRNO_WRAP
+
 #endif /* ARCH_COMMON_LWIP62541_H_ */

+ 3 - 0
arch/freertosLWIP/CMakeLists.txt

@@ -14,5 +14,8 @@ if (${_index} GREATER -1 OR "${UA_ARCHITECTURE}" STREQUAL "freertosLWIP")
         if(UA_ARCH_FREERTOS_USE_OWN_MEMORY_FUNCTIONS)
           ua_architecture_add_definitions("-DOPEN62541_FEERTOS_USE_OWN_MEM")
         endif(UA_ARCH_FREERTOS_USE_OWN_MEMORY_FUNCTIONS)
+        ua_add_architecture_header_beginning(${CMAKE_CURRENT_SOURCE_DIR}/../common/freeRTOS62541.h
+                                             ${CMAKE_CURRENT_SOURCE_DIR}/../common/lwip62541.h
+                                                                                                  ) 
     endif()
 endif()

+ 2 - 2
arch/freertosLWIP/ua_architecture.h

@@ -11,8 +11,8 @@
 #ifndef PLUGINS_ARCH_FREERTOSLWIP_UA_ARCHITECTURE_H_
 #define PLUGINS_ARCH_FREERTOSLWIP_UA_ARCHITECTURE_H_
 
-#include <../common/lwip62541.h>
-#include <../common/freeRTOS62541.h>
+#include "../common/lwip62541.h"
+#include "../common/freeRTOS62541.h"
 
 #include "../ua_architecture_functions.h"
 

+ 8 - 1
tools/cmake/macros.cmake

@@ -19,6 +19,13 @@ FUNCTION(ua_add_architecture_header)
     ENDFOREACH(ARG)
 ENDFUNCTION(ua_add_architecture_header)
 
+#Add a new header file to the architecture group at the beginning of it
+FUNCTION(ua_add_architecture_header_beginning)
+    FOREACH(ARG ${ARGV})
+        set_property(GLOBAL APPEND PROPERTY UA_ARCHITECTURE_HEADERS_BEGINNING ${ARG})
+    ENDFOREACH(ARG)
+ENDFUNCTION(ua_add_architecture_header_beginning)
+
 #Add a new source file to the architecture group
 FUNCTION(ua_add_architecture_file)
     FOREACH(ARG ${ARGV})
@@ -45,4 +52,4 @@ FUNCTION(ua_architecture_append_to_library)
     FOREACH(ARG ${ARGV})
         set_property(GLOBAL APPEND PROPERTY UA_ARCHITECTURE_APPEND_TO_LIBRARY ${ARG})
     ENDFOREACH(ARG)
-ENDFUNCTION(ua_architecture_append_to_library)
+ENDFUNCTION(ua_architecture_append_to_library)