Skip to content

Commit d98b7f2

Browse files
committed
[cmake] Add opcua to configuration.
- The Makefile based OM build system copies the files in the open62541 folder to SimulationRuntime/c/opc/ua and then compiles them there. There is no need to do that. Either just move the files there completely or create a library here and link to it there. The CMake build does the latter. There is a tiny library, libopcua (a.k.a omc::3rd::opcua), created here that can be linked to when needed.
1 parent 7d60c1d commit d98b7f2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ add_library(omc::3rd::Modelica::IO ALIAS ModelicaIO)
135135
add_library(omc::3rd::Modelica::StandardTables ALIAS ModelicaStandardTables)
136136

137137

138+
omc_add_subdirectory(open62541)
139+
add_library(omc::3rd::opcua ALIAS opcua)
140+
138141
# Intel TBB
139142
# set(TBB_BUILD_TESTS OFF CACHE BOOL "Build TBB tests and enable testing infrastructure")
140143
# set(TBB_BUILD_SHARED OFF CACHE BOOL "Build TBB shared library")

open62541/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
project(opcua)
3+
4+
add_library(opcua STATIC)
5+
target_sources(opcua PRIVATE open62541.c)
6+
7+
target_include_directories(opcua PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

0 commit comments

Comments
 (0)