cmakeopc-uaconanopen62541

Generating custom OPC-UA information model with open62541 and CMake using conan


How to generate custom information model using open62541 package build with conan and CMakeLists.txt?

Currently I get "warning MSB8065: Custom build for item x succeeded, but specified output x has not been created." and no .c and .h files are generated.

I use windows with VS compiler v17. I can succeed in generation of the files with manual command: python C:/.conan/62d0ea/1/res/tools/nodeset_compiler/nodeset_compiler.py --types-array=UA_TYPES --existing C:/.conan/29713a/1/src/deps/ua-nodeset/Schema/Opc.Ua.NodeSet2.xml --xml myNS.xml myNS

In CMake I use macro provided by the open62541 package:

include(open62541Macros)
set(open62541_TOOLS_DIR ${CONAN_USER_OPEN62541_tools_dir})
set(open62541_NODESET_DIR "C:/.conan/ab654d/1/src/deps/ua-nodeset")

# Generate custom namespace and data types
ua_generate_nodeset_and_datatypes(
    NAME "myNamespace"
    FILE_NS "${PROJECT_SOURCE_DIR}/myNS.xml"
    DEPENDS_TYPES "UA_TYPES"
)

Solution

  • The problem is with the Visual Studio. Using gcc compiler works fine.