FIND_PACKAGE(Threads)

ADD_DEFINITIONS(-DHAVE_FLTK)

ADD_EXECUTABLE( icc_examin icc_examin/agviewer.cpp
# icc_examin.cpp
icc_examin/debug.cc
icc_examin/flstring.c
icc_examin/icc_argyll.c
icc_examin/icc_cgats_filter.cpp
icc_examin/icc_cinepaint.cpp
# icc_examin/icc_cinepaint_intern.cpp
icc_examin/icc_draw.cpp
icc_examin/icc_examin.cpp
icc_examin/icc_examin_farbraum.cpp
icc_examin/icc_examin_io.cpp
icc_examin/icc_examin_tagwahl.cpp
icc_examin/icc_fenster.cpp
icc_examin/icc_formeln.cpp
icc_examin/icc_gamut.cpp
icc_examin/icc_gl.cpp
icc_examin/icc_helfer.cpp
icc_examin/icc_helfer_fltk.cpp
icc_examin/icc_info.cpp
icc_examin/icc_kette.cpp
#icc_examin/icc_main.cpp
icc_examin/icc_measurement.cpp
icc_examin/icc_modell_beobachter.cpp
icc_examin/icc_oyranos.cpp
icc_examin/icc_oyranos_extern.c
icc_examin/icc_profile.cpp
icc_examin/icc_profile_header.cpp
icc_examin/icc_profile_tags.cpp
icc_examin/icc_schnell.cpp
icc_examin/icc_speicher.cpp
icc_examin/icc_thread_daten.cpp
icc_examin/icc_ueber.cpp
icc_examin/icc_utils.cpp
icc_examin/icc_vrml.cpp
icc_examin/icc_vrml_parser.cpp
icc_examin/my_file_chooser.cxx
icc_examin/my_file_chooser2.cxx
icc_examin/icc_betrachter.cxx
icc_examin/threads.cpp
icc_examin/vsnprintf.c 
icc_examin/fl_i18n/fl_i18n.cxx)

SET(VERSION_A 0)
SET(VERSION_B 4)
SET(VERSION_C 5)
SET(RELEASE 0)

SET(TIME "\"May 2004 - September 2007\"")


SET(OS "UNKNOWN_OS")

#Define SLASH to be the directory separator in file paths
IF(WIN32)
  SET(SLASH "\\")
ELSE(WIN32)
  SET(SLASH "/")
ENDIF(WIN32)

SET(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
SET(DATA_DIR "${PREFIX}${SLASH}share")
SET(PIXMAP_DIR "{$PREFIX}${SLASH}pixmaps")
SET(SRC_LOCALE_DIR "${SRC_DIR}${SLASH}po")
SET(PIXMAP_DIR "${DATA_DIR}${SLASH}pixmaps")

IF(APPLE)
  SET(OS "APPLE")
ENDIF(APPLE)
IF(WIN32)
  SET(OS "WIN32")
ENDIF(WIN32)
IF(UNIX)
  #Find which version of Unix we are running
  EXECUTE_PROCESS(COMMAND uname OUTPUT_VARIABLE OSNAME)
  IF(${OSNAME} MATCHES "Linux" )
    SET(OS "LINUX")
  ENDIF(${OSNAME} MATCHES "Linux")
  IF(${OSNAME} MATCHES "BSD" )
    SET(OS "BSD")
  ENDIF(${OSNAME} MATCHES "BSD")
ENDIF(UNIX)


CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/icc_examin_version.h.in
               ${CMAKE_CURRENT_SOURCE_DIR}/icc_examin_version.h @ONLY)
	
TARGET_LINK_LIBRARIES(icc_examin ${CMAKE_THREAD_LIBS_INIT} lib wire libhalf ${GTK_LIBRARIES} lcms fltk fltk_images fltk_gl ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
SET(INC_DIR ${INC_DIR} icc_examin)
SET(INC_DIR ${INC_DIR} ${FLTK_DIR})
INCLUDE_DIRECTORIES( ${INC_DIR} )
SET_TARGET_PROPERTIES(icc_examin PROPERTIES LINKER_LANGUAGE CXX)
INSTALL(TARGETS icc_examin
          DESTINATION ${PROGRAM_PLUGINS_DIR_INFIX})
