#***************************************************************************
#*   Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE support@mankowski.fr  *
#*                                                                         *
#*   This program is free software; you can redistribute it and/or modify  *
#*   it under the terms of the GNU General Public License as published by  *
#*   the Free Software Foundation; either version 2 of the License, or     *
#*   (at your option) any later version.                                   *
#*                                                                         *
#*   This program is distributed in the hope that it will be useful,       *
#*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
#*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
#*   GNU General Public License for more details.                          *
#*                                                                         *
#*   You should have received a copy of the GNU General Public License     *
#*   along with this program.  If not, see <http://www.gnu.org/licenses/>  *
#***************************************************************************
MESSAGE( STATUS "..:: CMAKE SKGBANKMODELER ::..")

PROJECT(SKGBANKMODELER)

LINK_DIRECTORIES (${LIBRARY_OUTPUT_PATH})

INCLUDE_DIRECTORIES( ${PROJECT_BINARY_DIR} ${KDE4_INCLUDES} ${QT_INCLUDES} ${CMAKE_SOURCE_DIR}/skgbasemodeler ${Grantlee_INCLUDE_DIRS} )

SET(skgbankmodeler_SRCS
   skgbankobject.cpp
   skgbudgetobject.cpp
   skgbudgetruleobject.cpp
   skgaccountobject.cpp
   skgoperationobject.cpp
   skgrecurrentoperationobject.cpp
   skgtrackerobject.cpp
   skgpayeeobject.cpp
   skgsuboperationobject.cpp
   skgcategoryobject.cpp
   skgunitobject.cpp
   skgunitvalueobject.cpp
   skgruleobject.cpp
   skginterestobject.cpp
   skgdocumentbank.cpp
   skgimportexportmanager.cpp
   skgimportplugin.cpp
   skgreportbank.cpp
 )

#build a shared library
KDE4_ADD_LIBRARY(skgbankmodeler SHARED ${skgbankmodeler_SRCS})

#need to link to some other libraries ? just add them here
TARGET_LINK_LIBRARIES(skgbankmodeler ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${QT_QTXML_LIBRARY} ${QT_QTSQL_LIBRARY} ${Grantlee_CORE_LIBRARIES} skgbasemodeler)

SET_TARGET_PROPERTIES( skgbankmodeler PROPERTIES VERSION ${SKG_VERSION} SOVERSION ${SOVERSION} )

########### install files ###############
INSTALL(TARGETS skgbankmodeler ${INSTALL_TARGETS_DEFAULT_ARGS})
INSTALL(FILES ${PROJECT_SOURCE_DIR}/skrooge-import-plugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
INSTALL(DIRECTORY quotes DESTINATION ${DATA_INSTALL_DIR}/skrooge FILES_MATCHING PATTERN "*.txt" )
