Skip to content

Commit

Permalink
[cmake] Add opcua to configuration.
Browse files Browse the repository at this point in the history
  - 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.
  • Loading branch information
mahge committed Jul 21, 2021
1 parent 7d60c1d commit d98b7f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ add_library(omc::3rd::Modelica::IO ALIAS ModelicaIO)
add_library(omc::3rd::Modelica::StandardTables ALIAS ModelicaStandardTables)


omc_add_subdirectory(open62541)
add_library(omc::3rd::opcua ALIAS opcua)

# Intel TBB
# set(TBB_BUILD_TESTS OFF CACHE BOOL "Build TBB tests and enable testing infrastructure")
# set(TBB_BUILD_SHARED OFF CACHE BOOL "Build TBB shared library")
Expand Down
7 changes: 7 additions & 0 deletions open62541/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.14)
project(opcua)

add_library(opcua STATIC)
target_sources(opcua PRIVATE open62541.c)

target_include_directories(opcua PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

0 comments on commit d98b7f2

Please sign in to comment.