Przeglądaj źródła

adding methodcalls and subscriptions to the ua_config.h.in in order to support them with single-file distros

Stasik0 9 lat temu
rodzic
commit
24565aa4bf
2 zmienionych plików z 4 dodań i 2 usunięć
  1. 2 2
      CMakeLists.txt
  2. 2 0
      include/ua_config.h.in

+ 2 - 2
CMakeLists.txt

@@ -118,7 +118,7 @@ file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/src_generated")
 
 option(ENABLE_SUBSCRIPTIONS "Enable compilation of subscription and monitoring support." OFF)
 if(ENABLE_SUBSCRIPTIONS)
-  add_definitions(-DENABLE_SUBSCRIPTIONS)
+  set(ENABLE_SUBSCRIPTIONS ON) #to propagate it to the config file
   list(APPEND lib_sources ${PROJECT_SOURCE_DIR}/src/server/ua_services_subscription.c
                           ${PROJECT_SOURCE_DIR}/src/server/ua_subscription.c
                           ${PROJECT_SOURCE_DIR}/src/server/ua_subscription_manager.c)
@@ -185,7 +185,7 @@ set(UA_LOGLEVEL 300 CACHE STRING "Level at which logs shall be reported")
 # Enable Methodcall service
 option(ENABLE_METHODCALLS "Enable CallMethod/MethodCall service set" OFF)
 if(ENABLE_METHODCALLS)
-    add_definitions(-DENABLE_METHODCALLS)
+    set(ENABLE_METHODCALLS ON) #to propagate it to the config file
     list(APPEND lib_sources ${PROJECT_SOURCE_DIR}/src/server/ua_services_call.c)
 endif()
 

+ 2 - 0
include/ua_config.h.in

@@ -7,6 +7,8 @@
 
 #define UA_LOGLEVEL ${UA_LOGLEVEL}
 #cmakedefine UA_MULTITHREADING
+#cmakedefine ENABLE_METHODCALLS
+#cmakedefine ENABLE_SUBSCRIPTIONS
 
 /* Function Export */
 #ifdef _WIN32