
include_directories(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )

add_subdirectory(3dparty)
add_subdirectory(tools)
add_subdirectory(kryonmr)
add_subdirectory(kryopart)


########### next target ###############

set(kryomol_SRCS main.cpp kryomol.cpp)

kde4_add_executable(kryomol ${kryomol_SRCS})

target_link_libraries(kryomol ${KDE4_KDECORE_LIBS} ${KDE4_KPARTS_LIBS} ${QT_QTOPENGL_LIBRARY} 
${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})

install(TARGETS kryomol ${INSTALL_TARGETS_DEFAULT_ARGS})


########### install files ###############

install(FILES  kryomol.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install(FILES  kryomolui.rc DESTINATION ${DATA_INSTALL_DIR}/kryomol )

kde4_install_icons(${ICON_INSTALL_DIR})



#original Makefile.am contents follow:

## set the include path for X, qt and KDE
#INCLUDES = $(all_includes)
#
## these are the headers for your project
#noinst_HEADERS = kryomol.h
#
## let automoc handle all of the meta source files (moc)
#METASOURCES = AUTO
#
#messages: rc.cpp
#	$(XGETTEXT) *.cpp -o $(podir)/kryomol.pot
#
#KDE_ICON = kryomol
#
## this Makefile creates both a KPart application and a KPart
##########################################################################
## APPLICATION SECTION
##########################################################################
## this is the program that gets installed.  it's name is used for all
## of the other Makefile.am variables
#bin_PROGRAMS = kryomol
#
## the application source, library search path, and link libraries
#kryomol_SOURCES = main.cpp kryomol.cpp
#kryomol_LDFLAGS = $(KDE_RPATH) $(all_libraries)
#kryomol_LDADD   = $(LIB_KPARTS)
#
## this is where the desktop file will go 
## shelldesktopdir = $(kde_appsdir)/Edutainment/Science
## shelldesktop_DATA = kryomol.desktop
#
#xdg_apps_DATA = kryomol.desktop
#
## this is where the shell's XML-GUI resource file goes
#shellrcdir = $(kde_datadir)/kryomol
#shellrc_DATA = kryomolui.rc
#
##########################################################################
## KPART SECTION
##########################################################################
#
## the Part's source, library search path, and link libraries
#
## this is where the desktop file will go 
## partdesktopdir = $(kde_servicesdir)
#
#
## this is where the part's XML-GUI resource file goes
## partrcdir   = $(kde_datadir)/kryomolpart
#SUBDIRS = 3dparty tools kryonmr kryopart
