mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
module: Build the webdav module.
This commit is contained in:
parent
f1647b3338
commit
f0f36120ad
2 changed files with 81 additions and 0 deletions
65
cmake/Modules/FindNeon.cmake
Normal file
65
cmake/Modules/FindNeon.cmake
Normal file
|
@ -0,0 +1,65 @@
|
|||
# - Try to find Neon
|
||||
# Once done this will define
|
||||
#
|
||||
# NEON_FOUND - system has Neon
|
||||
# NEON_INCLUDE_DIRS - the Neon include directory
|
||||
# NEON_LIBRARIES - Link these to use Neon
|
||||
# NEON_DEFINITIONS - Compiler switches required for using Neon
|
||||
#
|
||||
# Copyright (c) 2011 Andreas Schneider <asn@cryptomilk.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
|
||||
if (NEON_LIBRARIES AND NEON_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(NEON_FOUND TRUE)
|
||||
else (NEON_LIBRARIES AND NEON_INCLUDE_DIRS)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_NEON neon)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
|
||||
find_path(NEON_INCLUDE_DIR
|
||||
NAMES
|
||||
neon/ne_basic.h
|
||||
PATHS
|
||||
${_NEON_INCLUDEDIR}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
)
|
||||
|
||||
find_library(NEON_LIBRARY
|
||||
NAMES
|
||||
neon
|
||||
PATHS
|
||||
${_NEON_LIBDIR}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
)
|
||||
|
||||
set(NEON_INCLUDE_DIRS
|
||||
${NEON_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if (NEON_LIBRARY)
|
||||
set(NEON_LIBRARIES
|
||||
${NEON_LIBRARIES}
|
||||
${NEON_LIBRARY}
|
||||
)
|
||||
endif (NEON_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Neon DEFAULT_MSG NEON_LIBRARIES NEON_INCLUDE_DIRS)
|
||||
|
||||
# show the NEON_INCLUDE_DIRS and NEON_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(NEON_INCLUDE_DIRS NEON_LIBRARIES)
|
||||
|
||||
endif (NEON_LIBRARIES AND NEON_INCLUDE_DIRS)
|
|
@ -2,6 +2,7 @@ project(modules C)
|
|||
|
||||
find_package(Libsmbclient REQUIRED)
|
||||
find_package(LibSSH 0.4.0)
|
||||
find_package(Neon)
|
||||
|
||||
set(PLUGIN_VERSION_INSTALL_DIR "${PLUGIN_INSTALL_DIR}-${LIBRARY_SOVERSION}")
|
||||
|
||||
|
@ -24,6 +25,10 @@ set(SFTP_PLUGIN
|
|||
csync_sftp
|
||||
)
|
||||
|
||||
set(WEBDAV_PLUGIN
|
||||
csync_webdav
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${MODULES_PUBLIC_INCLUDE_DIRS}
|
||||
${MODULES_PRIVATE_INCLUDE_DIRS}
|
||||
|
@ -53,6 +58,17 @@ install(
|
|||
)
|
||||
endif (LIBSSH_FOUND)
|
||||
|
||||
if (NEON_FOUND)
|
||||
macro_add_plugin(${WEBDAV_PLUGIN} csync_webdav.c)
|
||||
target_link_libraries(${WEBDAV_PLUGIN} ${CSTDLIB_LIBRARY} ${NEON_LIBRARY})
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
${WEBDAV_PLUGIN}
|
||||
DESTINATION
|
||||
${PLUGIN_VERSION_INSTALL_DIR}
|
||||
)
|
||||
endif (NEON_FOUND)
|
||||
|
||||
# create test file as bad plugin for the vio testcase
|
||||
file(WRITE
|
||||
|
|
Loading…
Reference in a new issue