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-06-19 02:13:58 +04:00
|
|
|
FIND_PATH(CSYNC_INCLUDE_PATH NAMES csync/csync.h csync.h HINTS $ENV{CSYNC_DIR} )
|
2012-04-14 06:17:27 +04:00
|
|
|
ENDIF()
|
2011-04-07 21:04:07 +04:00
|
|
|
|
2012-03-14 18:26:22 +04:00
|
|
|
IF(EXISTS "${CMAKE_SOURCE_DIR}/../buildcsync/src/")
|
|
|
|
IF( WIN32 )
|
2012-08-30 19:47:43 +04:00
|
|
|
SET(CSYNC_LIBRARY ${CMAKE_SOURCE_DIR}/../win/buildcsync/src/libcsync.dll)
|
2012-03-14 18:26:22 +04:00
|
|
|
ELSE( WIN32 )
|
|
|
|
SET(CSYNC_LIBRARY ${CMAKE_SOURCE_DIR}/../buildcsync/src/libcsync.so)
|
|
|
|
ENDIF( WIN32 )
|
2012-04-14 06:17:27 +04:00
|
|
|
ELSE()
|
2012-06-19 01:21:12 +04:00
|
|
|
FIND_LIBRARY(CSYNC_LIBRARY NAMES csync 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 )
|