option(FREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR "Use <vendor>/<product> path for resources" OFF)

function(get_sysconf_dir name result)
  set(CONF_FILE ${PRODUCT})
  if(WITH_RESOURCE_VERSIONING)
    string(APPEND CONF_FILE "${FREERDP_VERSION_MAJOR}")
  endif()
  if(FREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR)
    string(PREPEND CONF_FILE "${VENDOR}/")
  endif()
  string(PREPEND CONF_FILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/")
  string(APPEND CONF_FILE "${name}")
  set(${result} ${CONF_FILE} PARENT_SCOPE)
endfunction()
