2012-03-14 18:26:22 +04:00
|
|
|
IF(EXISTS "${CMAKE_SOURCE_DIR}/../csync/src/csync.h")
|
|
|
|
SET(CSYNC_INCLUDE_PATH ${CMAKE_SOURCE_DIR}/../csync/src/)
|
2012-04-14 06:17:27 +04:00
|
|
|
ELSE()
|
2012-10-05 19:13:23 +04:00
|
|
|
FIND_PATH(CSYNC_INCLUDE_PATH NAMES csync.h HINTS $ENV{CSYNC_DIR} )
|
2012-04-14 06:17:27 +04:00
|
|
|
ENDIF()
|
2011-04-07 21:04:07 +04:00
|
|
|
|
2012-10-10 16:00:46 +04:00
|
|
|
IF( DEFINED CSYNC_LIBRARY_PATH AND DEFINED CSYNC_INCLUDE_PATH )
|
2012-03-14 18:26:22 +04:00
|
|
|
IF( WIN32 )
|
2012-10-10 16:19:29 +04:00
|
|
|
SET(CSYNC_LIBRARY ${CSYNC_LIBRARY_PATH}/src/libocsync.dll)
|
|
|
|
ELSEIF ( APPLE )
|
|
|
|
SET(CSYNC_LIBRARY ${CSYNC_LIBRARY_PATH}/src/libocsync.dylib)
|
|
|
|
ELSE()
|
|
|
|
SET(CSYNC_LIBRARY ${CSYNC_LIBRARY_PATH}/src/libocsync.so)
|
|
|
|
ENDIF( )
|
2012-10-10 17:15:19 +04:00
|
|
|
SET(CSYNC_BINARY_DIR ${CSYNC_LIBRARY_PATH})
|
2012-04-14 06:17:27 +04:00
|
|
|
ELSE()
|
2012-10-02 15:24:10 +04:00
|
|
|
FIND_LIBRARY(CSYNC_LIBRARY NAMES ocsync HINTS $ENV{CSYNC_DIR})
|
2012-04-14 06:17:27 +04:00
|
|
|
ENDIF()
|
2011-04-07 21:04:07 +04:00
|
|
|
|
|
|
|
SET(CSYNC_INCLUDE_DIR ${CSYNC_INCLUDE_PATH})
|
|
|
|
|
|
|
|
# handle the QUIETLY and REQUIRED arguments and set CSYNC_FOUND to TRUE if
|
|
|
|
# all listed variables are TRUE
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Csync DEFAULT_MSG
|
|
|
|
CSYNC_LIBRARY CSYNC_INCLUDE_PATH)
|
|
|
|
|
2012-03-14 18:26:22 +04:00
|
|
|
MARK_AS_ADVANCED( CSYNC_INCLUDE_PATH CSYNC_LIBRARY )
|