cmake_minimum_required(VERSION 2.4)

if(COMMAND cmake_policy)
	cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

SET(HOME $ENV{HOME})

INCLUDE_DIRECTORIES(src /opt/local/include ${HOME}/SARA/include)

# Assuming library linlog is installed in ${HOME}/SARA/lib
LINK_DIRECTORIES(/opt/local/lib ${HOME}/SARA/lib)

#original Makefile.am contents follow:

ADD_DEFINITIONS(-Wall -O2)
#ADD_DEFINITIONS(-Wall -pg)  # -pg does not work under cygwin

IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
ADD_DEFINITIONS(-DDEBUG)
ENDIF (CMAKE_BUILD_TYPE STREQUAL "Debug")

#dataFiles = test.cpp lib.h lib.cpp cmakelibcpp.png CMakeLists.txt CMakeLists.txt.src
#templateName = cmakelibcpp
#
#### no need to change below:
#template_DATA = $(templateName).kdevtemplate
#templatedir = ${appwizarddatadir}/templates
#
#appwizarddatadir = ${kde_datadir}/kdevappwizard
#$(templateName).tar.gz:
#	$(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles}
#	$(GZIP) -9 $(templateName).tar
#
#archivedir = ${appwizarddatadir}
#archive_DATA = $(templateName).tar.gz ${templateName}.png
#
#CLEANFILES = *.tar.gz

ADD_SUBDIRECTORY(src)
