source_set("engine") {
  sources =
      [
        "animatable.cc",
        "animatable.h",
        "animator.cc",
        "animator.h",
        "audio/audio_base.cc",
        "audio/audio_base.h",
        "audio/audio_forward.h",
        "audio/audio_resource.cc",
        "audio/audio_resource.h",
        "audio/audio_sample.h",
        "audio/audio.h",
        "drawable.cc",
        "drawable.h",
        "engine.cc",
        "engine.h",
        "font.cc",
        "font.h",
        "game_factory.h",
        "game.h",
        "image_quad.cc",
        "image_quad.h",
        "image.cc",
        "image.h",
        "input_event.h",
        "mesh.cc",
        "mesh.h",
        "persistent_data.cc",
        "persistent_data.h",
        "platform/asset_file.cc",
        "platform/asset_file.h",
        "platform/platform_base.cc",
        "platform/platform_base.h",
        "platform/platform_forward.h",
        "platform/platform.h",
        "renderer/geometry.cc",
        "renderer/geometry.h",
        "renderer/opengl/opengl.h",
        "renderer/opengl/render_command.cc",
        "renderer/opengl/render_command.h",
        "renderer/opengl/renderer_opengl.cc",
        "renderer/opengl/renderer_opengl.h",
        "renderer/render_resource.cc",
        "renderer/render_resource.h",
        "renderer/renderer_types.cc",
        "renderer/renderer_types.h",
        "renderer/renderer.h",
        "renderer/shader.cc",
        "renderer/shader.h",
        "renderer/texture.cc",
        "renderer/texture.h",
        "renderer/vulkan/renderer_vulkan_linux.cc",
        "renderer/vulkan/renderer_vulkan.cc",
        "renderer/vulkan/vulkan_context_linux.cc",
        "renderer/vulkan/vulkan_context.cc",
        "shader_source.cc",
        "shader_source.h",
        "solid_quad.cc",
        "solid_quad.h",
        "sound_player.cc",
        "sound_player.h",
        "sound.cc",
        "sound.h",
      ]

      defines = [
        "VK_USE_PLATFORM_XLIB_KHR",
        "VULKAN_NON_CMAKE_BUILD",
        "SYSCONFDIR=\"/etc\"",
        "FALLBACK_DATA_DIRS=\"/usr/local/share:/usr/share\"",
        "FALLBACK_CONFIG_DIRS=\"/etc/xdg\"",
        "HAVE_SECURE_GETENV",
      ]

      ldflags = [] libs = []

      if (target_os == "linux") {
    sources +=
        [
          "audio/audio_alsa.cc",
          "audio/audio_alsa.h",
          "platform/asset_file_linux.cc",
          "platform/platform_linux.cc",
          "platform/platform_linux.h",
          "renderer/opengl/renderer_opengl_linux.cc",
        ]

#ldflags += ["-L/usr/X11R6/lib"]

        libs += [ "X11", "GL", "asound", "pthread" ]
  }

  if (target_os == "android") {
    sources += [
      "audio/audio_oboe.cc",
      "audio/audio_oboe.h",
      "platform/asset_file_android.cc",
      "platform/platform_android.cc",
      "platform/platform_android.h",
      "renderer/renderer_android.cc",
    ]

#ldflags += ["-L/usr/X11R6/lib"]

#libs += ["X11", "rt", "pthread"]
  }

  deps = []
}
