config.h.in 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #ifndef UA_CONFIG_H_
  5. #define UA_CONFIG_H_
  6. /**
  7. * open62541 Version
  8. * ----------------- */
  9. #define UA_OPEN62541_VER_MAJOR ${OPEN62541_VER_MAJOR}
  10. #define UA_OPEN62541_VER_MINOR ${OPEN62541_VER_MINOR}
  11. #define UA_OPEN62541_VER_PATCH ${OPEN62541_VER_PATCH}
  12. #define UA_OPEN62541_VER_LABEL "${OPEN62541_VER_LABEL}" /* Release candidate label, etc. */
  13. #define UA_OPEN62541_VER_COMMIT "${OPEN62541_VER_COMMIT}"
  14. /**
  15. * Feature Options
  16. * ---------------
  17. * Changing the feature options has no effect on a pre-compiled library. */
  18. #define UA_LOGLEVEL ${UA_LOGLEVEL}
  19. #ifndef UA_ENABLE_AMALGAMATION
  20. #cmakedefine UA_ENABLE_AMALGAMATION
  21. #endif
  22. #cmakedefine UA_ENABLE_METHODCALLS
  23. #cmakedefine UA_ENABLE_NODEMANAGEMENT
  24. #cmakedefine UA_ENABLE_SUBSCRIPTIONS
  25. #cmakedefine UA_ENABLE_PUBSUB
  26. #cmakedefine UA_ENABLE_PUBSUB_ETH_UADP
  27. #cmakedefine UA_ENABLE_PUBSUB_DELTAFRAMES
  28. #cmakedefine UA_ENABLE_PUBSUB_INFORMATIONMODEL
  29. #cmakedefine UA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS
  30. #cmakedefine UA_ENABLE_DA
  31. #cmakedefine UA_ENABLE_ENCRYPTION
  32. #cmakedefine UA_ENABLE_HISTORIZING
  33. #cmakedefine UA_ENABLE_MICRO_EMB_DEV_PROFILE
  34. #cmakedefine UA_ENABLE_EXPERIMENTAL_HISTORIZING
  35. #cmakedefine UA_ENABLE_SUBSCRIPTIONS_EVENTS
  36. #cmakedefine UA_ENABLE_JSON_ENCODING
  37. #cmakedefine UA_ENABLE_PUBSUB_MQTT
  38. /* Multithreading */
  39. #cmakedefine UA_ENABLE_IMMUTABLE_NODES
  40. #define UA_MULTITHREADING ${UA_MULTITHREADING}
  41. #if UA_MULTITHREADING >= 200 && !defined(UA_ENABLE_IMMUTABLE_NODES)
  42. #error "The multithreading feature requires nodes to be immutable"
  43. #endif
  44. /* Advanced Options */
  45. #cmakedefine UA_ENABLE_STATUSCODE_DESCRIPTIONS
  46. #cmakedefine UA_ENABLE_TYPEDESCRIPTION
  47. #cmakedefine UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS
  48. #cmakedefine UA_ENABLE_DETERMINISTIC_RNG
  49. #cmakedefine UA_ENABLE_DISCOVERY
  50. #cmakedefine UA_ENABLE_DISCOVERY_MULTICAST
  51. #cmakedefine UA_ENABLE_WEBSOCKET_SERVER
  52. #cmakedefine UA_ENABLE_QUERY
  53. #cmakedefine UA_ENABLE_MALLOC_SINGLETON
  54. #cmakedefine UA_ENABLE_DISCOVERY_SEMAPHORE
  55. #cmakedefine UA_ENABLE_UNIT_TEST_FAILURE_HOOKS
  56. #cmakedefine UA_ENABLE_VALGRIND_INTERACTIVE
  57. #define UA_VALGRIND_INTERACTIVE_INTERVAL ${UA_VALGRIND_INTERACTIVE_INTERVAL}
  58. #cmakedefine UA_GENERATED_NAMESPACE_ZERO
  59. #cmakedefine UA_ENABLE_PUBSUB_CUSTOM_PUBLISH_HANDLING
  60. #cmakedefine UA_PACK_DEBIAN
  61. /* Options for Debugging */
  62. #cmakedefine UA_DEBUG
  63. #cmakedefine UA_DEBUG_DUMP_PKGS
  64. /**
  65. * Function Export
  66. * ---------------
  67. * On Win32: Define ``UA_DYNAMIC_LINKING`` and ``UA_DYNAMIC_LINKING_EXPORT`` in
  68. * order to export symbols for a DLL. Define ``UA_DYNAMIC_LINKING`` only to
  69. * import symbols from a DLL.*/
  70. #cmakedefine UA_DYNAMIC_LINKING
  71. /* Shortcuts for extern "C" declarations */
  72. #if !defined(_UA_BEGIN_DECLS)
  73. # ifdef __cplusplus
  74. # define _UA_BEGIN_DECLS extern "C" {
  75. # else
  76. # define _UA_BEGIN_DECLS
  77. # endif
  78. #endif
  79. #if !defined(_UA_END_DECLS)
  80. # ifdef __cplusplus
  81. # define _UA_END_DECLS }
  82. # else
  83. # define _UA_END_DECLS
  84. # endif
  85. #endif
  86. /* Select default architecture if non is selected through CMake or compiler define */
  87. #if ${UA_ARCHITECTURES_NODEF}
  88. # ifdef _WIN32
  89. # define UA_ARCHITECTURE_WIN32
  90. # else
  91. # define UA_ARCHITECTURE_POSIX
  92. # endif
  93. #endif
  94. // specific architectures can undef this
  95. #define UA_HAS_GETIFADDR
  96. #include "${UA_ARCHITECTURE}/ua_architecture.h"
  97. #endif /* UA_CONFIG_H_ */