PROJECT( OpenSync )

SET( OPENSYNC_VERSION "0.33" )	
SET( OPENSYNC_PLUGINVERSION 1 )

SET( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )

INCLUDE( OpenSyncDefaults )

INCLUDE_DIRECTORIES(  ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/opensync" )

FIND_PACKAGE( GLIB2 REQUIRED )
FIND_PACKAGE( Sqlite REQUIRED )
FIND_PACKAGE( LibXml2 REQUIRED )
FIND_PACKAGE( SWIG )	
FIND_PACKAGE( PythonLibs )
FIND_PACKAGE( Check )


CONFIGURE_FILE( "config.h.cmake" "config.h" )
CONFIGURE_FILE( "opensync-1.0.pc.in" "opensync-1.0.pc" )

ADD_SUBDIRECTORY( opensync )
ADD_SUBDIRECTORY( formats )
ADD_SUBDIRECTORY( tools )
ADD_SUBDIRECTORY( misc )
#ADD_SUBDIRECTORY( docs )
ADD_SUBDIRECTORY( cmake )


IF (SWIG_FOUND)
	ADD_SUBDIRECTORY( wrapper )
ENDIF (SWIG_FOUND)	

IF (CHECK_FOUND)
	ADD_SUBDIRECTORY( tests )
ENDIF (CHECK_FOUND)

########## INSTALL #########
	
INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/opensync-1.0.pc" DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/ )	


PROJECT( OpenSync )

SET( OPENSYNC_VERSION "0.33" )	
SET( OPENSYNC_PLUGINVERSION 1 )

SET( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )

INCLUDE( OpenSyncDefaults )

INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/opensync" ${CMAKE_CURRENT_SOURCE_DIR} )

FIND_PACKAGE( GLIB2 REQUIRED )
FIND_PACKAGE( Sqlite REQUIRED )
FIND_PACKAGE( LibXml2 REQUIRED )
FIND_PACKAGE( SWIG )	
FIND_PACKAGE( PythonLibs )
FIND_PACKAGE( Check )


CONFIGURE_FILE( "config.h.cmake" "config.h" )
CONFIGURE_FILE( "opensync-1.0.pc.in" "opensync-1.0.pc" )

ADD_SUBDIRECTORY( opensync )
ADD_SUBDIRECTORY( formats )
ADD_SUBDIRECTORY( tools )
ADD_SUBDIRECTORY( misc )
#ADD_SUBDIRECTORY( docs )
ADD_SUBDIRECTORY( cmake )


IF (SWIG_FOUND)
	ADD_SUBDIRECTORY( wrapper )
ENDIF (SWIG_FOUND)	

IF (CHECK_FOUND)
	ADD_SUBDIRECTORY( tests )
ENDIF (CHECK_FOUND)

########## INSTALL #########
	
INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/opensync-1.0.pc" DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/ )	


Fix order of includes pathes - this solves issues if there is still a config.h from scons builds.
Fix order of includes pathes - this solves issues if there is still a
config.h from scons builds.


git-svn-id: e31799a7ad59d6ea355ca047c69e0aee8a59fcd3@2615 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e
