diff --git a/CMakeLists.txt b/CMakeLists.txt index e9f002f1f83..56af8ab86b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1115,17 +1115,22 @@ endif() set(UA_FILE_NODESETS) # List of nodeset-xml files to be considered in the generated information model set(UA_NODESET_DIR ${PROJECT_SOURCE_DIR}/deps/ua-nodeset CACHE STRING "The path to the node-set directory (e.g. from https://github.com/OPCFoundation/UA-Nodeset)") +unset(UA_FILE_NS0_PRIVATE) +if(UA_FILE_NS0) + set(UA_FILE_NS0_PRIVATE "${UA_FILE_NS0}") +endif() + if(UA_NAMESPACE_ZERO STREQUAL "FULL") # Use the "full" schema files also for datatypes and statuscodes set(UA_SCHEMA_DIR ${UA_NODESET_DIR}/Schema CACHE INTERNAL "") # Set the full Nodeset for NS0 - if(NOT UA_FILE_NS0) - set(UA_FILE_NS0 ${UA_SCHEMA_DIR}/Opc.Ua.NodeSet2.xml CACHE INTERNAL "") + if(NOT UA_FILE_NS0_PRIVATE) + set(UA_FILE_NS0_PRIVATE ${UA_SCHEMA_DIR}/Opc.Ua.NodeSet2.xml) endif() # Check that the submodule was checked out or manually downloaded into the folder - if(NOT EXISTS "${UA_FILE_NS0}") + if(NOT EXISTS "${UA_FILE_NS0_PRIVATE}") message(STATUS "Submodule update") execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive RESULT_VARIABLE GIT_SUBMOD_RESULT) @@ -1138,8 +1143,8 @@ else() set(UA_SCHEMA_DIR ${PROJECT_SOURCE_DIR}/tools/schema CACHE INTERNAL "") # Set the reduced Nodeset for NS0 - if(NOT UA_FILE_NS0) - set(UA_FILE_NS0 ${UA_SCHEMA_DIR}/Opc.Ua.NodeSet2.Reduced.xml CACHE INTERNAL "") + if(NOT UA_FILE_NS0_PRIVATE) + set(UA_FILE_NS0_PRIVATE ${UA_SCHEMA_DIR}/Opc.Ua.NodeSet2.Reduced.xml CACHE INTERNAL "") endif() # Set feature-specific datatypes definitions and nodesets @@ -1189,7 +1194,7 @@ else() endif() endif() -list(INSERT UA_FILE_NODESETS 0 "${UA_FILE_NS0}") +list(INSERT UA_FILE_NODESETS 0 "${UA_FILE_NS0_PRIVATE}") set(UA_FILE_NODEIDS ${UA_SCHEMA_DIR}/NodeIds.csv) set(UA_FILE_STATUSCODES ${UA_SCHEMA_DIR}/StatusCode.csv) set(UA_FILE_TYPES_BSD ${UA_SCHEMA_DIR}/Opc.Ua.Types.bsd)