#***************************************************************************
#*   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 SKGBASEMODELER ::..")

PROJECT(SKGBASEMODELER)

LINK_DIRECTORIES (${LIBRARY_OUTPUT_PATH})

FIND_PACKAGE(QCA2)
if( NOT QCA2_FOUND  )
  message(FATAL_ERROR "     Package QCA2 required, but not found!")
else( NOT QCA2_FOUND )
  message(STATUS "     Package QCA2 found!")
endif( NOT QCA2_FOUND )

FIND_PACKAGE(Sqlite REQUIRED)
INCLUDE_DIRECTORIES( ${PROJECT_BINARY_DIR} ${KDE4_INCLUDES} ${QT_INCLUDES} ${QCA2_INCLUDE_DIR} ${QT_QTSQL_INCLUDE_DIR} ${Grantlee_INCLUDE_DIRS} ${SQLITE_INCLUDE_DIR})

SET(skgbasemodeler_SRCS
   skgobjectbase.cpp
   skgnamedobject.cpp
   skgnodeobject.cpp
   skgpropertyobject.cpp
   skgdocument.cpp
   skgtransactionmng.cpp
   skgservices.cpp
   skgerror.cpp
   skgtraces.cpp
   skgadvice.cpp
   skgreport.cpp   
 )

#build a shared library
KDE4_ADD_LIBRARY(skgbasemodeler SHARED ${skgbasemodeler_SRCS})

#need to link to some other libraries ? just add them here
SET_TARGET_PROPERTIES(skgbasemodeler PROPERTIES VERSION ${SKG_VERSION} SOVERSION ${SOVERSION} )
TARGET_LINK_LIBRARIES(skgbasemodeler ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} ${QT_QTSQL_LIBRARY} ${QT_QTSCRIPT_LIBRARY} ${QT_QTXML_LIBRARY} ${QCA2_LIBRARIES} ${Grantlee_CORE_LIBRARIES} ${SQLITE_LIBRARIES})

########### install files ###############
INSTALL(TARGETS skgbasemodeler ${INSTALL_TARGETS_DEFAULT_ARGS} )
