PROJECT(engine)
SET( ENGINE_TARGET_NAME bear_engine )

#-------------------------------------------------------------------------------
SET( ENGINE_SOURCE_FILES
  code/base_item.cpp
  code/camera.cpp
  code/compiled_file.cpp
  code/controller_layout.cpp
  code/font_factory.cpp
  code/game.cpp
  code/game_description.cpp
  code/game_rules.cpp
  code/input_layout.cpp
  code/item_handle.cpp
  code/level.cpp
  code/level_globals.cpp
  code/level_loader.cpp
  code/libraries_pool.cpp
  code/model_file.cpp
  code/player.cpp
  code/pointer_to_player.cpp
  code/population.cpp
  code/resource_pool.cpp
  code/scene_visual.cpp
  code/string_base.cpp
  code/with_animation.cpp
  code/with_sprite.cpp
  code/world.cpp
  collision_event/code/collision_event_kill_player.cpp
  game_action/code/game_action_apply_rules.cpp
  game_action/code/game_action_load_level.cpp
  game_action/code/game_action_set_current_level.cpp
  input_reader/code/input_base_local_reader.cpp
  input_reader/code/input_local_reader.cpp
  input_reader/code/input_local_to_network_reader.cpp
  input_reader/code/input_network_reader.cpp
  input_reader/code/input_null_reader.cpp
  input_reader/code/input_reader.cpp
  layer/code/gui_layer.cpp
  layer/code/layer.cpp
  )

ADD_LIBRARY( ${ENGINE_TARGET_NAME} SHARED ${ENGINE_SOURCE_FILES} )
INSTALL( TARGETS ${ENGINE_TARGET_NAME} DESTINATION ${BEAR_INSTALL_LIBRARY_DIR} )

TARGET_LINK_LIBRARIES(
  ${ENGINE_TARGET_NAME}
  ${SDLMIXER_LIBRARY}
  ${OPENGL_LIBRARIES}
  bear_audio
  bear_communication
  bear_input
  bear_time
  bear_universe
  bear_text
  bear_visual
  ${CLAW_APPLICATION_LIBRARIES}
  ${CLAW_DYNAMIC_LIBRARY_LIBRARIES}
  ${CLAW_GRAPHIC_LIBRARIES}
  ${CLAW_NET_LIBRARIES}
  ${BOOST_FILESYSTEM}
)