CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
PROJECT(bf-level-editor)

SET( BF_LE_TARGET_NAME bf-level-editor )

INCLUDE_DIRECTORIES( .. ${BEAR_FACTORY_EDITOR_INCLUDE_DIRECTORY})

#-------------------------------------------------------------------------------
SET( BF_LE_SOURCE_FILES
  code/about_dialog.cpp
  code/clone_selection_dialog.cpp
  code/configuration.cpp
  code/error_check_level_dialog.cpp
  code/grid.cpp
  code/grid_properties_frame.cpp
  code/gui_level.cpp
  code/ingame_view.cpp
  code/ingame_view_frame.cpp
  code/item_choice_frame.cpp
  code/item_selection.cpp
  code/layer.cpp
  code/layer_list_frame.cpp
  code/layer_properties_frame.cpp
  code/level.cpp
  code/level_editor.cpp
  code/level_file_xml_reader.cpp
  code/level_file_xml_writer.cpp
  code/level_overview_frame.cpp
  code/level_properties_frame.cpp
  code/level_thumbnail_ctrl.cpp
  code/main.cpp
  code/main_frame.cpp
  code/offset_selection_dialog.cpp
  code/properties_frame.cpp
  code/windows_layout.cpp

  history/code/action_add_item.cpp
  history/code/action_add_layer.cpp
  history/code/action_align_selection_bottom.cpp
  history/code/action_align_selection_center_x.cpp
  history/code/action_align_selection_center_y.cpp
  history/code/action_align_selection_left.cpp
  history/code/action_align_selection_right.cpp
  history/code/action_align_selection_top.cpp
  history/code/action_clone_selection.cpp
  history/code/action_copy_selection.cpp
  history/code/action_delete_selection.cpp
  history/code/action_group.cpp
  history/code/action_move_layer_backward.cpp
  history/code/action_move_layer_forward.cpp
  history/code/action_move_selection.cpp
  history/code/action_paste_from_clipboard.cpp
  history/code/action_remove_item.cpp
  history/code/action_remove_layer.cpp
  history/code/action_resize_layer.cpp
  history/code/action_resize_level.cpp
  history/code/action_set_item_bottom.cpp
  history/code/action_set_item_class.cpp
  history/code/action_set_item_fixed_attribute.cpp
  history/code/action_set_item_id.cpp
  history/code/action_set_item_left.cpp
  history/code/action_set_item_position.cpp
  history/code/action_set_item_position_and_size.cpp
  history/code/action_set_item_size.cpp
  history/code/level_history.cpp
)

INCLUDE(${wxWidgets_USE_FILE})

ADD_EXECUTABLE( ${BF_LE_TARGET_NAME} ${BF_LE_SOURCE_FILES} )

TARGET_LINK_LIBRARIES(
  ${BF_LE_TARGET_NAME}
  bear-editor
  ${wxWidgets_LIBRARIES}
  ${CLAW_CONFIGURATION_FILE_LIBRARIES}
  ${CLAW_LOGGER_LIBRARIES}
  ${Boost_FILESYSTEM_LIBRARY}
  )

INSTALL(
  TARGETS ${BF_LE_TARGET_NAME}
  DESTINATION "${BEAR_FACTORY_INSTALL_EXECUTABLE_DIR}"
  )
