|
@@ -105,7 +105,7 @@ set(UA_LOGLEVEL 300 CACHE STRING "Level at which logs shall be reported")
|
|
|
## multithreading
|
|
|
option(ENABLE_MULTITHREADING "Enable multithreading" OFF)
|
|
|
if(ENABLE_MULTITHREADING)
|
|
|
- set(UA_MULTITHREADING ON)
|
|
|
+ add_definitions(-DUA_MULTITHREADING)
|
|
|
find_package(Threads REQUIRED)
|
|
|
list(APPEND lib_sources ${PROJECT_SOURCE_DIR}/src/server/ua_nodestore_concurrent.c)
|
|
|
else()
|
|
@@ -118,7 +118,7 @@ configure_file("src/ua_config.h.in" "${PROJECT_BINARY_DIR}/src_generated/ua_conf
|
|
|
## extensions
|
|
|
option(EXTENSION_UDP "Enable udp extension" OFF)
|
|
|
if(EXTENSION_UDP)
|
|
|
- set(EXTENSION_STATELESS ON)
|
|
|
+ add_definitions(-DEXTENSION_STATELESS)
|
|
|
message(STATUS "Extensions: enabling udp")
|
|
|
add_definitions(-DEXTENSION_UDP)
|
|
|
endif()
|
|
@@ -220,6 +220,11 @@ if(BUILD_EXAMPLECLIENT)
|
|
|
if(ENABLE_MULTITHREADING)
|
|
|
target_link_libraries(exampleClient urcu-cds urcu urcu-common pthread)
|
|
|
endif()
|
|
|
+ if(WIN32)
|
|
|
+ target_link_libraries(exampleClient ws2_32)
|
|
|
+ else()
|
|
|
+ target_link_libraries(exampleClient rt)
|
|
|
+ endif()
|
|
|
if ((CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") AND (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" OR CMAKE_BUILD_TYPE STREQUAL "Release"))
|
|
|
add_custom_command(TARGET exampleClient POST_BUILD COMMAND ${CMAKE_STRIP} $<TARGET_FILE:exampleClient>)
|
|
|
endif()
|