|
@@ -154,12 +154,6 @@ if(EXTENSION_STATELESS)
|
|
add_definitions(-DEXTENSION_STATELESS)
|
|
add_definitions(-DEXTENSION_STATELESS)
|
|
endif()
|
|
endif()
|
|
|
|
|
|
-option(BUILD_DEMO_NODESET "Create a demo node for every built-in datatype" OFF)
|
|
|
|
-if(BUILD_DEMO_NODESET)
|
|
|
|
- message(STATUS "Enabling demo nodeset")
|
|
|
|
- add_definitions(-DDEMO_NODESET)
|
|
|
|
-endif()
|
|
|
|
-
|
|
|
|
option(ENABLE_AMALGAMATION "Concatenate the library to a single file open62541.h/.c" OFF)
|
|
option(ENABLE_AMALGAMATION "Concatenate the library to a single file open62541.h/.c" OFF)
|
|
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/open62541.h ${PROJECT_BINARY_DIR}/open62541.c
|
|
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/open62541.h ${PROJECT_BINARY_DIR}/open62541.c
|
|
PRE_BUILD
|
|
PRE_BUILD
|
|
@@ -211,23 +205,23 @@ endif()
|
|
option(BUILD_EXAMPLESERVER "Build the example server" OFF)
|
|
option(BUILD_EXAMPLESERVER "Build the example server" OFF)
|
|
if(BUILD_EXAMPLESERVER)
|
|
if(BUILD_EXAMPLESERVER)
|
|
set(server_source $<TARGET_OBJECTS:open62541-object>)
|
|
set(server_source $<TARGET_OBJECTS:open62541-object>)
|
|
- add_executable(exampleServer_static examples/server.c ${server_source})
|
|
|
|
- add_executable(exampleServer_simple examples/server_simple.c ${server_source})
|
|
|
|
- add_executable(exampleServer examples/server.c)
|
|
|
|
- target_link_libraries(exampleServer open62541)
|
|
|
|
|
|
+ add_executable(server_static examples/server.c ${server_source})
|
|
|
|
+ add_executable(server_simple examples/server_simple.c ${server_source})
|
|
|
|
+ add_executable(server examples/server.c)
|
|
|
|
+ target_link_libraries(server open62541)
|
|
if(WIN32)
|
|
if(WIN32)
|
|
- target_link_libraries(exampleServer_static ws2_32)
|
|
|
|
- target_link_libraries(exampleServer_simple ws2_32)
|
|
|
|
- target_link_libraries(exampleServer ws2_32)
|
|
|
|
|
|
+ target_link_libraries(server_static ws2_32)
|
|
|
|
+ target_link_libraries(server_simple ws2_32)
|
|
|
|
+ target_link_libraries(server ws2_32)
|
|
else()
|
|
else()
|
|
- target_link_libraries(exampleServer_static rt)
|
|
|
|
- target_link_libraries(exampleServer_simple rt)
|
|
|
|
- target_link_libraries(exampleServer rt)
|
|
|
|
|
|
+ target_link_libraries(server_static rt)
|
|
|
|
+ target_link_libraries(server_simple rt)
|
|
|
|
+ target_link_libraries(server rt)
|
|
endif()
|
|
endif()
|
|
if(ENABLE_MULTITHREADING)
|
|
if(ENABLE_MULTITHREADING)
|
|
- target_link_libraries(exampleServer_static urcu-cds urcu urcu-common pthread)
|
|
|
|
- target_link_libraries(exampleServer_simple urcu-cds urcu urcu-common pthread)
|
|
|
|
- target_link_libraries(exampleServer urcu-cds urcu urcu-common pthread)
|
|
|
|
|
|
+ target_link_libraries(server_static urcu-cds urcu urcu-common pthread)
|
|
|
|
+ target_link_libraries(server_simple urcu-cds urcu urcu-common pthread)
|
|
|
|
+ target_link_libraries(server urcu-cds urcu urcu-common pthread)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
endif()
|
|
|
|
|
|
@@ -249,27 +243,24 @@ option(BUILD_EXAMPLECLIENT "Build a test client" OFF)
|
|
if(BUILD_EXAMPLECLIENT)
|
|
if(BUILD_EXAMPLECLIENT)
|
|
add_definitions(-DBENCHMARK)
|
|
add_definitions(-DBENCHMARK)
|
|
set(client_source $<TARGET_OBJECTS:open62541-object>)
|
|
set(client_source $<TARGET_OBJECTS:open62541-object>)
|
|
- #if(NOT ENABLE_AMALGAMATION)
|
|
|
|
- # list(APPEND client_source examples/networklayer_tcp.c examples/logger_stdout.c)
|
|
|
|
- #endif()
|
|
|
|
- add_executable(exampleClient_static examples/client.c ${client_source})
|
|
|
|
- add_executable(exampleClient examples/client.c)
|
|
|
|
- target_link_libraries(exampleClient open62541)
|
|
|
|
|
|
+ add_executable(client_static examples/client.c ${client_source})
|
|
|
|
+ add_executable(client examples/client.c)
|
|
|
|
+ target_link_libraries(client open62541)
|
|
if(WIN32)
|
|
if(WIN32)
|
|
- target_link_libraries(exampleClient_static ws2_32)
|
|
|
|
- target_link_libraries(exampleClient ws2_32)
|
|
|
|
|
|
+ target_link_libraries(client_static ws2_32)
|
|
|
|
+ target_link_libraries(client ws2_32)
|
|
else()
|
|
else()
|
|
- target_link_libraries(exampleClient_static rt)
|
|
|
|
- target_link_libraries(exampleClient rt)
|
|
|
|
|
|
+ target_link_libraries(client_static rt)
|
|
|
|
+ target_link_libraries(client rt)
|
|
endif()
|
|
endif()
|
|
if(ENABLE_MULTITHREADING)
|
|
if(ENABLE_MULTITHREADING)
|
|
- target_link_libraries(exampleClient_static urcu-cds urcu urcu-common pthread)
|
|
|
|
- target_link_libraries(exampleClient urcu-cds urcu urcu-common pthread)
|
|
|
|
|
|
+ target_link_libraries(client_static urcu-cds urcu urcu-common pthread)
|
|
|
|
+ target_link_libraries(client urcu-cds urcu urcu-common pthread)
|
|
endif()
|
|
endif()
|
|
if(EXTENSION_STATELESS)
|
|
if(EXTENSION_STATELESS)
|
|
- add_executable(statelessClient examples/client_stateless.c ${client_source})
|
|
|
|
|
|
+ add_executable(client_stateless examples/client_stateless.c ${client_source})
|
|
if(ENABLE_MULTITHREADING)
|
|
if(ENABLE_MULTITHREADING)
|
|
- target_link_libraries(statelessClient urcu-cds urcu urcu-common pthread)
|
|
|
|
|
|
+ target_link_libraries(client_stateless urcu-cds urcu urcu-common pthread)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
endif()
|
|
endif()
|
|
endif()
|