CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
PROJECT(plee-the-bear-library)

SET( LIBPTB_TARGET_NAME plee_the_bear )

INCLUDE_DIRECTORIES( ..
  ${BEAR_ENGINE_INCLUDE_DIRECTORY}
  ${BEAR_GENERIC_ITEMS_INCLUDE_DIRECTORY}
  )

#-------------------------------------------------------------------------------
SET( LIBPTB_SOURCE_FILES
  code/action_file_player.cpp
  code/config_file.cpp
  code/controller_config.cpp
  code/controller_layout.cpp
  code/base_bonus.cpp
  code/game_variables.cpp
  code/init.cpp
  code/level_variables.cpp
  code/monster.cpp
  code/player_action.cpp
  code/speaker_item.cpp

  frame/code/frame.cpp
  frame/code/frame_audio.cpp
  frame/code/frame_configure.cpp
  frame/code/frame_game_options.cpp
  frame/code/frame_main_menu.cpp
  frame/code/frame_pause.cpp
  frame/code/frame_password.cpp
  frame/code/frame_player_controls.cpp
  frame/code/frame_screen.cpp
  frame/code/frame_start_menu.cpp
  frame/code/menu.cpp
  frame/code/menu_frame.cpp
  frame/code/message_box.cpp

  item/code/action_file_player_item.cpp
  item/code/action_file_recorder.cpp
  item/code/add_ingame_layers.cpp
  item/code/add_main_menu_layer.cpp
  item/code/air_bubble.cpp
  item/code/air_bubble_generator.cpp
  item/code/azelnut.cpp
  item/code/bonus_box.cpp
  item/code/checkpoint.cpp
  item/code/clingable.cpp
  item/code/corrupting_bonus.cpp
  item/code/demo_level_loader.cpp
  item/code/floating_score.cpp
  item/code/gossipy_item.cpp
  item/code/headstone.cpp
  item/code/hideout_revealing.cpp
  item/code/honeypot.cpp
  item/code/kicker.cpp
  item/code/layer_border.cpp
  item/code/level_exit.cpp
  item/code/level_pusher.cpp
  item/code/level_popper.cpp
  item/code/little_plee.cpp
  item/code/link_on_players.cpp
  item/code/on_players_activator.cpp
  item/code/owl.cpp
  item/code/passive_enemy.cpp
  item/code/player_killer.cpp
  item/code/player_speaker_zone.cpp
  item/code/player_start_position.cpp
  item/code/player_stop_block.cpp
  item/code/power_drop_restriction_zone.cpp
  item/code/power_filter_door.cpp
  item/code/projectile_enemy.cpp
  item/code/projectile_enemy_zone.cpp
  item/code/save_player_position.cpp
  item/code/shared_camera.cpp
  item/code/small_honeypot.cpp
  item/code/soul.cpp
  item/code/spring.cpp
  item/code/timer_kill_players.cpp
  item/code/two_players_only.cpp

  item/plee/code/gauge.cpp
  item/plee/code/plee.cpp
  item/plee/code/state_captive.cpp  
  item/plee/code/state_cling.cpp
  item/plee/code/state_clung_jump.cpp
  item/plee/code/state_crouch.cpp
  item/plee/code/state_dead.cpp
  item/plee/code/state_fall.cpp
  item/plee/code/state_float.cpp
  item/plee/code/state_hang.cpp
  item/plee/code/state_game_over.cpp
  item/plee/code/state_idle.cpp
  item/plee/code/state_injured.cpp
  item/plee/code/state_jump.cpp
  item/plee/code/state_look_upward.cpp
  item/plee/code/state_maintain.cpp
  item/plee/code/state_plee.cpp
  item/plee/code/state_roar.cpp 
  item/plee/code/state_run.cpp
  item/plee/code/state_slap.cpp
  item/plee/code/state_start_cling.cpp
  item/plee/code/state_start_hang.cpp
  item/plee/code/state_start_jump.cpp
  item/plee/code/state_throw.cpp
  item/plee/code/state_sink.cpp
  item/plee/code/state_swimming.cpp
  item/plee/code/state_vertical_jump.cpp
  item/plee/code/state_wait.cpp
  item/plee/code/state_walk.cpp

  item/stone/code/air_fire_stone.cpp
  item/stone/code/air_fire_water_stone.cpp
  item/stone/code/air_water_stone.cpp
  item/stone/code/air_stone.cpp
  item/stone/code/fire_stone.cpp
  item/stone/code/stone.cpp
  item/stone/code/water_fire_stone.cpp
  item/stone/code/water_stone.cpp

  item/forest/code/gorilla.cpp
  item/forest/code/sting.cpp
  item/forest/code/wasp.cpp
  item/forest/code/woodpecker.cpp

  item_brick/code/activate_on_players.cpp

  layer/code/base_debugging_layer.cpp
  layer/code/balloon_layer.cpp
  layer/code/ingame_menu_layer.cpp
  layer/code/item_information_layer.cpp
  layer/code/link_layer.cpp
  layer/code/log_layer.cpp
  layer/code/main_menu_layer.cpp
  layer/code/misc_layer.cpp 
  layer/code/player_arrows_layer.cpp
  layer/code/recent_path_layer.cpp
  layer/code/status_layer.cpp
  layer/code/windows_layer.cpp
  layer/code/wireframe_layer.cpp

  transition_effect/code/game_over_effect.cpp
  transition_effect/code/invincibility_effect.cpp
  transition_effect/code/level_ending_effect.cpp
  transition_effect/code/level_starting_effect.cpp
)

ADD_LIBRARY( ${LIBPTB_TARGET_NAME} MODULE ${LIBPTB_SOURCE_FILES} )
INSTALL(
  TARGETS ${LIBPTB_TARGET_NAME}
  DESTINATION ${PTB_INSTALL_CUSTOM_LIBRARY_DIR}
  )

TARGET_LINK_LIBRARIES(
  ${LIBPTB_TARGET_NAME}
  bear_engine
  bear_generic_items
  bear_gui
  ${CLAW_CONFIGURATION_FILE_LIBRARIES} )
