High Performance OPC UA Server SDK  1.3.1.248
CMakeLists.txt
project(uaserver_minimal C)
cmake_minimum_required(VERSION 3.0)
display_project_header()
# include sdk.cmake delivered with the SDK
include(../../sdk.cmake)
option(UASERVER_MINIMAL_WITH_GETOPT "Enable commandline arguments in uaserver_minimal" ON)
# create list of source files
set(SOURCES
server_main.c
provider_minimal.c
)
# create list of header files
set(HEADERS
provider_mimimal.h
)
# optional sources
if (UAPROVIDER_SERVER_USE_STATIC_ADDR)
set(SOURCES ${SOURCES} ../ns0/ns0.c)
endif()
if (UASERVER_MINIMAL_WITH_GETOPT)
add_definitions(-DWITH_COMMANDLINE_ARGS)
set(SOURCES ${SOURCES} "args.c")
set(HEADERS ${HEADERS} "args.h")
endif()
# create executable
add_executable(${PROJECT_NAME} ${SOURCES} ${SDK_BSP_SRCS} ${SDK_ASM_SRCS})
# specify libraries to link
target_link_libraries(${PROJECT_NAME}
${SDK_SERVER_LIBRARIES}
${SDK_BASE_LIBRARIES}
${OS_LIBS} ${SDK_SYSTEM_LIBS}
)
# add optional install target
install(TARGETS ${PROJECT_NAME} DESTINATION bin COMPONENT examples)
# MS Visual Studio settings
include(VSSetDebugConfig)
vs_set_debug_config(TARGET ${PROJECT_NAME}
INSTALL_DIR_EXECUTABLE
WORKING_DIR "${CMAKE_INSTALL_PREFIX}/bin")
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Applications/Examples)