1

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"
)
kkivi
  • 11
  • 2
  • did you just mistype `DEPENDS` as `DEPENDS_TYPES`? `DEPENDS_TYPES` is for `ua_generate_nodeset`- not `ua_generate_nodeset_and_datatypes`. Oh wait they seem to be for different things. – starball May 31 '23 at 19:48
  • Hi, you are correct. Still same result even if I remove DEPENDS_TYPES. I guess I don't need to specify UA_TYPES as depency with this function. – kkivi Jun 02 '23 at 12:40

1 Answers1

0

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

kkivi
  • 11
  • 2