CMakeLists.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. include_directories(${PROJECT_SOURCE_DIR}/include)
  2. include_directories(${PROJECT_BINARY_DIR}/src_generated)
  3. set(LIBS open62541)
  4. if(NOT WIN32)
  5. list(APPEND LIBS rt pthread)
  6. else()
  7. list(APPEND LIBS ws2_32)
  8. endif()
  9. if(MULTITHREADING)
  10. list(APPEND LIBS urcu-cds urcu urcu-common)
  11. endif(MULTITHREADING)
  12. add_executable(server_variable server_variable.c)
  13. target_link_libraries(server_variable ${LIBS})
  14. add_executable(server_repeated_job server_repeated_job.c)
  15. target_link_libraries(server_repeated_job ${LIBS})
  16. add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src_generated/nodeset.h ${PROJECT_BINARY_DIR}/src_generated/nodeset.c
  17. PRE_BUILD
  18. COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/generate_open62541CCode.py -i ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/NodeID_Blacklist_FullNS0.txt ${PROJECT_SOURCE_DIR}/tools/schema/namespace0/Opc.Ua.NodeSet2.xml ${PROJECT_SOURCE_DIR}/examples/server_nodeset.xml ${PROJECT_BINARY_DIR}/src_generated/nodeset
  19. DEPENDS ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/generate_open62541CCode.py
  20. ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/logger.py
  21. ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/open62541_MacroHelper.py
  22. ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_builtin_types.py
  23. ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_constants.py
  24. ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_namespace.py
  25. ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_node_types.py
  26. ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/NodeID_Blacklist_FullNS0.txt
  27. ${PROJECT_SOURCE_DIR}/examples/server_nodeset.xml)
  28. add_executable(server_nodeset server_nodeset.c ${PROJECT_BINARY_DIR}/src_generated/nodeset.c)
  29. target_link_libraries(server_nodeset ${LIBS})
  30. if(ENABLE_METHODCALLS)
  31. add_executable(server_method server_method.c)
  32. target_link_libraries(server_method ${LIBS})
  33. endif()