{
    "module": "opcua",
    "testDir": "../../config.tests",

    "commandline": {
        "options": {
            "open62541": { "type": "enum", "values": [ "no", "qt", "system"] }
        }
    },

    "libraries": {
        "open62541": {
            "label": "Open62541",
            "test": "open62541",
            "sources": [
                {
                    "libs": "-lopen62541",
                    "condition": "!config.win32 && input.open62541 == 'system'"
                },
                {
                    "libs": "-lopen62541 -lws2_32",
                    "condition": "config.win32 && input.open62541 == 'system'"
                },
                {
                    "type": "pkgConfig",
                    "args": "open62541",
                    "condition": "input.open62541 == 'system'"
                }
            ]
        },
        "uacpp": {
            "label": "Unified Automation C++ SDK",
            "test": "uacpp",
            "sources": [
                {
                    "type": "uacpp",
                    "builds": {
                        "debug": "-luaclientcppd -luabasecppd -luastackd -luapkicppd -lxmlparsercppd",
                        "release": " -luaclientcpp -luabasecpp -luastack -luapkicpp -lxmlparsercpp"
                    },
                    "libs": "-lCrypt32 -lOle32 -lOleAut32 -lws2_32 -llibeay32 -llibxml2",
                    "condition": "config.win32"
                },
                {
                    "type": "uacpp",
                    "builds": {
                       "debug": "-luaclientcppd -luabasecppd -luastackd -luapkicppd -lxmlparsercppd",
                       "release": "-luaclientcpp -luabasecpp -luastack -luapkicpp -lxmlparsercpp"
                    },
                    "libs": "-lcrypto -lssl -lxml2",
                    "condition": "!config.win32"
                }
            ]
        },
        "mbedtls": {
            "label": "mbedtls",
            "test": "mbedtls",
            "sources": [
                {
                    "libs": "-lmbedx509 -lmbedcrypto"
                }
            ]
        }
    },

    "features": {
        "open62541": {
            "label": "Open62541",
            "output": [ "privateFeature", "feature" ]
        },
        "system-open62541": {
            "label": "Using provided Open62541",
            "enable": "input.open62541 == 'system'",
            "disable": "input.open62541 == 'qt'",
            "condition": "features.open62541 && libs.open62541",
            "output": [ "privateFeature" ]
        },
        "uacpp": {
            "label": "Unified Automation C++ SDK",
            "condition": "libs.uacpp",
            "output": [ "privateFeature" ]
        },
        "mbedtls": {
            "label": "mbedtls",
            "condition": "libs.mbedtls",
            "output": [ "privateFeature" ]
        },
        "ns0idnames": {
            "label": "Support for namespace 0 NodeId names",
            "purpose": "Provides names for the QOpcUa::NodeIds::Namespace0 enum.",
            "output": [ "privateFeature" ]
        },
        "ns0idgenerator": {
            "label": "Namespace 0 NodeIds generator",
            "purpose": "Build a generator for updating the QOpcUa::NodeIds::Namespace0 enum from the NodeIds.csv file.",
            "autoDetect": "false",
            "output": [ "privateFeature" ]
        },
        "gds": {
            "label": "Support for global discovery server",
            "purpose": "Enables QOpcUaClient to interact with a global discovery server",
            "output": [ "privateFeature", "feature" ]
        }
    },

    "summary": [
        {
            "section": "Qt Opcua",
            "entries": [ "open62541", "uacpp", "ns0idnames", "ns0idgenerator", "mbedtls", "gds" ]
        }
    ]
}
