Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt15
-rw-r--r--VERSION.cmake6
-rw-r--r--cmake/modules/FindSQLite3.cmake66
-rw-r--r--shell_integration/CMakeLists.txt2
-rw-r--r--shell_integration/MacOSX/CMakeLists.txt7
-rw-r--r--src/cmd/CMakeLists.txt5
-rw-r--r--src/crashreporter/CMakeLists.txt18
-rw-r--r--src/csync/CMakeLists.txt15
-rw-r--r--src/gui/CMakeLists.txt3
-rw-r--r--src/gui/updater/CMakeLists.txt5
-rw-r--r--src/libsync/vfs/suffix/CMakeLists.txt2
-rw-r--r--test/CMakeLists.txt1
12 files changed, 93 insertions, 52 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d07dce0a3..7a67e2b95 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,13 +1,17 @@
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 14)
-project(client LANGUAGES CXX C VERSION 2.7.0)
+include(VERSION.cmake)
+project(client LANGUAGES CXX C VERSION ${MIRALL_VERSION_MAJOR}.${MIRALL_VERSION_MINOR}.${MIRALL_VERSION_PATCH})
include(FeatureSummary)
find_package(ECM 5.50.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
+
+# disable pointless warning in KDECMakeSettings
+set(APPLE_SUPPRESS_X11_WARNING ON)
include(KDEInstallDirs)
include(KDECMakeSettings)
@@ -16,14 +20,9 @@ include(ECMMarkNonGuiExecutable)
include(KDECompilerSettings NO_POLICY_SCOPE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-set(CMAKE_AUTOUIC ON)
if (APPLE OR WIN32)
set(USE_OUR_OWN_SQLITE3 TRUE)
- set(SQLITE3_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdparty/sqlite3)
- set(SQLITE3_LIBRARIES "")
- set(SQLITE3_SOURCE ${SQLITE3_INCLUDE_DIR}/sqlite3.c)
- MESSAGE(STATUS "Using own sqlite3 from " ${SQLITE3_INCLUDE_DIR})
else()
find_package(SQLite3 3.9.0 REQUIRED)
endif()
@@ -185,7 +184,7 @@ set(TRANSLATIONS ${TRANS_FILES})
if(APPLE)
- list(APPEND OWNCLOUD_BUNDLED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sync-exclude.lst)
+ list(APPEND OWNCLOUD_BUNDLED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/sync-exclude.lst")
elseif(BUILD_CLIENT)
configure_file(sync-exclude.lst bin/sync-exclude.lst COPYONLY)
install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} )
diff --git a/VERSION.cmake b/VERSION.cmake
index 317ba5602..8f780835c 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake
@@ -1,6 +1,6 @@
-set( MIRALL_VERSION_MAJOR ${PROJECT_VERSION_MAJOR} )
-set( MIRALL_VERSION_MINOR ${PROJECT_VERSION_MINOR} )
-set( MIRALL_VERSION_PATCH ${PROJECT_VERSION_PATCH} )
+set( MIRALL_VERSION_MAJOR 2 )
+set( MIRALL_VERSION_MINOR 7 )
+set( MIRALL_VERSION_PATCH 0 )
set( MIRALL_VERSION_YEAR 2019 )
set( MIRALL_SOVERSION 0 )
diff --git a/cmake/modules/FindSQLite3.cmake b/cmake/modules/FindSQLite3.cmake
new file mode 100644
index 000000000..c144ca1d8
--- /dev/null
+++ b/cmake/modules/FindSQLite3.cmake
@@ -0,0 +1,66 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindSQLite3
+-----------
+
+Find the SQLite libraries, v3
+
+IMPORTED targets
+^^^^^^^^^^^^^^^^
+
+This module defines the following :prop_tgt:`IMPORTED` target:
+
+``SQLite::SQLite3``
+
+Result variables
+^^^^^^^^^^^^^^^^
+
+This module will set the following variables if found:
+
+``SQLite3_INCLUDE_DIRS``
+ where to find sqlite3.h, etc.
+``SQLite3_LIBRARIES``
+ the libraries to link against to use SQLite3.
+``SQLite3_VERSION``
+ version of the SQLite3 library found
+``SQLite3_FOUND``
+ TRUE if found
+
+#]=======================================================================]
+
+# Look for the necessary header
+find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h)
+mark_as_advanced(SQLite3_INCLUDE_DIR)
+
+# Look for the necessary library
+find_library(SQLite3_LIBRARY NAMES sqlite3 sqlite)
+mark_as_advanced(SQLite3_LIBRARY)
+
+# Extract version information from the header file
+if(SQLite3_INCLUDE_DIR)
+ file(STRINGS ${SQLite3_INCLUDE_DIR}/sqlite3.h _ver_line
+ REGEX "^#define SQLITE_VERSION *\"[0-9]+\\.[0-9]+\\.[0-9]+\""
+ LIMIT_COUNT 1)
+ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+"
+ SQLite3_VERSION "${_ver_line}")
+ unset(_ver_line)
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(SQLite3
+ REQUIRED_VARS SQLite3_INCLUDE_DIR SQLite3_LIBRARY
+ VERSION_VAR SQLite3_VERSION)
+
+# Create the imported target
+if(SQLite3_FOUND)
+ set(SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR})
+ set(SQLite3_LIBRARIES ${SQLite3_LIBRARY})
+ if(NOT TARGET SQLite::SQLite3)
+ add_library(SQLite::SQLite3 UNKNOWN IMPORTED)
+ set_target_properties(SQLite::SQLite3 PROPERTIES
+ IMPORTED_LOCATION "${SQLite3_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}")
+ endif()
+endif()
diff --git a/shell_integration/CMakeLists.txt b/shell_integration/CMakeLists.txt
index 959d94b7e..2ad9e86ab 100644
--- a/shell_integration/CMakeLists.txt
+++ b/shell_integration/CMakeLists.txt
@@ -11,8 +11,6 @@ if( UNIX AND NOT APPLE )
endif()
if(BUILD_SHELL_INTEGRATION_DOLPHIN)
- find_package(ECM 1.2.0 NO_MODULE QUIET)
- set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(KF5 "5.16" COMPONENTS KIO)
if(KF5_FOUND)
add_subdirectory(dolphin)
diff --git a/shell_integration/MacOSX/CMakeLists.txt b/shell_integration/MacOSX/CMakeLists.txt
index 99216ef94..6b616a8df 100644
--- a/shell_integration/MacOSX/CMakeLists.txt
+++ b/shell_integration/MacOSX/CMakeLists.txt
@@ -15,9 +15,8 @@ add_custom_target( mac_overlayplugin ALL
COMMENT building Mac Overlay icons
VERBATIM)
add_dependencies(mac_overlayplugin ${APPLICATION_EXECUTABLE}) # for the ownCloud.icns to be generated
+add_custom_command(TARGET mac_overlayplugin POST_BUILD COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_directory "${CMAKE_CURRENT_BINARY_DIR}/Release/FinderSyncExt.appex" "$<TARGET_FILE_DIR:${APPLICATION_EXECUTABLE}>/PlugIns/FinderSyncExt.appex" MAIN_DEPENDENCY "${mac_overlayplugin}")
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Release/FinderSyncExt.appex
- DESTINATION ${PLUGIN_INSTALL_DIR}
- USE_SOURCE_PERMISSIONS)
-endif(APPLE)
+endif()
diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt
index fab58e8cb..cdfe0bcfd 100644
--- a/src/cmd/CMakeLists.txt
+++ b/src/cmd/CMakeLists.txt
@@ -14,9 +14,6 @@ if(NOT BUILD_LIBRARIES_ONLY)
# Need tokenizer for netrc parser
target_include_directories(${cmd_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer)
+ install(TARGETS ${cmd_NAME} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
endif()
-install(TARGETS ${cmd_NAME}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/src/crashreporter/CMakeLists.txt b/src/crashreporter/CMakeLists.txt
index c0a0f599a..49639c7bd 100644
--- a/src/crashreporter/CMakeLists.txt
+++ b/src/crashreporter/CMakeLists.txt
@@ -1,6 +1,3 @@
-PROJECT( CrashReporter )
-cmake_policy(SET CMP0017 NEW)
-
# TODO: differentiate release channel
# if(BUILD_RELEASE)
# set(CRASHREPORTER_RELEASE_CHANNEL "release")
@@ -32,7 +29,7 @@ list(APPEND crashreporter_RC "${CMAKE_CURRENT_BINARY_DIR}/resources.qrc")
if(NOT BUILD_LIBRARIES_ONLY)
- add_executable( ${CRASHREPORTER_EXECUTABLE}
+ add_executable(${CRASHREPORTER_EXECUTABLE}
${crashreporter_SOURCES}
${crashreporter_HEADERS_MOC}
${crashreporter_UI_HEADERS}
@@ -42,20 +39,9 @@ if(NOT BUILD_LIBRARIES_ONLY)
find_package(Qt5 REQUIRED COMPONENTS Widgets)
target_include_directories(${CRASHREPORTER_EXECUTABLE} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
- set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES AUTOMOC ON)
- set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES AUTORCC ON)
- set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
target_link_libraries(${CRASHREPORTER_EXECUTABLE}
crashreporter-gui
Qt5::Core Qt5::Widgets
)
-
- if(BUILD_OWNCLOUD_OSX_BUNDLE)
- install(TARGETS ${CRASHREPORTER_EXECUTABLE} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
- elseif(NOT BUILD_LIBRARIES_ONLY)
- install(TARGETS ${CRASHREPORTER_EXECUTABLE}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
- endif()
+ install(TARGETS ${CRASHREPORTER_EXECUTABLE} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
endif()
diff --git a/src/csync/CMakeLists.txt b/src/csync/CMakeLists.txt
index 1928e39f1..533e7e56b 100644
--- a/src/csync/CMakeLists.txt
+++ b/src/csync/CMakeLists.txt
@@ -47,7 +47,10 @@ if(NOT HAVE_ASPRINTF AND NOT HAVE___MINGW_ASPRINTF)
endif()
if (USE_OUR_OWN_SQLITE3)
- list(APPEND csync_SRCS ${SQLITE3_SOURCE})
+ add_library(sqlite STATIC ${CMAKE_SOURCE_DIR}/src/3rdparty/sqlite3/sqlite3.c)
+ target_include_directories(sqlite PUBLIC ${CMAKE_SOURCE_DIR}/src/3rdparty/sqlite3)
+ add_library(SQLite::SQLite3 ALIAS sqlite)
+ MESSAGE(STATUS "Using own sqlite3 from " ${CMAKE_SOURCE_DIR}/src/3rdparty/sqlite3/)
endif()
configure_file(csync_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/csync_version.h)
@@ -59,14 +62,6 @@ target_include_directories(
PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/std
)
-if (USE_OUR_OWN_SQLITE3)
- # make sure that the path for the local sqlite3 is before the system one
- target_include_directories("${csync_NAME}" BEFORE PRIVATE ${SQLITE3_INCLUDE_DIR})
-else()
- target_include_directories("${csync_NAME}" PRIVATE ${SQLITE3_INCLUDE_DIR})
-endif()
-
-
generate_export_header("${csync_NAME}"
EXPORT_MACRO_NAME OCSYNC_EXPORT
EXPORT_FILE_NAME ocsynclib.h
@@ -74,7 +69,7 @@ generate_export_header("${csync_NAME}"
target_link_libraries("${csync_NAME}"
${CSYNC_REQUIRED_LIBRARIES}
- ${SQLITE3_LIBRARIES}
+ SQLite::SQLite3
Qt5::Core Qt5::Concurrent
)
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 72b56fa71..334052d6d 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -198,7 +198,8 @@ if(APPLE)
endif()
ecm_add_app_icon(final_src ICONS "${OWNCLOUD_ICONS}" SIDEBAR_ICONS "${OWNCLOUD_SIDEBAR_ICONS}" OUTFILE_BASENAME "${APPLICATION_ICON_NAME}")
-add_executable( ${APPLICATION_EXECUTABLE} main.cpp ${final_src})
+add_executable(${APPLICATION_EXECUTABLE} main.cpp ${final_src})
+set_target_properties(${APPLICATION_EXECUTABLE} PROPERTIES AUTOUIC ON AUTORCC ON)
if(NOT APPLE)
if(NOT WIN32)
diff --git a/src/gui/updater/CMakeLists.txt b/src/gui/updater/CMakeLists.txt
index 589a3a3a1..6d9f4eb68 100644
--- a/src/gui/updater/CMakeLists.txt
+++ b/src/gui/updater/CMakeLists.txt
@@ -1,7 +1,8 @@
if(APPLE AND NOT BUILD_LIBRARIES_ONLY)
if (SPARKLE_FOUND)
- list(APPEND OWNCLOUD_BUNDLED_RESOURCES ${PROJECT_SOURCE_DIR}/admin/osx/deny_autoupdate_com.owncloud.desktopclient.plist
- ${PROJECT_SOURCE_DIR}/admin/osx/sparkle/dsa_pub.pem)
+ list(APPEND OWNCLOUD_BUNDLED_RESOURCES
+ "${PROJECT_SOURCE_DIR}/admin/osx/deny_autoupdate_com.owncloud.desktopclient.plist"
+ "${PROJECT_SOURCE_DIR}/admin/osx/sparkle/dsa_pub.pem")
set(OWNCLOUD_BUNDLED_RESOURCES ${OWNCLOUD_BUNDLED_RESOURCES} PARENT_SCOPE)
endif()
endif()
diff --git a/src/libsync/vfs/suffix/CMakeLists.txt b/src/libsync/vfs/suffix/CMakeLists.txt
index 2ca1c399e..e7d59a4bc 100644
--- a/src/libsync/vfs/suffix/CMakeLists.txt
+++ b/src/libsync/vfs/suffix/CMakeLists.txt
@@ -5,5 +5,5 @@ add_library("${synclib_NAME}_vfs_suffix" MODULE
target_link_libraries("${synclib_NAME}_vfs_suffix"
"${synclib_NAME}"
)
-INSTALL(TARGETS "${synclib_NAME}_vfs_suffix" DESTINATION ${QT_PLUGIN_INSTALL_DIR})
+INSTALL(TARGETS "${synclib_NAME}_vfs_suffix" DESTINATION "${KDE_INSTALL_PLUGINDIR}")
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 790320a63..b7d4ee5e4 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -9,7 +9,6 @@ include_directories(${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/src/libsync
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
- ${SQLITE3_INCLUDE_DIR}
)
include(owncloud_add_test.cmake)