SET(CP_SRCS about_dialog.c          filename.c           object.c
actionarea.c            fileops.c            ops_buttons.c
airbrush.c              flatbuf.c            paintbrush.c
app_procs.c             flip_tool.c          palette.c
asupsample.c            floating_sel.c       patterns.c
base_frame_manager.c    floating_sel_cmds.c  pattern_select.c
batch.c                 frac.c               pencil.c
blend.c                 fuzzy_select.c       perspective_tool.c
brush.c                 gdisplay.c           pixelarea.c
brush_edit.c            gdisplay_cmds.c      pixel_region.c
brushlist.c             gdisplay_ops.c       pixelrow.c
bucket_fill.c           general.c            plugin_loader.c
bugs_dialog.c           gimage.c             procedural_db.c
buildmenu.c             gimage_cmds.c        rc.c
by_color_select.c       gimage_mask.c        rect_select.c
canvas.c                gimage_mask_cmds.c   resize.c
channel_cmds.c          global_edit.c        rotate_tool.c
channel_ops.c           gradient.c           scale.c
channels_dialog.c       gtk_debug_helpers.c  scale_tool.c
gtkhwrapbox.c        scroll.c
clone.c                 gtkvwrapbox.c        selection.c
cms.c                   gtkwrapbox.c         shear_tool.c
color_area.c            gximage.c            shmbuf.c
color_correction.c      histogram_tool.c     signal_type.c
color_correction_gui.c  image_map.c          smudge.c
color_panel.c           indexed_palette.c    spline.c
color_transfer.c        info_dialog.c        store_frame_manager.c
convert.c               install.c            temp_buf.c
convolve.c              interface.c          tilebuf.c
crop.c                  internal_procs.c     tile.c
cursorutil.c            iscissors.c          tile_cache.c
datafiles.c             layer_cmds.c         tile_manager.c
devices.c               layers_dialog.c      tile_swap.c
disp_callbacks.c        layer_select.c       tips_dialog.c
dnd.c                   layout.c             tool_options.c
drawable.c              list.c               tools.c
drawable_cmds.c         look_profile.c       transform_tool.c
draw_core.c             magnify.c            undo.c
edit_cmds.c             main.c               undo_cmds.c
edit_selection.c        measure.c            user_install.c
ellipse_select.c        menus.c              vector2d.c
eraser.c                minimize.c           zoombookmark.c
errors.c                move.c               zoom.c
expose_image.c          noise.c
depth/bezier_select.c        depth/image_render.c
depth/boundary.c             depth/info_window.c
depth/brightness_contrast.c  depth/invert.c
depth/brushgenerated.c       depth/layer.c
depth/brush_select.c         depth/levels.c
depth/channel.c              depth/paint_core_16.c
depth/color_balance.c        depth/paint_funcs_area.c
depth/colormaps.c            depth/paint_funcs_row_bfp.c
depth/color_picker.c         depth/paint_funcs_row_float16.c
depth/color_select.c         depth/paint_funcs_row_float.c
depth/commands.c             depth/paint_funcs_row_u16.c
depth/curves.c               depth/paint_funcs_row_u8.c
depth/desaturate.c           depth/plug_in.c
depth/displaylut.c           depth/posterize.c
depth/dodgeburn.c            depth/tag.c
depth/equalize.c             depth/text_tool.c
depth/float16.c              depth/threshold.c
depth/free_select.c          depth/trace.c
depth/gamma_expose.c         depth/transform_core.c
depth/histogram.c            depth/xcf.c
depth/hue_saturation.c)

#I need to take care of cinepaint_remote as well

SET(INC_DIR . ${GTK_INCLUDE_DIR} ../lib .. ${LCMS_INCLUDE_DIR})

INCLUDE_DIRECTORIES( ${INC_DIR} )

ADD_EXECUTABLE (cinepaint ${CP_SRCS})
SET_TARGET_PROPERTIES(cinepaint PROPERTIES LINKER_LANGUAGE CXX)

IF (APPLE)
   FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation )
   SET(ADD_LIB ${COREFOUNDATION_LIBRARY})
ELSE (APPLE)
   SET(ADD_LIB "")
ENDIF (APPLE)

TARGET_LINK_LIBRARIES(cinepaint lib libhalf wire 
          ${LCMS} ${GTK_LIBRARIES} ${ADD_LIB})

INSTALL(TARGETS cinepaint
            RUNTIME DESTINATION bin)
