if(NOT BUILD_SAMPLES)
  return()
endif()

if(BUILD_CXX_SAMPLES)
  file(GLOB CXX_SRCS "*.cc")
  foreach(SAMPLE IN LISTS CXX_SRCS)
    add_cxx_sample(${SAMPLE})
  endforeach()
endif()

if(BUILD_PYTHON_SAMPLES)
  file(GLOB PYTHON_SRCS "*.py")
  foreach(SAMPLE IN LISTS PYTHON_SRCS)
    add_python_sample(${SAMPLE})
  endforeach()
endif()

if(BUILD_JAVA_SAMPLES)
  file(GLOB JAVA_SRCS "*.java")
  foreach(SAMPLE IN LISTS JAVA_SRCS)
    add_java_sample(${SAMPLE})
  endforeach()
endif()

if(BUILD_DOTNET_SAMPLES)
  file(GLOB DOTNET_SRCS "*.cs")
  foreach(SAMPLE IN LISTS DOTNET_SRCS)
    add_dotnet_sample(${SAMPLE})
  endforeach()
endif()
