Ver código fonte

added static library to be produced on every build, minor build fix for windows

Stasik0 10 anos atrás
pai
commit
9461755d8e
3 arquivos alterados com 7 adições e 5 exclusões
  1. 3 1
      CMakeLists.txt
  2. 2 2
      include/ua_server.h
  3. 2 2
      src/server/ua_server_worker.c

+ 3 - 1
CMakeLists.txt

@@ -148,8 +148,10 @@ else()
     list(APPEND lib_sources src/server/ua_nodestore.c)
 endif()
 
-add_library(open62541-objects OBJECT ${lib_sources}) # static version that exports all symbols
+add_library(open62541-objects OBJECT ${lib_sources}) 
 add_library(open62541 SHARED $<TARGET_OBJECTS:open62541-objects>)
+add_library(open62541-static STATIC $<TARGET_OBJECTS:open62541-objects>)
+SET_TARGET_PROPERTIES(open62541-static PROPERTIES OUTPUT_NAME open62541 CLEAN_DIRECT_OUTPUT 1) # static version that exports all symbols
 target_compile_definitions(open62541-objects PUBLIC UA_DYNAMIC_LINKING)
 
 ## logging

+ 2 - 2
include/ua_server.h

@@ -105,7 +105,7 @@ typedef struct UA_WorkItem {
  * @param work Pointer to the WorkItem that shall be added. The pointer is not
  *        freed but copied to an internal representation.
  *
- * @param time The time when the work shall be executed. If the time lies in the
+ * @param executionTime The time when the work shall be executed. If the time lies in the
  *        past, the work will be executed in the next iteration of the server's
  *        main loop
  *
@@ -116,7 +116,7 @@ typedef struct UA_WorkItem {
  * @return Upon sucess, UA_STATUSCODE_GOOD is returned. An error code otherwise.
  */
 UA_StatusCode UA_EXPORT UA_Server_addTimedWorkItem(UA_Server *server, const UA_WorkItem *work,
-                                                   UA_DateTime time, UA_Guid *resultWorkGuid);
+                                                   UA_DateTime executionTime, UA_Guid *resultWorkGuid);
 
 /**
  * @param server The server object.

+ 2 - 2
src/server/ua_server_worker.c

@@ -200,9 +200,9 @@ static UA_StatusCode addTimedWork(UA_Server *server, const UA_WorkItem *item, UA
 }
 
 // Currently, these functions need to get the server mutex, but should be sufficiently fast
-UA_StatusCode UA_Server_addTimedWorkItem(UA_Server *server, const UA_WorkItem *work, UA_DateTime time,
+UA_StatusCode UA_Server_addTimedWorkItem(UA_Server *server, const UA_WorkItem *work, UA_DateTime executionTime,
                                          UA_Guid *resultWorkGuid) {
-    return addTimedWork(server, work, time, 0, resultWorkGuid);
+    return addTimedWork(server, work, executionTime, 0, resultWorkGuid);
 }
 
 UA_StatusCode UA_Server_addRepeatedWorkItem(UA_Server *server, const UA_WorkItem *work, UA_UInt32 interval,