2010-08-11 00:49:32 +00:00
|
|
|
# ASE - Allegro Sprite Editor
|
2011-01-20 21:32:31 +00:00
|
|
|
# Copyright (C) 2001-2011 David Capello
|
2010-08-11 00:49:32 +00:00
|
|
|
|
2010-08-25 20:11:28 +00:00
|
|
|
if(MSVC)
|
|
|
|
# Do not link with libcmt.lib (to avoid duplicated symbols with msvcrtd.lib)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT")
|
|
|
|
endif()
|
|
|
|
endif(MSVC)
|
|
|
|
|
2010-08-11 00:49:32 +00:00
|
|
|
# Third-party libraries
|
2011-01-18 23:42:43 +00:00
|
|
|
set(libs3rdparty freetype libart_lgpl loadpng tinyxml giflib)
|
2010-09-30 20:04:32 +00:00
|
|
|
|
|
|
|
if(USE_SHARED_JPEGLIB)
|
|
|
|
find_package(JPEG)
|
|
|
|
if(JPEG_FOUND)
|
|
|
|
set(libs3rdparty ${libs3rdparty} ${JPEG_LIBRARIES})
|
|
|
|
include_directories(${JPEG_INCLUDE_DIR})
|
|
|
|
endif(JPEG_FOUND)
|
|
|
|
else()
|
|
|
|
set(libs3rdparty ${libs3rdparty} jpeg)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_SHARED_ZLIB)
|
|
|
|
find_package(ZLIB)
|
|
|
|
if(ZLIB_FOUND)
|
|
|
|
set(libs3rdparty ${libs3rdparty} ${ZLIB_LIBRARIES})
|
|
|
|
include_directories(${ZLIB_INCLUDE_DIR})
|
|
|
|
endif(ZLIB_FOUND)
|
|
|
|
else()
|
|
|
|
set(libs3rdparty ${libs3rdparty} zlib)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_SHARED_LIBPNG)
|
|
|
|
find_package(PNG)
|
|
|
|
if(PNG_FOUND)
|
|
|
|
set(libs3rdparty ${libs3rdparty} ${PNG_LIBRARIES})
|
|
|
|
add_definitions(${PNG_DEFINITIONS})
|
|
|
|
include_directories(${PNG_INCLUDE_DIR})
|
|
|
|
endif(PNG_FOUND)
|
|
|
|
else()
|
|
|
|
set(libs3rdparty ${libs3rdparty} libpng)
|
|
|
|
endif()
|
2010-08-25 20:11:28 +00:00
|
|
|
|
2011-06-12 13:50:30 +00:00
|
|
|
if(CURL_STATICLIB)
|
|
|
|
add_definitions(-DCURL_STATICLIB)
|
|
|
|
endif()
|
|
|
|
|
2011-04-29 01:32:37 +00:00
|
|
|
if (CMAKE_USE_PTHREADS_INIT)
|
|
|
|
set(sys_libs ${sys_libs} ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
endif()
|
|
|
|
|
2011-07-28 00:26:22 +00:00
|
|
|
# Libraries in this directory
|
2011-07-28 02:08:54 +00:00
|
|
|
set(aseprite_libraries aseprite-library undo-lib filters-lib gui-lib gfx-lib base-lib)
|
2011-07-28 00:26:22 +00:00
|
|
|
|
|
|
|
if(ENABLE_UPDATER)
|
|
|
|
set(libs3rdparty ${libs3rdparty} libcurl)
|
2011-07-28 02:08:54 +00:00
|
|
|
set(aseprite_libraries ${aseprite_libraries} updater-lib net-lib)
|
2011-07-28 00:26:22 +00:00
|
|
|
add_definitions(-DENABLE_UPDATER)
|
|
|
|
endif()
|
|
|
|
|
2010-08-25 20:11:28 +00:00
|
|
|
# All libraries for .exe files
|
2011-07-28 00:26:22 +00:00
|
|
|
set(all_libs ${aseprite_libraries} ${libs3rdparty} allegro ${sys_libs})
|
2010-08-11 00:49:32 +00:00
|
|
|
|
|
|
|
# Directories where .h files can be found
|
|
|
|
include_directories(
|
2010-08-25 20:11:28 +00:00
|
|
|
. .. ../third_party
|
2011-06-12 13:50:30 +00:00
|
|
|
${CURL_DIR}/include
|
2011-01-18 23:42:43 +00:00
|
|
|
${GIFLIB_DIR}/lib
|
2010-08-11 00:49:32 +00:00
|
|
|
${LIBFREETYPE_DIR}/include
|
|
|
|
${LIBJPEG_DIR}
|
|
|
|
${LIBPNG_DIR}
|
|
|
|
${ZLIB_DIR}
|
|
|
|
${LOADPNG_DIR}
|
2010-09-29 20:50:46 +00:00
|
|
|
${TINYXML_DIR})
|
2010-08-11 00:49:32 +00:00
|
|
|
|
2010-09-23 23:28:16 +00:00
|
|
|
######################################################################
|
|
|
|
# Sub-libraries
|
|
|
|
|
2010-10-16 17:30:04 +00:00
|
|
|
add_subdirectory(allegro)
|
2010-09-23 23:28:16 +00:00
|
|
|
add_subdirectory(base)
|
2011-06-12 13:50:30 +00:00
|
|
|
add_subdirectory(filters)
|
2010-09-25 19:22:32 +00:00
|
|
|
add_subdirectory(gfx)
|
2010-09-27 22:18:17 +00:00
|
|
|
add_subdirectory(gui)
|
2011-06-12 13:50:30 +00:00
|
|
|
add_subdirectory(net)
|
2011-03-26 20:40:55 +00:00
|
|
|
add_subdirectory(undo)
|
2011-07-28 00:26:22 +00:00
|
|
|
if(ENABLE_UPDATER)
|
|
|
|
add_subdirectory(updater)
|
|
|
|
endif()
|
2010-09-23 23:28:16 +00:00
|
|
|
|
2010-08-11 00:49:32 +00:00
|
|
|
######################################################################
|
2010-08-25 20:11:28 +00:00
|
|
|
# aseprite library
|
2010-08-11 00:49:32 +00:00
|
|
|
|
2010-08-25 20:11:28 +00:00
|
|
|
add_library(aseprite-library
|
2010-08-11 00:49:32 +00:00
|
|
|
app.cpp
|
|
|
|
check_args.cpp
|
|
|
|
console.cpp
|
|
|
|
context.cpp
|
2011-03-27 17:51:02 +00:00
|
|
|
context_flags.cpp
|
2011-03-23 00:11:25 +00:00
|
|
|
document.cpp
|
2011-03-13 22:41:59 +00:00
|
|
|
documents.cpp
|
2011-06-30 01:51:46 +00:00
|
|
|
drop_files.cpp
|
|
|
|
file_system.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
gfxmode.cpp
|
2010-10-27 20:21:12 +00:00
|
|
|
gui_xml.cpp
|
2011-06-30 01:51:46 +00:00
|
|
|
ini_file.cpp
|
2010-09-18 03:39:10 +00:00
|
|
|
job.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
launcher.cpp
|
2010-09-18 04:14:03 +00:00
|
|
|
log.cpp
|
2011-06-30 01:51:46 +00:00
|
|
|
modules.cpp
|
2011-03-24 21:03:38 +00:00
|
|
|
objects_container_impl.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
recent_files.cpp
|
|
|
|
resource_finder.cpp
|
|
|
|
ui_context.cpp
|
2011-03-23 00:22:13 +00:00
|
|
|
undo_transaction.cpp
|
2011-01-21 02:33:57 +00:00
|
|
|
xml_exception.cpp
|
2010-08-23 20:52:17 +00:00
|
|
|
xml_widgets.cpp
|
2011-07-27 02:25:02 +00:00
|
|
|
app/check_update.cpp
|
2010-08-25 03:26:37 +00:00
|
|
|
app/color.cpp
|
|
|
|
app/color_utils.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
commands/cmd_about.cpp
|
|
|
|
commands/cmd_advanced_mode.cpp
|
|
|
|
commands/cmd_background_from_layer.cpp
|
|
|
|
commands/cmd_canvas_size.cpp
|
|
|
|
commands/cmd_cel_properties.cpp
|
|
|
|
commands/cmd_change_color.cpp
|
|
|
|
commands/cmd_change_image_type.cpp
|
2010-08-12 20:29:06 +00:00
|
|
|
commands/cmd_change_pen.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
commands/cmd_clear.cpp
|
|
|
|
commands/cmd_close_file.cpp
|
|
|
|
commands/cmd_configure_tools.cpp
|
|
|
|
commands/cmd_copy.cpp
|
|
|
|
commands/cmd_copy_cel.cpp
|
|
|
|
commands/cmd_crop.cpp
|
|
|
|
commands/cmd_cut.cpp
|
|
|
|
commands/cmd_deselect_mask.cpp
|
2011-03-26 23:43:43 +00:00
|
|
|
commands/cmd_developer_console.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
commands/cmd_donate.cpp
|
|
|
|
commands/cmd_duplicate_layer.cpp
|
|
|
|
commands/cmd_duplicate_sprite.cpp
|
|
|
|
commands/cmd_exit.cpp
|
|
|
|
commands/cmd_eyedropper.cpp
|
|
|
|
commands/cmd_film_editor.cpp
|
|
|
|
commands/cmd_flatten_layers.cpp
|
|
|
|
commands/cmd_flip.cpp
|
|
|
|
commands/cmd_frame_properties.cpp
|
|
|
|
commands/cmd_goto_frame.cpp
|
|
|
|
commands/cmd_goto_layer.cpp
|
|
|
|
commands/cmd_grid.cpp
|
|
|
|
commands/cmd_invert_mask.cpp
|
|
|
|
commands/cmd_layer_from_background.cpp
|
|
|
|
commands/cmd_layer_properties.cpp
|
|
|
|
commands/cmd_load_mask.cpp
|
|
|
|
commands/cmd_mask_all.cpp
|
|
|
|
commands/cmd_mask_by_color.cpp
|
|
|
|
commands/cmd_merge_down_layer.cpp
|
|
|
|
commands/cmd_move_cel.cpp
|
|
|
|
commands/cmd_new_file.cpp
|
|
|
|
commands/cmd_new_frame.cpp
|
|
|
|
commands/cmd_new_layer.cpp
|
|
|
|
commands/cmd_new_layer_set.cpp
|
|
|
|
commands/cmd_open_file.cpp
|
2011-06-25 17:28:50 +00:00
|
|
|
commands/cmd_open_in_folder.cpp
|
|
|
|
commands/cmd_open_with_app.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
commands/cmd_options.cpp
|
|
|
|
commands/cmd_palette_editor.cpp
|
|
|
|
commands/cmd_paste.cpp
|
|
|
|
commands/cmd_play_animation.cpp
|
|
|
|
commands/cmd_preview.cpp
|
|
|
|
commands/cmd_quick_reference.cpp
|
|
|
|
commands/cmd_redo.cpp
|
|
|
|
commands/cmd_refresh.cpp
|
|
|
|
commands/cmd_remove_cel.cpp
|
|
|
|
commands/cmd_remove_frame.cpp
|
|
|
|
commands/cmd_remove_layer.cpp
|
|
|
|
commands/cmd_reselect_mask.cpp
|
|
|
|
commands/cmd_rotate_canvas.cpp
|
|
|
|
commands/cmd_save_file.cpp
|
|
|
|
commands/cmd_save_mask.cpp
|
|
|
|
commands/cmd_screen_shot.cpp
|
|
|
|
commands/cmd_select_file.cpp
|
|
|
|
commands/cmd_sprite_editor.cpp
|
|
|
|
commands/cmd_sprite_properties.cpp
|
|
|
|
commands/cmd_sprite_size.cpp
|
|
|
|
commands/cmd_switch_colors.cpp
|
|
|
|
commands/cmd_undo.cpp
|
|
|
|
commands/command.cpp
|
|
|
|
commands/commands.cpp
|
2011-03-13 18:50:31 +00:00
|
|
|
commands/filters/cmd_color_curve.cpp
|
|
|
|
commands/filters/cmd_convolution_matrix.cpp
|
|
|
|
commands/filters/cmd_despeckle.cpp
|
|
|
|
commands/filters/cmd_invert_color.cpp
|
|
|
|
commands/filters/cmd_replace_color.cpp
|
|
|
|
commands/filters/color_curve_editor.cpp
|
|
|
|
commands/filters/convolution_matrix_stock.cpp
|
|
|
|
commands/filters/filter_manager_impl.cpp
|
|
|
|
commands/filters/filter_preview.cpp
|
|
|
|
commands/filters/filter_target_buttons.cpp
|
|
|
|
commands/filters/filter_window.cpp
|
|
|
|
commands/filters/filter_worker.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
dialogs/aniedit.cpp
|
|
|
|
dialogs/drawtext.cpp
|
|
|
|
dialogs/filesel.cpp
|
|
|
|
dialogs/maskcol.cpp
|
|
|
|
dialogs/playfli.cpp
|
|
|
|
dialogs/repo.cpp
|
|
|
|
file/ase_format.cpp
|
|
|
|
file/bmp_format.cpp
|
|
|
|
file/file.cpp
|
2011-01-16 20:27:18 +00:00
|
|
|
file/file_format.cpp
|
|
|
|
file/file_formats_manager.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
file/fli/fli.cpp
|
|
|
|
file/fli_format.cpp
|
|
|
|
file/gif_format.cpp
|
|
|
|
file/ico_format.cpp
|
|
|
|
file/jpeg_format.cpp
|
|
|
|
file/pcx_format.cpp
|
|
|
|
file/png_format.cpp
|
|
|
|
file/tga_format.cpp
|
|
|
|
modules/editors.cpp
|
|
|
|
modules/gfx.cpp
|
|
|
|
modules/gui.cpp
|
|
|
|
modules/palettes.cpp
|
|
|
|
modules/rootmenu.cpp
|
|
|
|
raster/algo.cpp
|
|
|
|
raster/algofill.cpp
|
|
|
|
raster/algo_polygon.cpp
|
|
|
|
raster/blend.cpp
|
|
|
|
raster/cel.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
raster/cel_io.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
raster/dirty.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
raster/dirty_io.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
raster/gfxobj.cpp
|
|
|
|
raster/image.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
raster/image_io.cpp
|
2010-12-26 20:03:35 +00:00
|
|
|
raster/images_collector.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
raster/layer.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
raster/layer_io.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
raster/mask.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
raster/mask_io.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
raster/palette.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
raster/palette_io.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
raster/path.cpp
|
|
|
|
raster/pen.cpp
|
2010-12-26 13:57:03 +00:00
|
|
|
raster/quantization.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
raster/rgbmap.cpp
|
|
|
|
raster/rotate.cpp
|
|
|
|
raster/sprite.cpp
|
|
|
|
raster/stock.cpp
|
|
|
|
settings/ui_settings_impl.cpp
|
2011-03-06 19:15:05 +00:00
|
|
|
skin/button_icon_impl.cpp
|
2011-01-24 03:03:38 +00:00
|
|
|
skin/skin_theme.cpp
|
|
|
|
skin/skin_property.cpp
|
|
|
|
skin/skin_slider_property.cpp
|
2011-04-02 13:47:03 +00:00
|
|
|
tools/intertwine.cpp
|
|
|
|
tools/point_shape.cpp
|
|
|
|
tools/tool_box.cpp
|
|
|
|
tools/tool_loop_manager.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
undoers/add_cel.cpp
|
|
|
|
undoers/add_image.cpp
|
|
|
|
undoers/add_layer.cpp
|
|
|
|
undoers/add_palette.cpp
|
|
|
|
undoers/close_group.cpp
|
|
|
|
undoers/dirty_area.cpp
|
|
|
|
undoers/flip_image.cpp
|
|
|
|
undoers/image_area.cpp
|
|
|
|
undoers/move_layer.cpp
|
|
|
|
undoers/open_group.cpp
|
|
|
|
undoers/remap_palette.cpp
|
|
|
|
undoers/remove_cel.cpp
|
|
|
|
undoers/remove_image.cpp
|
|
|
|
undoers/remove_layer.cpp
|
|
|
|
undoers/remove_palette.cpp
|
|
|
|
undoers/replace_image.cpp
|
2011-03-27 21:15:00 +00:00
|
|
|
undoers/set_cel_frame.cpp
|
|
|
|
undoers/set_cel_opacity.cpp
|
|
|
|
undoers/set_cel_position.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
undoers/set_current_frame.cpp
|
|
|
|
undoers/set_current_layer.cpp
|
|
|
|
undoers/set_frame_duration.cpp
|
2011-03-27 21:15:00 +00:00
|
|
|
undoers/set_layer_flags.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
undoers/set_layer_name.cpp
|
|
|
|
undoers/set_mask.cpp
|
2011-03-27 21:15:00 +00:00
|
|
|
undoers/set_mask_position.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
undoers/set_palette_colors.cpp
|
2011-03-27 21:15:00 +00:00
|
|
|
undoers/set_sprite_imgtype.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
undoers/set_sprite_size.cpp
|
2011-03-27 21:15:00 +00:00
|
|
|
undoers/set_stock_imgtype.cpp
|
2011-03-26 20:40:55 +00:00
|
|
|
undoers/set_total_frames.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
util/autocrop.cpp
|
|
|
|
util/boundary.cpp
|
|
|
|
util/celmove.cpp
|
|
|
|
util/clipboard.cpp
|
|
|
|
util/col_file.cpp
|
|
|
|
util/filetoks.cpp
|
|
|
|
util/misc.cpp
|
|
|
|
util/msk_file.cpp
|
|
|
|
util/pic_file.cpp
|
|
|
|
util/render.cpp
|
|
|
|
util/thmbnail.cpp
|
2010-08-23 21:11:47 +00:00
|
|
|
widgets/color_bar.cpp
|
2010-08-23 21:25:57 +00:00
|
|
|
widgets/color_button.cpp
|
2010-08-23 21:23:30 +00:00
|
|
|
widgets/color_selector.cpp
|
2011-03-02 01:50:49 +00:00
|
|
|
widgets/color_sliders.cpp
|
2011-04-22 00:07:11 +00:00
|
|
|
widgets/drop_down_button.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
widgets/editor/click.cpp
|
|
|
|
widgets/editor/cursor.cpp
|
2011-04-10 23:15:17 +00:00
|
|
|
widgets/editor/drawing_state.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
widgets/editor/editor.cpp
|
2011-04-02 18:47:44 +00:00
|
|
|
widgets/editor/editor_listeners.cpp
|
2011-04-02 21:12:41 +00:00
|
|
|
widgets/editor/editor_view.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
widgets/editor/keys.cpp
|
2011-04-10 23:15:17 +00:00
|
|
|
widgets/editor/moving_pixels_state.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
widgets/editor/pixels_movement.cpp
|
2011-04-10 23:15:17 +00:00
|
|
|
widgets/editor/scrolling_state.cpp
|
2011-04-21 21:30:29 +00:00
|
|
|
widgets/editor/select_box_state.cpp
|
2011-04-10 23:15:17 +00:00
|
|
|
widgets/editor/standby_state.cpp
|
|
|
|
widgets/editor/tool_loop_impl.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
widgets/fileview.cpp
|
|
|
|
widgets/groupbut.cpp
|
2011-03-02 01:50:49 +00:00
|
|
|
widgets/hex_color_entry.cpp
|
2011-04-23 02:00:35 +00:00
|
|
|
widgets/menuitem2.cpp
|
2011-01-28 12:28:54 +00:00
|
|
|
widgets/palette_view.cpp
|
2011-03-30 00:07:37 +00:00
|
|
|
widgets/popup_frame_pin.cpp
|
2010-08-11 00:49:32 +00:00
|
|
|
widgets/statebar.cpp
|
|
|
|
widgets/tabs.cpp
|
|
|
|
widgets/toolbar.cpp)
|
|
|
|
|
2010-08-25 20:11:28 +00:00
|
|
|
######################################################################
|
|
|
|
# aseprite application
|
|
|
|
|
2010-10-01 03:23:13 +00:00
|
|
|
if(WIN32)
|
|
|
|
set(win32_resources resources_win32.rc)
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
add_executable(aseprite WIN32 main.cpp ${win32_resources})
|
2010-08-25 20:11:28 +00:00
|
|
|
|
2010-10-12 13:21:52 +00:00
|
|
|
target_link_libraries(aseprite ${all_libs})
|
2010-08-11 00:49:32 +00:00
|
|
|
|
2011-06-12 13:50:30 +00:00
|
|
|
install(TARGETS aseprite
|
2010-10-13 00:19:19 +00:00
|
|
|
RUNTIME DESTINATION bin)
|
|
|
|
|
2011-06-12 13:50:30 +00:00
|
|
|
install(DIRECTORY ../data
|
2010-10-13 00:19:19 +00:00
|
|
|
DESTINATION share/aseprite)
|
|
|
|
|
|
|
|
if(EXISTS ../docs/quickref.pdf)
|
2011-06-12 13:50:30 +00:00
|
|
|
install(FILES ../docs/quickref.pdf
|
2010-10-13 00:19:19 +00:00
|
|
|
DESTINATION share/aseprite/docs/quickref.pdf)
|
|
|
|
endif()
|
|
|
|
|
2010-08-25 20:11:52 +00:00
|
|
|
######################################################################
|
|
|
|
# Unit tests
|
|
|
|
|
2011-03-18 03:26:08 +00:00
|
|
|
function(find_unittests dir dependencies)
|
|
|
|
file(GLOB tests ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*_unittest.cpp)
|
|
|
|
list(REMOVE_AT ARGV 0)
|
2010-09-14 22:52:02 +00:00
|
|
|
|
2011-03-18 03:26:08 +00:00
|
|
|
# Add gtest include directory so we can #include <gtest/gtest.h> in tests source code
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/third_party/gtest/include)
|
2010-12-12 12:53:39 +00:00
|
|
|
|
2011-03-18 03:26:08 +00:00
|
|
|
foreach(testsourcefile ${tests})
|
|
|
|
get_filename_component(testname ${testsourcefile} NAME_WE)
|
2010-08-25 20:11:52 +00:00
|
|
|
|
2011-03-18 03:26:08 +00:00
|
|
|
add_executable(${testname} ${testsourcefile})
|
2010-08-25 20:11:52 +00:00
|
|
|
|
2011-03-18 03:26:08 +00:00
|
|
|
target_link_libraries(${testname} gtest ${ARGV})
|
2010-08-11 00:49:32 +00:00
|
|
|
|
2011-03-18 03:26:08 +00:00
|
|
|
add_custom_target(run_${testname}
|
|
|
|
COMMAND ${testname}
|
|
|
|
DEPENDS ${testname})
|
2010-08-25 23:13:51 +00:00
|
|
|
|
2011-03-18 03:26:08 +00:00
|
|
|
set(local_runs ${local_runs} run_${testname})
|
|
|
|
endforeach()
|
|
|
|
set(all_runs ${all_runs} ${local_runs} PARENT_SCOPE)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
find_unittests(base base-lib ${sys_libs})
|
|
|
|
find_unittests(gfx gfx-lib base-lib ${sys_libs})
|
|
|
|
find_unittests(gui gui-lib gfx-lib base-lib ${libs3rdparty} allegro ${sys_libs})
|
|
|
|
find_unittests(app ${all_libs})
|
|
|
|
find_unittests(. ${all_libs})
|
2010-08-25 23:13:51 +00:00
|
|
|
|
|
|
|
# To run tests
|
|
|
|
add_custom_target(run_all_unittests DEPENDS ${all_runs})
|