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
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/AddAppIconMacro.cmake133
-rw-r--r--cmake/modules/AddCMockaTest.cmake4
-rw-r--r--cmake/modules/CheckCCompilerFlagSSP.cmake26
-rw-r--r--cmake/modules/CheckPrototypeDefinition.c.in29
-rw-r--r--cmake/modules/CheckPrototypeDefinition.cmake98
-rw-r--r--cmake/modules/DefineCMakeDefaults.cmake34
-rw-r--r--cmake/modules/DefineCompilerFlags.cmake93
-rw-r--r--cmake/modules/DefineInstallationPaths.cmake111
-rw-r--r--cmake/modules/DefinePlatformDefaults.cmake32
-rw-r--r--cmake/modules/DeployQt5.cmake381
-rw-r--r--cmake/modules/ECMAddAppIcon.cmake397
-rw-r--r--cmake/modules/ECMFindModuleHelpers.cmake297
-rw-r--r--cmake/modules/ECMFindModuleHelpersStub.cmake1
-rw-r--r--cmake/modules/FindINotify.cmake30
-rw-r--r--cmake/modules/FindIcoTool.cmake27
-rw-r--r--cmake/modules/FindLibSSH.cmake96
-rw-r--r--cmake/modules/FindPackageVersionCheck.cmake72
-rw-r--r--cmake/modules/FindPng2Ico.cmake117
-rw-r--r--cmake/modules/FindQt5Keychain.cmake50
-rw-r--r--cmake/modules/FindSQLite3.cmake112
-rw-r--r--cmake/modules/GNUInstallDirs.cmake253
-rw-r--r--cmake/modules/MacOSXBundleInfo.plist.in73
-rw-r--r--cmake/modules/MacroAddCompileFlags.cmake21
-rw-r--r--cmake/modules/MacroAddLinkFlags.cmake20
-rw-r--r--cmake/modules/MacroEnsureOutOfSourceBuild.cmake17
-rw-r--r--cmake/modules/MacroLogFeature.cmake157
-rw-r--r--cmake/modules/MacroOptionalFindPackage.cmake47
-rw-r--r--cmake/modules/NSIS.InstallOptions.ini.in24
-rw-r--r--cmake/modules/NSIS.template.in871
-rw-r--r--cmake/modules/UseDoxygen.cmake131
-rw-r--r--cmake/modules/Warnings.cmake29
31 files changed, 57 insertions, 3726 deletions
diff --git a/cmake/modules/AddAppIconMacro.cmake b/cmake/modules/AddAppIconMacro.cmake
deleted file mode 100644
index dc833bd9d..000000000
--- a/cmake/modules/AddAppIconMacro.cmake
+++ /dev/null
@@ -1,133 +0,0 @@
-SET(WINDRES_EXECUTABLE_BASE ${CMAKE_RC_COMPILER})
-
-# This macro is taken from kdelibs/cmake/modules/KDE4Macros.cmake.
-#
-# Copyright (c) 2006-2009 Alexander Neundorf, <neundorf@kde.org>
-# Copyright (c) 2006, 2007, Laurent Montel, <montel@kde.org>
-# Copyright (c) 2007 Matthias Kretz <kretz@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file [in KDE repositories].
-
-
-# adds application icon to target source list
-# for detailed documentation see the top of FindKDE4Internal.cmake
-macro (KDE4_ADD_APP_ICON appsources pattern)
- set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${appsources})
-
- if (WIN32)
- if(NOT WINCE)
- find_program(PNG2ICO_EXECUTABLE NAMES png2ico)
- else(NOT WINCE)
- find_program(PNG2ICO_EXECUTABLE NAMES png2ico PATHS ${HOST_BINDIR} NO_DEFAULT_PATH )
- endif(NOT WINCE)
- find_program(WINDRES_EXECUTABLE NAMES ${WINDRES_EXECUTABLE_BASE})
- if(MSVC)
- set(WINDRES_EXECUTABLE TRUE)
- endif(MSVC)
- if (PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
- string(REPLACE "*" "([0123456789]*)" pattern_rx "${pattern}")
- file(GLOB files "${pattern}")
- foreach (it ${files})
- string(REGEX REPLACE "${pattern_rx}" "\\1" fn "${it}")
- if (fn MATCHES ".*16.*" )
- list (APPEND _icons ${it})
- endif (fn MATCHES ".*16.*")
- if (fn MATCHES ".*32.*" )
- list (APPEND _icons ${it})
- endif (fn MATCHES ".*32.*")
- if (fn MATCHES ".*48.*" )
- list (APPEND _icons ${it})
- endif (fn MATCHES ".*48.*")
- if (fn MATCHES ".*64.*" )
- list (APPEND _icons ${it})
- endif (fn MATCHES ".*64.*")
- if (fn MATCHES ".*128.*" )
- list (APPEND _icons ${it})
- endif (fn MATCHES ".*128.*")
- endforeach (it)
- if (_icons)
- add_custom_command(OUTPUT ${_outfilename}.ico ${_outfilename}.rc
- COMMAND ${PNG2ICO_EXECUTABLE} ARGS --rcfile ${_outfilename}.rc ${_outfilename}.ico ${_icons}
- DEPENDS ${PNG2ICO_EXECUTABLE} ${_icons}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
- if (MINGW)
- add_custom_command(OUTPUT ${_outfilename}_res.o
- COMMAND ${WINDRES_EXECUTABLE} ARGS -i ${_outfilename}.rc -o ${_outfilename}_res.o --include-dir=${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS ${WINDRES_EXECUTABLE} ${_outfilename}.rc
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
- list(APPEND ${appsources} ${_outfilename}_res.o)
- else(MINGW)
- list(APPEND ${appsources} ${_outfilename}.rc)
- endif(MINGW)
- else(_icons)
- message(STATUS "Unable to find a related icon that matches pattern ${pattern} for variable ${appsources} - application will not have an application icon!")
- endif(_icons)
- else(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
- message(WARNING "Unable to find the png2ico or windres utilities - application will not have an application icon!")
- endif(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
- endif(WIN32)
- if (APPLE)
- file(GLOB_RECURSE files "${pattern}")
- file(MAKE_DIRECTORY ${appsources}.iconset)
-
- # List from:
- # https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW4
- foreach (it ${files})
- if (it MATCHES ".*icon-16.*")
- configure_file(${it} ${appsources}.iconset/icon_16x16.png COPYONLY)
- elseif (it MATCHES ".*icon-32.*")
- configure_file(${it} ${appsources}.iconset/icon_16x16@2x.png COPYONLY)
- configure_file(${it} ${appsources}.iconset/icon_32x32.png COPYONLY)
- elseif (it MATCHES ".*icon-64.*")
- configure_file(${it} ${appsources}.iconset/icon_32x32@2x.png COPYONLY)
- elseif (it MATCHES ".*icon-128.*")
- configure_file(${it} ${appsources}.iconset/icon_128x128.png COPYONLY)
- elseif (it MATCHES ".*icon-256.*")
- configure_file(${it} ${appsources}.iconset/icon_128x128@2x.png COPYONLY)
- configure_file(${it} ${appsources}.iconset/icon_256x256.png COPYONLY)
- elseif (it MATCHES ".*icon-512.*")
- configure_file(${it} ${appsources}.iconset/icon_256x256@2x.png COPYONLY)
- configure_file(${it} ${appsources}.iconset/icon_512x512.png COPYONLY)
- elseif (it MATCHES ".*icon-1024.*")
- configure_file(${it} ${appsources}.iconset/icon_512x512@2x.png COPYONLY)
- endif()
- endforeach (it)
-
- # Copy the sidebar icons in the main app bundle for the FinderSync extension to pick.
- # https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
- foreach (it ${files})
- if (it MATCHES ".*sidebar-16.*")
- configure_file(${it} ${appsources}.iconset/sidebar_16x16.png COPYONLY)
- elseif (it MATCHES ".*sidebar-18.*")
- configure_file(${it} ${appsources}.iconset/sidebar_18x18.png COPYONLY)
- elseif (it MATCHES ".*sidebar-32.*")
- configure_file(${it} ${appsources}.iconset/sidebar_16x16@2x.png COPYONLY)
- configure_file(${it} ${appsources}.iconset/sidebar_32x32.png COPYONLY)
- elseif (it MATCHES ".*sidebar-36.*")
- configure_file(${it} ${appsources}.iconset/sidebar_18x18@2x.png COPYONLY)
- elseif (it MATCHES ".*sidebar-64.*")
- configure_file(${it} ${appsources}.iconset/sidebar_32x32@2x.png COPYONLY)
- endif()
- endforeach (it)
-
- add_custom_command(OUTPUT ${_outfilename}.icns
- COMMAND echo === Building bundle icns with iconset:
- COMMAND ls -1 ${appsources}.iconset
- COMMAND iconutil -c icns -o ${_outfilename}.icns ${appsources}.iconset
- DEPENDS ${files}
- )
-
- # This will register the icon into the bundle
- set(MACOSX_BUNDLE_ICON_FILE ${appsources}.icns)
-
- # Append the icns file to the sources list so it will be a dependency to the
- # main target
- list(APPEND ${appsources} ${_outfilename}.icns)
-
- # Install the icon into the Resources dir in the bundle
- set_source_files_properties(${_outfilename}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
- endif(APPLE)
-endmacro (KDE4_ADD_APP_ICON)
diff --git a/cmake/modules/AddCMockaTest.cmake b/cmake/modules/AddCMockaTest.cmake
index b2d1ca8a4..df5af0a79 100644
--- a/cmake/modules/AddCMockaTest.cmake
+++ b/cmake/modules/AddCMockaTest.cmake
@@ -18,6 +18,8 @@ endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
function (ADD_CMOCKA_TEST _testName _testSource)
add_executable(${_testName} ${_testSource})
+ set_target_properties(${_testName} PROPERTIES C_STANDARD 99)
+ ecm_mark_nongui_executable(${_testName})
target_link_libraries(${_testName} ${ARGN})
- add_test(${_testName} ${CMAKE_CURRENT_BINARY_DIR}/${_testName})
+ add_test(NAME ${_testName} COMMAND $<TARGET_FILE:${_testName}>)
endfunction (ADD_CMOCKA_TEST)
diff --git a/cmake/modules/CheckCCompilerFlagSSP.cmake b/cmake/modules/CheckCCompilerFlagSSP.cmake
deleted file mode 100644
index 2fe43954a..000000000
--- a/cmake/modules/CheckCCompilerFlagSSP.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-# - Check whether the C compiler supports a given flag in the
-# context of a stack checking compiler option.
-
-# CHECK_C_COMPILER_FLAG_SSP(FLAG VARIABLE)
-#
-# FLAG - the compiler flag
-# VARIABLE - variable to store the result
-#
-# This actually calls check_c_source_compiles.
-# See help for CheckCSourceCompiles for a listing of variables
-# that can modify the build.
-
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-include(CheckCSourceCompiles)
-
-function(CHECK_C_COMPILER_FLAG_SSP _FLAG _RESULT)
- set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
- set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
- check_c_source_compiles("int main(int argc, char **argv) { char buffer[256]; return buffer[argc]=0;}" ${_RESULT})
- set(CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
-endfunction(CHECK_C_COMPILER_FLAG_SSP)
diff --git a/cmake/modules/CheckPrototypeDefinition.c.in b/cmake/modules/CheckPrototypeDefinition.c.in
deleted file mode 100644
index a97344ac3..000000000
--- a/cmake/modules/CheckPrototypeDefinition.c.in
+++ /dev/null
@@ -1,29 +0,0 @@
-@CHECK_PROTOTYPE_DEFINITION_HEADER@
-
-static void cmakeRequireSymbol(int dummy, ...) {
- (void) dummy;
-}
-
-static void checkSymbol(void) {
-#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
- cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
-#endif
-}
-
-@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
- return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
-}
-
-#ifdef __CLASSIC_C__
-int main() {
- int ac;
- char*av[];
-#else
-int main(int ac, char *av[]) {
-#endif
- checkSymbol();
- if (ac > 1000) {
- return *av[0];
- }
- return 0;
-}
diff --git a/cmake/modules/CheckPrototypeDefinition.cmake b/cmake/modules/CheckPrototypeDefinition.cmake
deleted file mode 100644
index 2342b3c4f..000000000
--- a/cmake/modules/CheckPrototypeDefinition.cmake
+++ /dev/null
@@ -1,98 +0,0 @@
-# - Check if the protoype we expect is correct.
-# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
-# FUNCTION - The name of the function (used to check if prototype exists)
-# PROTOTYPE- The prototype to check.
-# RETURN - The return value of the function.
-# HEADER - The header files required.
-# VARIABLE - The variable to store the result.
-# Example:
-# check_prototype_definition(getpwent_r
-# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
-# "NULL"
-# "unistd.h;pwd.h"
-# SOLARIS_GETPWENT_R)
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
-
-#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
-# Copyright 2010-2011 Andreas Schneider <asn@cryptomilk.org>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-#
-
-
-get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-
-function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
-
- if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
- set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
-
- set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
- if (CMAKE_REQUIRED_LIBRARIES)
- set(CHECK_PROTOTYPE_DEFINITION_LIBS
- LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
- else()
- set(CHECK_PROTOTYPE_DEFINITION_LIBS)
- endif()
- if (CMAKE_REQUIRED_INCLUDES)
- set(CMAKE_SYMBOL_EXISTS_INCLUDES
- "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- else()
- set(CMAKE_SYMBOL_EXISTS_INCLUDES)
- endif()
-
- foreach(_FILE ${_HEADER})
- set(CHECK_PROTOTYPE_DEFINITION_HEADER
- "${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
- endforeach()
-
- set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
- set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
- set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
-
- configure_file("${__check_proto_def_dir}/CheckPrototypeDefinition.c.in"
- "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
-
- file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
-
- try_compile(${_VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- ${CHECK_PROTOTYPE_DEFINITION_LIBS}
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
- "${CMAKE_SYMBOL_EXISTS_INCLUDES}"
- OUTPUT_VARIABLE OUTPUT)
-
- if (${_VARIABLE})
- set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
- message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
- "${OUTPUT}\n\n")
- else ()
- message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
- set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
- "${OUTPUT}\n\n${_SOURCE}\n\n")
- endif ()
- endif()
-
-endfunction()
diff --git a/cmake/modules/DefineCMakeDefaults.cmake b/cmake/modules/DefineCMakeDefaults.cmake
deleted file mode 100644
index 483722fdc..000000000
--- a/cmake/modules/DefineCMakeDefaults.cmake
+++ /dev/null
@@ -1,34 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-# Always include srcdir and builddir in include path
-# This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY} in
-# about every subdir
-# since cmake 2.4.0
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-# Put the include dirs which are in the source or build tree
-# before all other include dirs, so the headers in the sources
-# are prefered over the already installed ones
-# since cmake 2.4.1
-set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
-
-# Use colored output
-# since cmake 2.4.0
-set(CMAKE_COLOR_MAKEFILE ON)
-
-# Define the generic version of the libraries here
-set(GENERIC_LIB_VERSION "0.1.0")
-set(GENERIC_LIB_SOVERSION "0")
-
-# set -Werror
-set(CMAKE_ENABLE_WERROR ON)
-
-# Set the default build type to release with debug info
-if (NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE RelWithDebInfo
- CACHE STRING
- "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
- )
-endif (NOT CMAKE_BUILD_TYPE)
diff --git a/cmake/modules/DefineCompilerFlags.cmake b/cmake/modules/DefineCompilerFlags.cmake
deleted file mode 100644
index c8e831caa..000000000
--- a/cmake/modules/DefineCompilerFlags.cmake
+++ /dev/null
@@ -1,93 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-# define system dependent compiler flags
-
-include(CheckCCompilerFlag)
-include(CheckCCompilerFlagSSP)
-
-#
-# Define GNUCC compiler flags
-#
-if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
-
- # add -Wconversion ?
- # cannot be pedantic with sqlite3 directly linked
- # FIXME Can we somehow not use those flags for sqlite3.* but use them for the rest of csync?
- if (NOT USE_OUR_OWN_SQLITE3)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
- endif()
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -D_GNU_SOURCE")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__STDC_FORMAT_MACROS=1")
-
- set(CSYNC_STRICT OFF CACHE BOOL "Strict error checking, enabled -Werror and friends")
- if (CSYNC_STRICT)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
- endif(CSYNC_STRICT)
-
- # with -fPIC
- check_c_compiler_flag("-fPIC" WITH_FPIC)
- if (WITH_FPIC AND NOT WIN32)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
- endif (WITH_FPIC AND NOT WIN32)
-
- check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR)
- if (WITH_STACK_PROTECTOR AND NOT WIN32)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
- endif (WITH_STACK_PROTECTOR AND NOT WIN32)
-
- if (CMAKE_BUILD_TYPE)
- string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
- if (CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)")
- check_c_compiler_flag("-Wp,-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
- if (WITH_FORTIFY_SOURCE)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-D_FORTIFY_SOURCE=2")
- endif (WITH_FORTIFY_SOURCE)
- endif()
- endif()
-endif (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
-
-if (UNIX AND NOT WIN32)
- #
- # Check for large filesystem support
- #
- if (CMAKE_SIZEOF_VOID_P MATCHES "8")
- # with large file support
- execute_process(
- COMMAND
- getconf LFS64_CFLAGS
- OUTPUT_VARIABLE
- _lfs_CFLAGS
- ERROR_QUIET
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- else (CMAKE_SIZEOF_VOID_P MATCHES "8")
- # with large file support
- execute_process(
- COMMAND
- getconf LFS_CFLAGS
- OUTPUT_VARIABLE
- _lfs_CFLAGS
- ERROR_QUIET
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
- if (_lfs_CFLAGS)
- string(REGEX REPLACE "[\r\n]" " " "${_lfs_CFLAGS}" "${${_lfs_CFLAGS}}")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_lfs_CFLAGS}")
- endif (_lfs_CFLAGS)
-else(UNIX AND NOT WIN32)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64")
-endif (UNIX AND NOT WIN32)
-
-if (MSVC)
- # Use secure functions by default and suppress warnings about
- #"deprecated" functions
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_NONSTDC_NO_WARNINGS=1 /D _CRT_SECURE_NO_WARNINGS=1")
-endif (MSVC)
diff --git a/cmake/modules/DefineInstallationPaths.cmake b/cmake/modules/DefineInstallationPaths.cmake
deleted file mode 100644
index b1fb47d59..000000000
--- a/cmake/modules/DefineInstallationPaths.cmake
+++ /dev/null
@@ -1,111 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-if (UNIX)
- # Suffix for Linux
- SET(LIB_SUFFIX
- CACHE STRING "Define suffix of directory name (32/64)"
- )
-
- SET(EXEC_INSTALL_PREFIX
- "${CMAKE_INSTALL_PREFIX}"
- CACHE PATH "Base directory for executables and libraries"
- )
- SET(SHARE_INSTALL_PREFIX
- "${CMAKE_INSTALL_PREFIX}/share"
- CACHE PATH "Base directory for files which go to share/"
- )
- SET(DATA_INSTALL_PREFIX
- "${SHARE_INSTALL_PREFIX}"
- CACHE PATH "The parent directory where applications can install their data")
-
- # The following are directories where stuff will be installed to
- SET(BIN_INSTALL_DIR
- "${CMAKE_INSTALL_BINDIR}"
- CACHE PATH "The ${APPLICATION_SHORTNAME} binary install dir (default prefix/bin)"
- )
- SET(SBIN_INSTALL_DIR
- "${EXEC_INSTALL_PREFIX}/sbin"
- CACHE PATH "The ${APPLICATION_SHORTNAME} sbin install dir (default prefix/sbin)"
- )
- SET(LIB_INSTALL_DIR
- "${CMAKE_INSTALL_LIBDIR}"
- CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/lib)"
- )
- SET(LIBEXEC_INSTALL_DIR
- "${EXEC_INSTALL_PREFIX}/libexec"
- CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/libexec)"
- )
- SET(LIB_PRIVATE_INSTALL_DIR
- "${LIB_INSTALL_DIR}"
- CACHE PATH "The subdirectory relative to the install prefix where private libs are installed"
- )
- SET(INCLUDE_INSTALL_DIR
- "${CMAKE_INSTALL_PREFIX}/include"
- CACHE PATH "The subdirectory to the header prefix (default prefix/include)"
- )
-
- SET(DATA_INSTALL_DIR
- "${DATA_INSTALL_PREFIX}"
- CACHE PATH "The parent directory where applications can install their data (default prefix/share/${APPLICATION_SHORTNAME})"
- )
- SET(HTML_INSTALL_DIR
- "${DATA_INSTALL_PREFIX}/doc/HTML"
- CACHE PATH "The HTML install dir for documentation (default data/doc/html)"
- )
- SET(ICON_INSTALL_DIR
- "${DATA_INSTALL_PREFIX}/icons"
- CACHE PATH "The icon install dir (default data/icons/)"
- )
- SET(SOUND_INSTALL_DIR
- "${DATA_INSTALL_PREFIX}/sounds"
- CACHE PATH "The install dir for sound files (default data/sounds)"
- )
-
- SET(LOCALE_INSTALL_DIR
- "${SHARE_INSTALL_PREFIX}/locale"
- CACHE PATH "The install dir for translations (default prefix/share/locale)"
- )
-
- SET(XDG_APPS_DIR
- "${SHARE_INSTALL_PREFIX}/applications/"
- CACHE PATH "The XDG apps dir"
- )
- SET(XDG_DIRECTORY_DIR
- "${SHARE_INSTALL_PREFIX}/desktop-directories"
- CACHE PATH "The XDG directory"
- )
-
- IF(NOT "${EXEC_INSTALL_PREFIX}" STREQUAL "/usr")
- SET(SYSCONFDIR_INSTALL_PREFIX "${EXEC_INSTALL_PREFIX}")
- endif()
-
- SET(SYSCONF_INSTALL_DIR
- "${SYSCONFDIR_INSTALL_PREFIX}/etc"
- CACHE PATH "The ${APPLICATION_SHORTNAME} sysconfig install dir (default prefix/etc)"
- )
- SET(MAN_INSTALL_DIR
- "${SHARE_INSTALL_PREFIX}/man"
- CACHE PATH "The ${APPLICATION_SHORTNAME} man install dir (default prefix/man)"
- )
- SET(INFO_INSTALL_DIR
- "${SHARE_INSTALL_PREFIX}/info"
- CACHE PATH "The ${APPLICATION_SHORTNAME} info install dir (default prefix/info)"
- )
-endif (UNIX)
-
-if (WIN32)
- # Same same
- set(SHARE_INSTALL_PREFIX "share" CACHE PATH "-")
- set(BIN_INSTALL_DIR "." CACHE PATH "-")
- set(SBIN_INSTALL_DIR "." CACHE PATH "-")
- set(LIB_INSTALL_DIR "lib" CACHE PATH "-")
- set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
- set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
- set(ICON_INSTALL_DIR "." CACHE PATH "-")
- set(SOUND_INSTALL_DIR "." CACHE PATH "-")
- set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
- set(SYSCONF_INSTALL_DIR "config" CACHE PATH "-")
- set(MAN_INSTALL_DIR "man" CACHE PATH "-")
-endif (WIN32)
diff --git a/cmake/modules/DefinePlatformDefaults.cmake b/cmake/modules/DefinePlatformDefaults.cmake
deleted file mode 100644
index 91f659215..000000000
--- a/cmake/modules/DefinePlatformDefaults.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-# Set system vars
-
-if (CMAKE_SYSTEM_NAME MATCHES "Linux")
- set(LINUX TRUE)
-endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
-
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
- set(FREEBSD TRUE)
- set(BSD TRUE)
-endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
-
-if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
- set(OPENBSD TRUE)
- set(BSD TRUE)
-endif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
-
-if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
- set(NETBSD TRUE)
- set(BSD TRUE)
-endif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
-
-if (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
- set(SOLARIS TRUE)
-endif (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
-
-if (CMAKE_SYSTEM_NAME MATCHES "OS2")
- set(OS2 TRUE)
-endif (CMAKE_SYSTEM_NAME MATCHES "OS2")
diff --git a/cmake/modules/DeployQt5.cmake b/cmake/modules/DeployQt5.cmake
deleted file mode 100644
index b9e5d7029..000000000
--- a/cmake/modules/DeployQt5.cmake
+++ /dev/null
@@ -1,381 +0,0 @@
-# - Functions to help assemble a standalone Qt5 executable.
-# A collection of CMake utility functions useful for deploying
-# Qt5 executables.
-#
-# The following functions are provided by this module:
-# write_qt5_conf
-# resolve_qt5_paths
-# fixup_qt5_executable
-# install_qt5_plugin_path
-# install_qt5_plugin
-# install_qt5_executable
-# Requires CMake 2.6 or greater because it uses function and
-# PARENT_SCOPE. Also depends on BundleUtilities.cmake.
-#
-# WRITE_QT5_CONF(<qt_conf_dir> <qt_conf_contents>)
-# Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>.
-#
-# RESOLVE_QT5_PATHS(<paths_var> [<executable_path>])
-# Loop through <paths_var> list and if any don't exist resolve them
-# relative to the <executable_path> (if supplied) or the CMAKE_INSTALL_PREFIX.
-#
-# FIXUP_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
-# Copies Qt plugins, writes a Qt configuration file (if needed) and fixes up a
-# Qt5 executable using BundleUtilities so it is standalone and can be
-# drag-and-drop copied to another machine as long as all of the system
-# libraries are compatible.
-#
-# <executable> should point to the executable to be fixed-up.
-#
-# <qtplugins> should contain a list of the names or paths of any Qt plugins
-# to be installed.
-#
-# <libs> will be passed to BundleUtilities and should be a list of any already
-# installed plugins, libraries or executables to also be fixed-up.
-#
-# <dirs> will be passed to BundleUtilities and should contain and directories
-# to be searched to find library dependencies.
-#
-# <plugins_dir> allows an custom plugins directory to be used.
-#
-# <request_qt_conf> will force a qt.conf file to be written even if not needed.
-#
-# INSTALL_QT5_PLUGIN_PATH(plugin executable copy installed_plugin_path_var <plugins_dir> <component> <configurations>)
-# Install (or copy) a resolved <plugin> to the default plugins directory
-# (or <plugins_dir>) relative to <executable> and store the result in
-# <installed_plugin_path_var>.
-#
-# If <copy> is set to TRUE then the plugins will be copied rather than
-# installed. This is to allow this module to be used at CMake time rather than
-# install time.
-#
-# If <component> is set then anything installed will use this COMPONENT.
-#
-# INSTALL_QT5_PLUGIN(plugin executable copy installed_plugin_path_var <plugins_dir> <component>)
-# Install (or copy) an unresolved <plugin> to the default plugins directory
-# (or <plugins_dir>) relative to <executable> and store the result in
-# <installed_plugin_path_var>. See documentation of INSTALL_QT5_PLUGIN_PATH.
-#
-# INSTALL_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>])
-# Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up
-# a Qt5 executable using BundleUtilities so it is standalone and can be
-# drag-and-drop copied to another machine as long as all of the system
-# libraries are compatible. The executable will be fixed-up at install time.
-# <component> is the COMPONENT used for bundle fixup and plugin installation.
-# See documentation of FIXUP_QT5_BUNDLE.
-
-#=============================================================================
-# Copyright 2011 Mike McQuaid <m...@mikemcquaid.com>
-# Copyright 2013 Mihai Moldovan <io...@ionic.de>
-# CMake - Cross Platform Makefile Generator
-# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# * Neither the names of Kitware, Inc., the Insight Software Consortium,
-# nor the names of their contributors may be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# The functions defined in this file depend on the fixup_bundle function
-# (and others) found in BundleUtilities.cmake
-
-include(BundleUtilities)
-set(DeployQt5_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
-set(DeployQt5_apple_plugins_dir "PlugIns")
-
-function(write_qt5_conf qt_conf_dir qt_conf_contents)
- set(qt_conf_path "${qt_conf_dir}/qt.conf")
- message(STATUS "Writing ${qt_conf_path}")
- file(WRITE "${qt_conf_path}" "${qt_conf_contents}")
-endfunction()
-
-function(resolve_qt5_paths paths_var)
- set(executable_path ${ARGV1})
-
- set(paths_resolved)
- foreach(path ${${paths_var}})
- if(EXISTS "${path}")
- list(APPEND paths_resolved "${path}")
- else()
- if(${executable_path})
- list(APPEND paths_resolved
-"${executable_path}/${path}")
- else()
- list(APPEND paths_resolved
-"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}")
- endif()
- endif()
- endforeach()
- set(${paths_var} ${paths_resolved} PARENT_SCOPE)
-endfunction()
-
-function(fixup_qt5_executable executable)
- set(qtplugins ${ARGV1})
- set(libs ${ARGV2})
- set(dirs ${ARGV3})
- set(plugins_dir ${ARGV4})
- set(request_qt_conf ${ARGV5})
-
- message(STATUS "fixup_qt5_executable")
- message(STATUS " executable='${executable}'")
- message(STATUS " qtplugins='${qtplugins}'")
- message(STATUS " libs='${libs}'")
- message(STATUS " dirs='${dirs}'")
- message(STATUS " plugins_dir='${plugins_dir}'")
- message(STATUS " request_qt_conf='${request_qt_conf}'")
-
- if(QT_LIBRARY_DIR)
- list(APPEND dirs "${QT_LIBRARY_DIR}")
- endif()
- if(QT_BINARY_DIR)
- list(APPEND dirs "${QT_BINARY_DIR}")
- endif()
-
- if(APPLE)
- set(qt_conf_dir "${executable}/Contents/Resources")
- set(executable_path "${executable}")
- set(write_qt_conf TRUE)
- if(NOT plugins_dir)
- set(plugins_dir "${DeployQt5_apple_plugins_dir}")
- endif()
- else()
- get_filename_component(executable_path "${executable}" PATH)
- if(NOT executable_path)
- set(executable_path ".")
- endif()
- set(qt_conf_dir "${executable_path}")
- set(write_qt_conf ${request_qt_conf})
- endif()
-
- foreach(plugin ${qtplugins})
- set(installed_plugin_path "")
- install_qt5_plugin("${plugin}" "${executable}" 1
-installed_plugin_path)
- list(APPEND libs ${installed_plugin_path})
- endforeach()
-
- foreach(lib ${libs})
- if(NOT EXISTS "${lib}")
- message(FATAL_ERROR "Library does not exist: ${lib}")
- endif()
- endforeach()
-
- resolve_qt5_paths(libs "${executable_path}")
-
- if(write_qt_conf)
- set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}")
- write_qt5_conf("${qt_conf_dir}" "${qt_conf_contents}")
- endif()
-
- fixup_bundle("${executable}" "${libs}" "${dirs}")
-endfunction()
-
-function(install_qt5_plugin_path plugin executable copy
-installed_plugin_path_var)
- set(plugins_dir ${ARGV4})
- set(component ${ARGV5})
- set(configurations ${ARGV6})
- if(EXISTS "${plugin}")
- if(APPLE)
- if(NOT plugins_dir)
- set(plugins_dir
-"${DeployQt5_apple_plugins_dir}")
- endif()
- set(plugins_path
-"${executable}/Contents/${plugins_dir}")
- else()
- get_filename_component(plugins_path "${executable}"
-PATH)
- if(NOT plugins_path)
- set(plugins_path ".")
- endif()
- if(plugins_dir)
- set(plugins_path
-"${plugins_path}/${plugins_dir}")
- endif()
- endif()
-
- set(plugin_group "")
-
- get_filename_component(plugin_path "${plugin}" PATH)
- get_filename_component(plugin_parent_path "${plugin_path}" PATH)
- get_filename_component(plugin_parent_dir_name
-"${plugin_parent_path}" NAME)
- get_filename_component(plugin_name "${plugin}" NAME)
- string(TOLOWER "${plugin_parent_dir_name}"
-plugin_parent_dir_name)
-
- if("${plugin_parent_dir_name}" STREQUAL "plugins")
- get_filename_component(plugin_group "${plugin_path}"
-NAME)
- set(${plugin_group_var} "${plugin_group}")
- endif()
- set(plugins_path "${plugins_path}/${plugin_group}")
-
- if(${copy})
- file(MAKE_DIRECTORY "${plugins_path}")
- file(COPY "${plugin}" DESTINATION "${plugins_path}")
- else()
- if(configurations AND (CMAKE_CONFIGURATION_TYPES OR
-CMAKE_BUILD_TYPE))
- set(configurations CONFIGURATIONS
-${configurations})
- else()
- unset(configurations)
- endif()
- install(FILES "${plugin}" DESTINATION "${plugins_path}"
-${configurations} ${component})
- endif()
- set(${installed_plugin_path_var}
-"${plugins_path}/${plugin_name}" PARENT_SCOPE)
- endif()
-endfunction()
-
-function(install_qt5_plugin plugin executable copy installed_plugin_path_var)
- set(plugins_dir ${ARGV4})
- set(component ${ARGV5})
- if(EXISTS "${plugin}")
- install_qt5_plugin_path("${plugin}" "${executable}" "${copy}"
-"${installed_plugin_path_var}" "${plugins_dir}" "${component}")
- else()
- #string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
- set(plugin_release)
- set(plugin_debug)
- set(plugin_tmp_path)
- set(plugin_find_path "${Qt5Core_DIR}/../../../plugins/")
- get_filename_component(plugin_find_path "${plugin_find_path}"
-REALPATH)
- set(plugin_find_release_filename "lib${plugin}.dylib")
- set(plugin_find_debug_filename "lib${plugin}_debug.dylib")
- file(GLOB_RECURSE pluginlist "${plugin_find_path}"
-"${plugin_find_path}/*/lib*.dylib")
- foreach(found_plugin ${pluginlist})
- get_filename_component(curname "${found_plugin}" NAME)
- if("${curname}" STREQUAL "${plugin_find_release_filename}")
- set(plugin_tmp_release_path "${found_plugin}")
- endif()
- if("${curname}" STREQUAL "${plugin_find_debug_filename}")
- set(plugin_tmp_debug_path "${found_plugin}")
- endif()
- endforeach()
-
- if((NOT DEFINED plugin_tmp_release_path OR NOT EXISTS
-"${plugin_tmp_release_path}") AND (NOT DEFINED plugin_tmp_debug_PATH OR NOT
-EXISTS "${plugin_tmp_debug_path}"))
- message(WARNING "Qt plugin \"${plugin}\" not recognized
-or found.")
- endif()
-
- if(EXISTS "${plugin_tmp_release_path}")
- set(plugin_release "${plugin_tmp_release_path}")
- elseif(EXISTS "${plugin_tmp_debug_path}")
- set(plugin_release "${plugin_tmp_debug_path}")
- endif()
-
- if(EXISTS "${plugin_tmp_debug_path}")
- set(plugin_debug "${plugin_tmp_debug_path}")
- elseif(EXISTS "${plugin_tmp_release_path}")
- set(plugin_debug "${plugin_tmp_release_path}")
- endif()
-
- if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- install_qt5_plugin_path("${plugin_release}"
-"${executable}" "${copy}" "${installed_plugin_path_var}_release"
-"${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
- install_qt5_plugin_path("${plugin_debug}"
-"${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}"
-"${component}" "Debug")
-
- if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
- set(${installed_plugin_path_var}
-${${installed_plugin_path_var}_debug})
- else()
- set(${installed_plugin_path_var}
-${${installed_plugin_path_var}_release})
- endif()
- else()
- install_qt5_plugin_path("${plugin_release}"
-"${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}"
-"${component}")
- endif()
- endif()
- set(${installed_plugin_path_var} ${${installed_plugin_path_var}}
-PARENT_SCOPE)
-endfunction()
-
-function(install_qt5_executable executable)
- set(qtplugins ${ARGV1})
- set(libs ${ARGV2})
- set(dirs ${ARGV3})
- set(plugins_dir ${ARGV4})
- set(request_qt_conf ${ARGV5})
- set(component ${ARGV6})
- if(QT_LIBRARY_DIR)
- list(APPEND dirs "${QT_LIBRARY_DIR}")
- endif()
- if(QT_BINARY_DIR)
- list(APPEND dirs "${QT_BINARY_DIR}")
- endif()
- if(component)
- set(component COMPONENT ${component})
- else()
- unset(component)
- endif()
-
- get_filename_component(executable_absolute "${executable}" ABSOLUTE)
- if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}")
- gp_file_type("${executable_absolute}"
-"${QT_QTCORE_LIBRARY_RELEASE}" qtcore_type)
- elseif(EXISTS "${QT_QTCORE_LIBRARY_DEBUG}")
- gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_DEBUG}"
-qtcore_type)
- endif()
- if(qtcore_type STREQUAL "system")
- set(qt_plugins_dir "")
- endif()
-
- if(QT_IS_STATIC)
- message(WARNING "Qt built statically: not installing plugins.")
- else()
- foreach(plugin ${qtplugins})
- message(STATUS "trying to install plugin ${plugin}")
- set(installed_plugin_paths "")
- install_qt5_plugin("${plugin}" "${executable}" 0
-installed_plugin_paths "${plugins_dir}" "${component}")
- list(APPEND libs ${installed_plugin_paths})
- endforeach()
- endif()
-
- resolve_qt5_paths(libs "")
-
- install(CODE
- "include(\"${DeployQt5_cmake_dir}/DeployQt5.cmake\")
- set(BU_CHMOD_BUNDLE_ITEMS TRUE)
- FIXUP_QT5_EXECUTABLE(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\"
-\"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
- ${component}
- )
-endfunction()
diff --git a/cmake/modules/ECMAddAppIcon.cmake b/cmake/modules/ECMAddAppIcon.cmake
deleted file mode 100644
index c2d07f6fb..000000000
--- a/cmake/modules/ECMAddAppIcon.cmake
+++ /dev/null
@@ -1,397 +0,0 @@
-#.rst:
-# ECMAddAppIcon
-# -------------
-#
-# Add icons to executable files and packages.
-#
-# ::
-#
-# ecm_add_app_icon(<sources_var>
-# ICONS <icon> [<icon> [...]]
-# [SIDEBAR_ICONS <icon> [<icon> [...]] # Since 5.49
-# [OUTFILE_BASENAME <name>]) # Since 5.49
-# )
-#
-# The given icons, whose names must match the pattern::
-#
-# <size>-<other_text>.png
-#
-# will be added to the executable target whose sources are specified by
-# ``<sources_var>`` on platforms that support it (Windows and Mac OS X).
-# Other icon files are ignored but on Mac SVG files can be supported and
-# it is thus possible to mix those with png files in a single macro call.
-#
-# ``<size>`` is a numeric pixel size (typically 16, 32, 48, 64, 128 or 256).
-# ``<other_text>`` can be any other text. See the platform notes below for any
-# recommendations about icon sizes.
-#
-# ``SIDEBAR_ICONS`` can be used to add Mac OS X sidebar
-# icons to the generated iconset. They are used when a folder monitored by the
-# application is dragged into Finder's sidebar. Since 5.49.
-#
-# ``OUTFILE_BASENAME`` will be used as the basename for the icon file. If
-# you specify it, the icon file will be called ``<OUTFILE_BASENAME>.icns`` on Mac OS X
-# and ``<OUTFILE_BASENAME>.ico`` on Windows. If you don't specify it, it defaults
-# to ``<sources_var>.<ext>``. Since 5.49.
-#
-#
-# Windows notes
-# * Icons are compiled into the executable using a resource file.
-# * Icons may not show up in Windows Explorer if the executable
-# target does not have the ``WIN32_EXECUTABLE`` property set.
-# * One of the tools png2ico (See :find-module:`FindPng2Ico`) or
-# icotool (see :find-module:`FindIcoTool`) is required.
-# * Supported sizes: 16, 24, 32, 48, 64, 128, 256, 512 and 1024.
-#
-# Mac OS X notes
-# * The executable target must have the ``MACOSX_BUNDLE`` property set.
-# * Icons are added to the bundle.
-# * If the ksvg2icns tool from KIconThemes is available, .svg and .svgz
-# files are accepted; the first that is converted successfully to .icns
-# will provide the application icon. SVG files are ignored otherwise.
-# * The tool iconutil (provided by Apple) is required for bitmap icons.
-# * Supported sizes: 16, 32, 64, 128, 256 (and 512, 1024 after OS X 10.9).
-# * At least a 128x128px (or an SVG) icon is required.
-# * Larger sizes are automatically used to substitute for smaller sizes on
-# "Retina" (high-resolution) displays. For example, a 32px icon, if
-# provided, will be used as a 32px icon on standard-resolution displays,
-# and as a 16px-equivalent icon (with an "@2x" tag) on high-resolution
-# displays. That is why you should provide 64px and 1024px icons although
-# they are not supported anymore directly. Instead they will be used as
-# 32px@2x and 512px@2x. ksvg2icns handles this internally.
-# * This function sets the ``MACOSX_BUNDLE_ICON_FILE`` variable to the name
-# of the generated icns file, so that it will be used as the
-# ``MACOSX_BUNDLE_ICON_FILE`` target property when you call
-# ``add_executable``.
-# * Sidebar icons should typically provided in 16, 32, 64, 128 and 256px.
-#
-# Since 1.7.0.
-
-
-#=============================================================================
-# Copyright 2014 Alex Merry <alex.merry@kde.org>
-# Copyright 2014 Ralf Habacker <ralf.habacker@freenet.de>
-# Copyright 2006-2009 Alexander Neundorf, <neundorf@kde.org>
-# Copyright 2006, 2007, Laurent Montel, <montel@kde.org>
-# Copyright 2007 Matthias Kretz <kretz@kde.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-include(CMakeParseArguments)
-
-function(ecm_add_app_icon appsources)
- set(options)
- set(oneValueArgs OUTFILE_BASENAME)
- set(multiValueArgs ICONS SIDEBAR_ICONS)
- cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
- if(NOT ARG_ICONS)
- message(FATAL_ERROR "No ICONS argument given to ecm_add_app_icon")
- endif()
- if(ARG_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "Unexpected arguments to ecm_add_app_icon: ${ARG_UNPARSED_ARGUMENTS}")
- endif()
-
- if(APPLE)
- find_program(KSVG2ICNS NAMES ksvg2icns)
- foreach(icon ${ARG_ICONS})
- get_filename_component(icon_full ${icon} ABSOLUTE)
- get_filename_component(icon_type ${icon_full} EXT)
- # do we have ksvg2icns in the path and did we receive an svg (or compressed svg) icon?
- if(KSVG2ICNS AND (${icon_type} STREQUAL ".svg" OR ${icon_type} STREQUAL ".svgz"))
- # convert the svg icon to an icon resource
- execute_process(COMMAND ${KSVG2ICNS} "${icon_full}"
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} RESULT_VARIABLE KSVG2ICNS_ERROR)
- if(${KSVG2ICNS_ERROR})
- message(AUTHOR_WARNING "ksvg2icns could not generate an OS X application icon from ${icon}")
- else()
- # install the icns file we just created
- get_filename_component(icon_name ${icon_full} NAME_WE)
- set(MACOSX_BUNDLE_ICON_FILE ${icon_name}.icns PARENT_SCOPE)
- set(${appsources} "${${appsources}};${CMAKE_CURRENT_BINARY_DIR}/${icon_name}.icns" PARENT_SCOPE)
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${icon_name}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
- # we're done now
- return()
- endif()
- endif()
- endforeach()
- endif()
-
-
- _ecm_add_app_icon_categorize_icons("${ARG_ICONS}" "icons" "16;32;48;64;128;256;512;1024")
- if(ARG_SIDEBAR_ICONS)
- _ecm_add_app_icon_categorize_icons("${ARG_SIDEBAR_ICONS}" "sidebar_icons" "16;32;64;128;256")
- endif()
-
- set(mac_icons
- # Icons: https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW4
- ${icons_at_16px}
- ${icons_at_32px}
- ${icons_at_64px}
- ${icons_at_128px}
- ${icons_at_256px}
- ${icons_at_512px}
- ${icons_at_1024px}
-
- # Sidebar Icons: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
- ${sidebar_icons_at_16px}
- ${sidebar_icons_at_18px}
- ${sidebar_icons_at_32px}
- ${sidebar_icons_at_36px}
- ${sidebar_icons_at_64px})
- if (NOT icons_at_128px)
- message(AUTHOR_WARNING "No 128px icon provided; this will not work on Mac OS X")
- endif()
-
-
- set(windows_icons_classic ${icons_at_16px}
- ${icons_at_24px}
- ${icons_at_32px}
- ${icons_at_48px}
- ${icons_at_64px}
- ${icons_at_128px})
- set(windows_icons_modern ${windows_icons_classic}
- ${icons_at_256px}
- ${icons_at_512px}
- ${icons_at_1024px})
-
- if (NOT (windows_icons_modern OR windows_icons_classic))
- message(AUTHOR_WARNING "No icons suitable for use on Windows provided")
- endif()
-
- if (ARG_OUTFILE_BASENAME)
- set (_outfilebasename "${ARG_OUTFILE_BASENAME}")
- else()
- set (_outfilebasename "${appsources}")
- endif()
- set (_outfilename "${CMAKE_CURRENT_BINARY_DIR}/${_outfilebasename}")
-
- if (WIN32 AND (windows_icons_modern OR windows_icons_classic))
- set(saved_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_FIND_MODULE_DIR})
- find_package(Png2Ico)
- find_package(IcoTool)
- set(CMAKE_MODULE_PATH "${saved_CMAKE_MODULE_PATH}")
-
- function(create_windows_icon_and_rc command args deps)
- add_custom_command(
- OUTPUT "${_outfilename}.ico"
- COMMAND ${command}
- ARGS ${args}
- DEPENDS ${deps}
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- )
- # this bit's a little hacky to make the dependency stuff work
- file(WRITE "${_outfilename}.rc.in" "IDI_ICON1 ICON DISCARDABLE \"${_outfilename}.ico\"\n")
- add_custom_command(
- OUTPUT "${_outfilename}.rc"
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy "${_outfilename}.rc.in" "${_outfilename}.rc"
- DEPENDS "${_outfilename}.ico"
- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
- )
- endfunction()
-
- if (IcoTool_FOUND)
- list(APPEND icotool_args "-c" "-o" "${_outfilename}.ico")
-
- # According to https://stackoverflow.com/a/40851713/2886832
- # Windows always chooses the first icon above 255px, all other ones will be ignored
- set(maxSize 0)
- foreach(size 256 512 1024)
- if(icons_at_${size}px)
- set(maxSize "${size}")
- endif()
- endforeach()
-
- foreach(size 16 32 48 64 128 ${maxSize})
- if(NOT icons_at_${size}px)
- continue()
- endif()
-
- set(icotool_icon_arg "")
- if(size STREQUAL "${maxSize}")
- # maxSize icon needs to be included as raw png
- list(APPEND icotool_args "-r")
- endif()
-
- foreach(icon ${icons_at_${size}px})
- list(APPEND icotool_args "${icons_at_${size}px}")
- endforeach()
- endforeach()
-
- create_windows_icon_and_rc(IcoTool::IcoTool "${icotool_args}" "${windows_icons_modern}")
- set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
-
- # standard png2ico has no rcfile argument
- elseif(Png2Ico_FOUND AND NOT Png2Ico_HAS_RCFILE_ARGUMENT AND windows_icons_classic)
- set(png2ico_args)
- list(APPEND png2ico_args "${_outfilename}.ico")
- list(APPEND png2ico_args "${windows_icons_classic}")
-
- create_windows_icon_and_rc(Png2Ico::Png2Ico "${png2ico_args}" "${windows_icons_classic}")
- set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
-
- # png2ico from kdewin provides rcfile argument
- elseif(Png2Ico_FOUND AND windows_icons_classic)
- add_custom_command(
- OUTPUT "${_outfilename}.rc" "${_outfilename}.ico"
- COMMAND Png2Ico::Png2Ico
- ARGS
- --rcfile "${_outfilename}.rc"
- "${_outfilename}.ico"
- ${windows_icons_classic}
- DEPENDS ${windows_icons_classic}
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- )
-
- set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
- # else none of the supported tools was found
- else()
- message(WARNING "Unable to find the png2ico or icotool utilities or icons in matching sizes - application will not have an application icon!")
- endif()
- elseif (APPLE AND mac_icons)
- # first generate .iconset directory structure, then convert to .icns format using the Mac OS X "iconutil" utility,
- # to create retina compatible icon, you need png source files in pixel resolution 16x16, 32x32, 64x64, 128x128,
- # 256x256, 512x512, 1024x1024
- find_program(ICONUTIL_EXECUTABLE NAMES iconutil)
- if (ICONUTIL_EXECUTABLE)
- add_custom_command(
- OUTPUT "${_outfilename}.iconset"
- COMMAND ${CMAKE_COMMAND}
- ARGS -E make_directory "${_outfilename}.iconset"
- )
- set(iconset_icons)
- macro(copy_icon filename sizename type)
- add_custom_command(
- OUTPUT "${_outfilename}.iconset/${type}_${sizename}.png"
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy
- "${filename}"
- "${_outfilename}.iconset/${type}_${sizename}.png"
- DEPENDS
- "${_outfilename}.iconset"
- "${filename}"
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- )
- list(APPEND iconset_icons
- "${_outfilename}.iconset/${type}_${sizename}.png")
- endmacro()
-
- # List of supported sizes and filenames taken from:
- # https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW4
- foreach(size 16 32 128 256 512)
- math(EXPR double_size "2 * ${size}")
- foreach(file ${icons_at_${size}px})
- copy_icon("${file}" "${size}x${size}" "icon")
- endforeach()
- foreach(file ${icons_at_${double_size}px})
- copy_icon("${file}" "${size}x${size}@2x" "icon")
- endforeach()
- endforeach()
-
- # List of supported sizes and filenames taken from:
- # https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
- foreach(file ${sidebar_icons_at_16px})
- copy_icon("${file}" "16x16" "sidebar")
- endforeach()
- foreach(file ${sidebar_icons_at_32px})
- copy_icon("${file}" "16x16@2x" "sidebar")
- endforeach()
- foreach(file ${sidebar_icons_at_32px})
- copy_icon("${file}" "18x18" "sidebar")
- endforeach()
- foreach(file ${sidebar_icons_at_64px})
- copy_icon("${file}" "18x18@2x" "sidebar")
- endforeach()
- foreach(file ${sidebar_icons_at_128px})
- copy_icon("${file}" "32x32" "sidebar")
- endforeach()
- foreach(file ${sidebar_icons_at_256px})
- copy_icon("${file}" "32x32@2x" "sidebar")
- endforeach()
-
- # generate .icns icon file
- add_custom_command(
- OUTPUT "${_outfilename}.icns"
- COMMAND ${ICONUTIL_EXECUTABLE}
- ARGS
- --convert icns
- --output "${_outfilename}.icns"
- "${_outfilename}.iconset"
- DEPENDS "${iconset_icons}"
- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
- )
- # This will register the icon into the bundle
- set(MACOSX_BUNDLE_ICON_FILE "${_outfilebasename}.icns" PARENT_SCOPE)
-
- # Append the icns file to the sources list so it will be a dependency to the
- # main target
- set(${appsources} "${${appsources}};${_outfilename}.icns" PARENT_SCOPE)
-
- # Install the icon into the Resources dir in the bundle
- set_source_files_properties("${_outfilename}.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
- else()
- message(STATUS "Unable to find the iconutil utility - application will not have an application icon!")
- endif()
- endif()
-endfunction()
-
-macro(_ecm_add_app_icon_categorize_icons icons type known_sizes)
- set(_${type}_known_sizes)
- foreach(size ${known_sizes})
- set(${type}_at_${size}px)
- list(APPEND _${type}_known_sizes ${size})
- endforeach()
-
-
- foreach(icon ${icons})
- get_filename_component(icon_full ${icon} ABSOLUTE)
- if (NOT EXISTS "${icon_full}")
- message(AUTHOR_WARNING "${icon_full} does not exist, ignoring")
- else()
- get_filename_component(icon_name ${icon} NAME)
- string(REGEX MATCH "([0-9]+)\\-[^/]+\\.([a-z]+)$"
- _dummy "${icon_name}")
- set(size "${CMAKE_MATCH_1}")
- set(ext "${CMAKE_MATCH_2}")
-
- if (NOT (ext STREQUAL "svg" OR ext STREQUAL "svgz"))
- if (NOT size)
- message(AUTHOR_WARNING "${icon_full} is not named correctly for ecm_add_app_icon - ignoring")
- elseif (NOT ext STREQUAL "png")
- message(AUTHOR_WARNING "${icon_full} is not a png file - ignoring")
- else()
- list(FIND _${type}_known_sizes ${size} offset)
-
- if (offset GREATER -1)
- list(APPEND ${type}_at_${size}px "${icon_full}")
- elseif()
- message(STATUS "not found ${type}_at_${size}px ${icon_full}")
- endif()
- endif()
- endif()
- endif()
- endforeach()
-endmacro()
diff --git a/cmake/modules/ECMFindModuleHelpers.cmake b/cmake/modules/ECMFindModuleHelpers.cmake
deleted file mode 100644
index f2e32f959..000000000
--- a/cmake/modules/ECMFindModuleHelpers.cmake
+++ /dev/null
@@ -1,297 +0,0 @@
-#.rst:
-# ECMFindModuleHelpers
-# --------------------
-#
-# Helper macros for find modules: ecm_find_package_version_check(),
-# ecm_find_package_parse_components() and
-# ecm_find_package_handle_library_components().
-#
-# ::
-#
-# ecm_find_package_version_check(<name>)
-#
-# Prints warnings if the CMake version or the project's required CMake version
-# is older than that required by extra-cmake-modules.
-#
-# ::
-#
-# ecm_find_package_parse_components(<name>
-# RESULT_VAR <variable>
-# KNOWN_COMPONENTS <component1> [<component2> [...]]
-# [SKIP_DEPENDENCY_HANDLING])
-#
-# This macro will populate <variable> with a list of components found in
-# <name>_FIND_COMPONENTS, after checking that all those components are in the
-# list of KNOWN_COMPONENTS; if there are any unknown components, it will print
-# an error or warning (depending on the value of <name>_FIND_REQUIRED) and call
-# return().
-#
-# The order of components in <variable> is guaranteed to match the order they
-# are listed in the KNOWN_COMPONENTS argument.
-#
-# If SKIP_DEPENDENCY_HANDLING is not set, for each component the variable
-# <name>_<component>_component_deps will be checked for dependent components.
-# If <component> is listed in <name>_FIND_COMPONENTS, then all its (transitive)
-# dependencies will also be added to <variable>.
-#
-# ::
-#
-# ecm_find_package_handle_library_components(<name>
-# COMPONENTS <component> [<component> [...]]
-# [SKIP_DEPENDENCY_HANDLING])
-# [SKIP_PKG_CONFIG])
-#
-# Creates an imported library target for each component. The operation of this
-# macro depends on the presence of a number of CMake variables.
-#
-# The <name>_<component>_lib variable should contain the name of this library,
-# and <name>_<component>_header variable should contain the name of a header
-# file associated with it (whatever relative path is normally passed to
-# '#include'). <name>_<component>_header_subdir variable can be used to specify
-# which subdirectory of the include path the headers will be found in.
-# ecm_find_package_components() will then search for the library
-# and include directory (creating appropriate cache variables) and create an
-# imported library target named <name>::<component>.
-#
-# Additional variables can be used to provide additional information:
-#
-# If SKIP_PKG_CONFIG, the <name>_<component>_pkg_config variable is set, and
-# pkg-config is found, the pkg-config module given by
-# <name>_<component>_pkg_config will be searched for and used to help locate the
-# library and header file. It will also be used to set
-# <name>_<component>_VERSION.
-#
-# Note that if version information is found via pkg-config,
-# <name>_<component>_FIND_VERSION can be set to require a particular version
-# for each component.
-#
-# If SKIP_DEPENDENCY_HANDLING is not set, the INTERFACE_LINK_LIBRARIES property
-# of the imported target for <component> will be set to contain the imported
-# targets for the components listed in <name>_<component>_component_deps.
-# <component>_FOUND will also be set to false if any of the compoments in
-# <name>_<component>_component_deps are not found. This requires the components
-# in <name>_<component>_component_deps to be listed before <component> in the
-# COMPONENTS argument.
-#
-# The following variables will be set:
-#
-# ``<name>_TARGETS``
-# the imported targets
-# ``<name>_LIBRARIES``
-# the found libraries
-# ``<name>_INCLUDE_DIRS``
-# the combined required include directories for the components
-# ``<name>_DEFINITIONS``
-# the "other" CFLAGS provided by pkg-config, if any
-# ``<name>_VERSION``
-# the value of ``<name>_<component>_VERSION`` for the first component that
-# has this variable set (note that components are searched for in the order
-# they are passed to the macro), although if it is already set, it will not
-# be altered
-#
-# Note that these variables are never cleared, so if
-# ecm_find_package_handle_library_components() is called multiple times with
-# different components (typically because of multiple find_package() calls) then
-# ``<name>_TARGETS``, for example, will contain all the targets found in any
-# call (although no duplicates).
-#
-# Since pre-1.0.0.
-
-#=============================================================================
-# Copyright 2014 Alex Merry <alex.merry@kde.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-include(CMakeParseArguments)
-
-macro(ecm_find_package_version_check module_name)
- if(CMAKE_VERSION VERSION_LESS 2.8.12)
- message(FATAL_ERROR "CMake 2.8.12 is required by Find${module_name}.cmake")
- endif()
- if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
- message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use Find${module_name}.cmake")
- endif()
-endmacro()
-
-macro(ecm_find_package_parse_components module_name)
- set(ecm_fppc_options SKIP_DEPENDENCY_HANDLING)
- set(ecm_fppc_oneValueArgs RESULT_VAR)
- set(ecm_fppc_multiValueArgs KNOWN_COMPONENTS DEFAULT_COMPONENTS)
- cmake_parse_arguments(ECM_FPPC "${ecm_fppc_options}" "${ecm_fppc_oneValueArgs}" "${ecm_fppc_multiValueArgs}" ${ARGN})
-
- if(ECM_FPPC_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "Unexpected arguments to ecm_find_package_parse_components: ${ECM_FPPC_UNPARSED_ARGUMENTS}")
- endif()
- if(NOT ECM_FPPC_RESULT_VAR)
- message(FATAL_ERROR "Missing RESULT_VAR argument to ecm_find_package_parse_components")
- endif()
- if(NOT ECM_FPPC_KNOWN_COMPONENTS)
- message(FATAL_ERROR "Missing KNOWN_COMPONENTS argument to ecm_find_package_parse_components")
- endif()
- if(NOT ECM_FPPC_DEFAULT_COMPONENTS)
- set(ECM_FPPC_DEFAULT_COMPONENTS ${ECM_FPPC_KNOWN_COMPONENTS})
- endif()
-
- if(${module_name}_FIND_COMPONENTS)
- set(ecm_fppc_requestedComps ${${module_name}_FIND_COMPONENTS})
-
- if(NOT ECM_FPPC_SKIP_DEPENDENCY_HANDLING)
- # Make sure deps are included
- foreach(ecm_fppc_comp ${ecm_fppc_requestedComps})
- foreach(ecm_fppc_dep_comp ${${module_name}_${ecm_fppc_comp}_component_deps})
- list(FIND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}" ecm_fppc_index)
- if("${ecm_fppc_index}" STREQUAL "-1")
- if(NOT ${module_name}_FIND_QUIETLY)
- message(STATUS "${module_name}: ${ecm_fppc_comp} requires ${${module_name}_${ecm_fppc_comp}_component_deps}")
- endif()
- list(APPEND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}")
- endif()
- endforeach()
- endforeach()
- else()
- message(STATUS "Skipping dependency handling for ${module_name}")
- endif()
- list(REMOVE_DUPLICATES ecm_fppc_requestedComps)
-
- # This makes sure components are listed in the same order as
- # KNOWN_COMPONENTS (potentially important for inter-dependencies)
- set(${ECM_FPPC_RESULT_VAR})
- foreach(ecm_fppc_comp ${ECM_FPPC_KNOWN_COMPONENTS})
- list(FIND ecm_fppc_requestedComps "${ecm_fppc_comp}" ecm_fppc_index)
- if(NOT "${ecm_fppc_index}" STREQUAL "-1")
- list(APPEND ${ECM_FPPC_RESULT_VAR} "${ecm_fppc_comp}")
- list(REMOVE_AT ecm_fppc_requestedComps ${ecm_fppc_index})
- endif()
- endforeach()
- # if there are any left, they are unknown components
- if(ecm_fppc_requestedComps)
- set(ecm_fppc_msgType STATUS)
- if(${module_name}_FIND_REQUIRED)
- set(ecm_fppc_msgType FATAL_ERROR)
- endif()
- if(NOT ${module_name}_FIND_QUIETLY)
- message(${ecm_fppc_msgType} "${module_name}: requested unknown components ${ecm_fppc_requestedComps}")
- endif()
- return()
- endif()
- else()
- set(${ECM_FPPC_RESULT_VAR} ${ECM_FPPC_DEFAULT_COMPONENTS})
- endif()
-endmacro()
-
-macro(ecm_find_package_handle_library_components module_name)
- set(ecm_fpwc_options SKIP_PKG_CONFIG SKIP_DEPENDENCY_HANDLING)
- set(ecm_fpwc_oneValueArgs)
- set(ecm_fpwc_multiValueArgs COMPONENTS)
- cmake_parse_arguments(ECM_FPWC "${ecm_fpwc_options}" "${ecm_fpwc_oneValueArgs}" "${ecm_fpwc_multiValueArgs}" ${ARGN})
-
- if(ECM_FPWC_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "Unexpected arguments to ecm_find_package_handle_components: ${ECM_FPWC_UNPARSED_ARGUMENTS}")
- endif()
- if(NOT ECM_FPWC_COMPONENTS)
- message(FATAL_ERROR "Missing COMPONENTS argument to ecm_find_package_handle_components")
- endif()
-
- include(FindPackageHandleStandardArgs)
- find_package(PkgConfig)
- foreach(ecm_fpwc_comp ${ECM_FPWC_COMPONENTS})
- set(ecm_fpwc_dep_vars)
- set(ecm_fpwc_dep_targets)
- if(NOT SKIP_DEPENDENCY_HANDLING)
- foreach(ecm_fpwc_dep ${${module_name}_${ecm_fpwc_comp}_component_deps})
- list(APPEND ecm_fpwc_dep_vars "${module_name}_${ecm_fpwc_dep}_FOUND")
- list(APPEND ecm_fpwc_dep_targets "${module_name}::${ecm_fpwc_dep}")
- endforeach()
- endif()
-
- if(NOT ECM_FPWC_SKIP_PKG_CONFIG AND ${module_name}_${ecm_fpwc_comp}_pkg_config)
- pkg_check_modules(PKG_${module_name}_${ecm_fpwc_comp} QUIET
- ${${module_name}_${ecm_fpwc_comp}_pkg_config})
- endif()
-
- find_path(${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
- NAMES ${${module_name}_${ecm_fpwc_comp}_header}
- HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_INCLUDE_DIRS}
- PATH_SUFFIXES ${${module_name}_${ecm_fpwc_comp}_header_subdir}
- )
- find_library(${module_name}_${ecm_fpwc_comp}_LIBRARY
- NAMES ${${module_name}_${ecm_fpwc_comp}_lib}
- HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_LIBRARY_DIRS}
- )
-
- set(${module_name}_${ecm_fpwc_comp}_VERSION "${PKG_${module_name}_${ecm_fpwc_comp}_VERSION}")
- if(NOT ${module_name}_VERSION)
- set(${module_name}_VERSION ${${module_name}_${ecm_fpwc_comp}_VERSION})
- endif()
-
- find_package_handle_standard_args(${module_name}_${ecm_fpwc_comp}
- FOUND_VAR
- ${module_name}_${ecm_fpwc_comp}_FOUND
- REQUIRED_VARS
- ${module_name}_${ecm_fpwc_comp}_LIBRARY
- ${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
- ${ecm_fpwc_dep_vars}
- VERSION_VAR
- ${module_name}_${ecm_fpwc_comp}_VERSION
- )
-
- mark_as_advanced(
- ${module_name}_${ecm_fpwc_comp}_LIBRARY
- ${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
- )
-
- if(${module_name}_${ecm_fpwc_comp}_FOUND)
- list(APPEND ${module_name}_LIBRARIES
- "${${module_name}_${ecm_fpwc_comp}_LIBRARY}")
- list(APPEND ${module_name}_INCLUDE_DIRS
- "${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}")
- set(${module_name}_DEFINITIONS
- ${${module_name}_DEFINITIONS}
- ${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS})
- if(NOT TARGET ${module_name}::${ecm_fpwc_comp})
- add_library(${module_name}::${ecm_fpwc_comp} UNKNOWN IMPORTED)
- set_target_properties(${module_name}::${ecm_fpwc_comp} PROPERTIES
- IMPORTED_LOCATION "${${module_name}_${ecm_fpwc_comp}_LIBRARY}"
- INTERFACE_COMPILE_OPTIONS "${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS}"
- INTERFACE_INCLUDE_DIRECTORIES "${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES "${ecm_fpwc_dep_targets}"
- )
- endif()
- list(APPEND ${module_name}_TARGETS
- "${module_name}::${ecm_fpwc_comp}")
- endif()
- endforeach()
- if(${module_name}_LIBRARIES)
- list(REMOVE_DUPLICATES ${module_name}_LIBRARIES)
- endif()
- if(${module_name}_INCLUDE_DIRS)
- list(REMOVE_DUPLICATES ${module_name}_INCLUDE_DIRS)
- endif()
- if(${module_name}_DEFINITIONS)
- list(REMOVE_DUPLICATES ${module_name}_DEFINITIONS)
- endif()
- if(${module_name}_TARGETS)
- list(REMOVE_DUPLICATES ${module_name}_TARGETS)
- endif()
-endmacro()
diff --git a/cmake/modules/ECMFindModuleHelpersStub.cmake b/cmake/modules/ECMFindModuleHelpersStub.cmake
deleted file mode 100644
index bb8c9a62f..000000000
--- a/cmake/modules/ECMFindModuleHelpersStub.cmake
+++ /dev/null
@@ -1 +0,0 @@
-include(${CMAKE_CURRENT_LIST_DIR}/../modules/ECMFindModuleHelpers.cmake)
diff --git a/cmake/modules/FindINotify.cmake b/cmake/modules/FindINotify.cmake
deleted file mode 100644
index 736e3dce4..000000000
--- a/cmake/modules/FindINotify.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-# This module defines
-# INOTIFY_INCLUDE_DIR, where to find inotify.h, etc.
-# INOTIFY_LIBRARY_DIR, the directory holding the inotify library.
-# INOTIFY_FOUND, If false, do not try to use inotify.
-# also defined, but not for general use are
-# INOTIFY_LIBRARY, where to find the inotify library.
-
-find_path(INOTIFY_INCLUDE_DIR sys/inotify.h
- PATH_SUFFIXES inotify)
-mark_as_advanced(INOTIFY_INCLUDE_DIR)
-
-find_library(INOTIFY_LIBRARY inotify PATH_SUFFIXES lib/inotify)
-
-get_filename_component(INOTIFY_LIBRARY_DIR ${INOTIFY_LIBRARY} PATH)
-mark_as_advanced(INOTIFY_LIBRARY_DIR)
-
-# all listed variables are TRUE
-# handle the QUIETLY and REQUIRED arguments and set INOTIFY_FOUND to TRUE if
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(INOTIFY DEFAULT_MSG INOTIFY_INCLUDE_DIR INOTIFY_LIBRARY_DIR)
-
-IF(INOTIFY_FOUND)
- SET(INotify_INCLUDE_DIRS ${INOTIFY_INCLUDE_DIR})
- SET(INotify_LIBRARY_DIRS ${INOTIFY_LIBRARY_DIR})
-ENDIF(INOTIFY_FOUND)
-
diff --git a/cmake/modules/FindIcoTool.cmake b/cmake/modules/FindIcoTool.cmake
deleted file mode 100644
index 3b3511eb3..000000000
--- a/cmake/modules/FindIcoTool.cmake
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2017 Vincent Pinon <vpinon@kde.org>
-include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
-ecm_find_package_version_check(IcoTool)
-find_program(IcoTool_EXECUTABLE NAMES icotool)
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(IcoTool
- FOUND_VAR
- IcoTool_FOUND
- REQUIRED_VARS
- IcoTool_EXECUTABLE
-)
-mark_as_advanced(IcoTool_EXECUTABLE)
-
-if (IcoTool_FOUND)
- if (NOT TARGET IcoTool::IcoTool)
- add_executable(IcoTool::IcoTool IMPORTED)
- set_target_properties(IcoTool::IcoTool PROPERTIES
- IMPORTED_LOCATION "${IcoTool_EXECUTABLE}"
- )
- endif()
-endif()
-
-include(FeatureSummary)
-set_package_properties(IcoTool PROPERTIES
- URL "http://www.nongnu.org/icoutils/"
- DESCRIPTION "Executable that converts a collection of PNG files into a Windows icon file"
-)
diff --git a/cmake/modules/FindLibSSH.cmake b/cmake/modules/FindLibSSH.cmake
deleted file mode 100644
index 94dbf762b..000000000
--- a/cmake/modules/FindLibSSH.cmake
+++ /dev/null
@@ -1,96 +0,0 @@
-# - Try to find LibSSH
-# Once done this will define
-#
-# LIBSSH_FOUND - system has LibSSH
-# LIBSSH_INCLUDE_DIRS - the LibSSH include directory
-# LIBSSH_LIBRARIES - Link these to use LibSSH
-# LIBSSH_DEFINITIONS - Compiler switches required for using LibSSH
-#
-# Copyright (c) 2009 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 (LIBSSH_LIBRARIES AND LIBSSH_INCLUDE_DIRS)
- # in cache already
- set(LIBSSH_FOUND TRUE)
-else (LIBSSH_LIBRARIES AND LIBSSH_INCLUDE_DIRS)
-
- find_path(LIBSSH_INCLUDE_DIR
- NAMES
- libssh/libssh.h
- PATHS
- /usr/include
- /usr/local/include
- /opt/local/include
- /sw/include
- ${CMAKE_INCLUDE_PATH}
- ${CMAKE_INSTALL_PREFIX}/include
- )
-
- find_library(SSH_LIBRARY
- NAMES
- ssh
- libssh
- PATHS
- /usr/lib
- /usr/local/lib
- /opt/local/lib
- /sw/lib
- ${CMAKE_LIBRARY_PATH}
- ${CMAKE_INSTALL_PREFIX}/lib
- )
-
- if (LIBSSH_INCLUDE_DIR AND SSH_LIBRARY)
- set(SSH_FOUND TRUE)
- endif (LIBSSH_INCLUDE_DIR AND SSH_LIBRARY)
-
- set(LIBSSH_INCLUDE_DIRS
- ${LIBSSH_INCLUDE_DIR}
- )
-
- if (SSH_FOUND)
- set(LIBSSH_LIBRARIES
- ${LIBSSH_LIBRARIES}
- ${SSH_LIBRARY}
- )
-
- if (LibSSH_FIND_VERSION)
- file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MAJOR
- REGEX "#define[ ]+LIBSSH_VERSION_MAJOR[ ]+[0-9]+")
- # Older versions of libssh like libssh-0.2 have LIBSSH_VERSION but not LIBSSH_VERSION_MAJOR
- if (LIBSSH_VERSION_MAJOR)
- string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MAJOR ${LIBSSH_VERSION_MAJOR})
- file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MINOR
- REGEX "#define[ ]+LIBSSH_VERSION_MINOR[ ]+[0-9]+")
- string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MINOR ${LIBSSH_VERSION_MINOR})
- file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_PATCH
- REGEX "#define[ ]+LIBSSH_VERSION_MICRO[ ]+[0-9]+")
- string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_PATCH ${LIBSSH_VERSION_PATCH})
-
- set(LibSSH_VERSION ${LIBSSH_VERSION_MAJOR}.${LIBSSH_VERSION_MINOR}.${LIBSSH_VERSION_PATCH})
-
- include(FindPackageVersionCheck)
- find_package_version_check(LibSSH DEFAULT_MSG)
- else (LIBSSH_VERSION_MAJOR)
- message(STATUS "LIBSSH_VERSION_MAJOR not found in ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h, assuming libssh is too old")
- set(LIBSSH_FOUND FALSE)
- endif (LIBSSH_VERSION_MAJOR)
- endif (LibSSH_FIND_VERSION)
- endif (SSH_FOUND)
-
- # If the version is too old, but libs and includes are set,
- # find_package_handle_standard_args will set LIBSSH_FOUND to TRUE again,
- # so we need this if() here.
- if (LIBSSH_FOUND)
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(LibSSH DEFAULT_MSG LIBSSH_LIBRARIES LIBSSH_INCLUDE_DIRS)
- endif (LIBSSH_FOUND)
-
- # show the LIBSSH_INCLUDE_DIRS and LIBSSH_LIBRARIES variables only in the advanced view
- mark_as_advanced(LIBSSH_INCLUDE_DIRS LIBSSH_LIBRARIES)
-
-endif (LIBSSH_LIBRARIES AND LIBSSH_INCLUDE_DIRS)
-
diff --git a/cmake/modules/FindPackageVersionCheck.cmake b/cmake/modules/FindPackageVersionCheck.cmake
deleted file mode 100644
index 7c026f362..000000000
--- a/cmake/modules/FindPackageVersionCheck.cmake
+++ /dev/null
@@ -1,72 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-# FIND_PACKAGE_VERSION_CHECK(NAME (DEFAULT_MSG|"Custom failure message"))
-# This function is intended to be used in FindXXX.cmake modules files.
-# It handles NAME_FIND_VERSION and NAME_VERSION variables in a Module.
-#
-# Example:
-# find_package(LibSSH 0.3.2)
-#
-# # check for the version and set it
-# set(LibSSH_VERSION 0.3.0)
-# find_package_version_check(LibSSH DEFAULT_MSG)
-#
-#
-# Copyright (c) 2009 Andreas Schneider <asn@cryptomilk.org>
-#
-# Redistribution and use is allowed according to the terms of the New
-# BSD license.
-
-function(FIND_PACKAGE_VERSION_CHECK _NAME _FAIL_MSG)
- string(TOUPPER ${_NAME} _NAME_UPPER)
- set(_AGE "old")
-
- if(${_NAME}_FIND_VERSION_EXACT)
- if (${_NAME}_FIND_VERSION VERSION_EQUAL ${_NAME}_VERSION)
- # exact version found
- set(${_NAME_UPPER}_FOUND TRUE)
- else (${_NAME}_FIND_VERSION VERSION_EQUAL ${_NAME}_VERSION)
- # exect version not found
- set(${_NAME_UPPER}_FOUND FALSE)
- # check if newer or older
- if (${_NAME}_FIND_VERSION VERSION_LESS ${_NAME}_VERSION)
- set(_AGE "new")
- else (${_NAME}_FIND_VERSION VERSION_LESS ${_NAME}_VERSION)
- set(_AGE "old")
- endif (${_NAME}_FIND_VERSION VERSION_LESS ${_NAME}_VERSION)
- endif (${_NAME}_FIND_VERSION VERSION_EQUAL ${_NAME}_VERSION)
- else (${_NAME}_FIND_VERSION_EXACT)
- if (${_NAME}_FIND_VERSION)
- if (${_NAME}_VERSION VERSION_LESS ${_NAME}_FIND_VERSION)
- set(${_NAME_UPPER}_FOUND FALSE)
- set(_AGE "old")
- else (${_NAME}_VERSION VERSION_LESS ${_NAME}_FIND_VERSION)
- set(${_NAME_UPPER}_FOUND TRUE)
- endif (${_NAME}_VERSION VERSION_LESS ${_NAME}_FIND_VERSION)
- endif (${_NAME}_FIND_VERSION)
- endif(${_NAME}_FIND_VERSION_EXACT)
-
- if ("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
- if (${_NAME}_FIND_VERSION_EXACT)
- set(_FAIL_MESSAGE "The installed ${_NAME} version ${${_NAME}_VERSION} is too ${_AGE}, version ${${_NAME}_FIND_VERSION} is required.")
- else (${_NAME}_FIND_VERSION_EXACT)
- set(_FAIL_MESSAGE "The installed ${_NAME} version ${${_NAME}_VERSION} is too ${_AGE}, at least version ${${_NAME}_FIND_VERSION} is required.")
- endif (${_NAME}_FIND_VERSION_EXACT)
- else ("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
- set(_FAIL_MESSAGE "${_FAIL_MSG}")
- endif ("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
-
- if (NOT ${_NAME_UPPER}_FOUND)
- if (${_NAME}_FIND_REQUIRED)
- message(FATAL_ERROR "${_FAIL_MESSAGE}")
- else (${_NAME}_FIND_REQUIRED)
- if (NOT ${_NAME}_FIND_QUIETLY)
- message(STATUS "${_FAIL_MESSAGE}")
- endif (NOT ${_NAME}_FIND_QUIETLY)
- endif (${_NAME}_FIND_REQUIRED)
- endif (NOT ${_NAME_UPPER}_FOUND)
-
- set(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
-endfunction(FIND_PACKAGE_VERSION_CHECK)
diff --git a/cmake/modules/FindPng2Ico.cmake b/cmake/modules/FindPng2Ico.cmake
deleted file mode 100644
index d84f66730..000000000
--- a/cmake/modules/FindPng2Ico.cmake
+++ /dev/null
@@ -1,117 +0,0 @@
-#.rst:
-# FindPng2Ico
-# -----------
-#
-# Try to find png2ico.
-#
-# If the png2ico executable is not in your PATH, you can provide
-# an alternative name or full path location with the ``Png2Ico_EXECUTABLE``
-# variable.
-#
-# This will define the following variables:
-#
-# ``Png2Ico_FOUND``
-# True if png2ico is available.
-#
-# ``Png2Ico_EXECUTABLE``
-# The png2ico executable.
-#
-# If ``Png2Ico_FOUND`` is TRUE, it will also define the following imported
-# target:
-#
-# ``Png2Ico::Png2Ico``
-# The png2ico executable.
-#
-# and the following variables:
-#
-# ``Png2Ico_HAS_COLORS_ARGUMENT``
-# Whether png2ico accepts a ``--colors`` argument. `Matthias Benkmann's
-# tool <http://www.winterdrache.de/freeware/png2ico/>`_ does, while the
-# version of png2ico from the `"KDE On Windows" (kdewin)
-# <https://projects.kde.org/projects/kdesupport/kdewin>`_ project does not.
-#
-# ``Png2Ico_HAS_RCFILE_ARGUMENT``
-# Whether png2ico accepts an ``--rcfile`` argument. The version of png2ico
-# from the `"KDE On Windows" (kdewin)
-# <https://projects.kde.org/projects/kdesupport/kdewin>`_ project does,
-# while `Matthias Benkmann's tool
-# <http://www.winterdrache.de/freeware/png2ico/>`_ does not.
-#
-# Since 1.7.0.
-
-#=============================================================================
-# Copyright 2014 Alex Merry <alex.merry@kde.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#=============================================================================
-
-include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
-
-ecm_find_package_version_check(Png2Ico)
-
-# Find png2ico
-find_program(Png2Ico_EXECUTABLE NAMES png2ico)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Png2Ico
- FOUND_VAR
- Png2Ico_FOUND
- REQUIRED_VARS
- Png2Ico_EXECUTABLE
-)
-
-mark_as_advanced(Png2Ico_EXECUTABLE)
-
-if (Png2Ico_FOUND)
- execute_process(
- COMMAND "${Png2Ico_EXECUTABLE}" --help
- OUTPUT_VARIABLE _png2ico_help_text
- ERROR_VARIABLE _png2ico_help_text
- )
- if (_png2ico_help_text MATCHES ".*--rcfile .*")
- set(Png2Ico_HAS_RCFILE_ARGUMENT TRUE)
- else()
- set(Png2Ico_HAS_RCFILE_ARGUMENT FALSE)
- endif()
- if (_png2ico_help_text MATCHES ".*--colors .*")
- set(Png2Ico_HAS_COLORS_ARGUMENT TRUE)
- else()
- set(Png2Ico_HAS_COLORS_ARGUMENT FALSE)
- endif()
- unset(_png2ico_help_text)
-
- if (NOT TARGET Png2Ico::Png2Ico)
- add_executable(Png2Ico::Png2Ico IMPORTED)
- set_target_properties(Png2Ico::Png2Ico PROPERTIES
- IMPORTED_LOCATION "${Png2Ico_EXECUTABLE}"
- )
- endif()
-endif()
-
-include(FeatureSummary)
-set_package_properties(Png2Ico PROPERTIES
- URL "http://www.winterdrache.de/freeware/png2ico/ or https://projects.kde.org/projects/kdesupport/kdewin"
- DESCRIPTION "Executable that converts a collection of PNG files into a Windows icon file"
-)
-
diff --git a/cmake/modules/FindQt5Keychain.cmake b/cmake/modules/FindQt5Keychain.cmake
deleted file mode 100644
index 4aff32d6f..000000000
--- a/cmake/modules/FindQt5Keychain.cmake
+++ /dev/null
@@ -1,50 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-# - Try to find QtKeychain
-# Once done this will define
-# QTKEYCHAIN_FOUND - System has QtKeychain
-# QTKEYCHAIN_INCLUDE_DIRS - The QtKeychain include directories
-# QTKEYCHAIN_LIBRARIES - The libraries needed to use QtKeychain
-# QTKEYCHAIN_DEFINITIONS - Compiler switches required for using LibXml2
-
-# When we build our own Qt we also need to build QtKeychain with it
-# so that it doesn't pull a different Qt version. For that reason
-# first look in the Qt lib directory for QtKeychain.
-get_target_property(_QTCORE_LIB_PATH Qt5::Core IMPORTED_LOCATION_RELEASE)
-
-# Use PATH here because Debian 7.0 has CMake 2.8.9 and DIRECTORY is only available from 2.8.12+
-get_filename_component(QT_LIB_DIR "${_QTCORE_LIB_PATH}" PATH)
-
-find_path(QTKEYCHAIN_INCLUDE_DIR
- NAMES
- keychain.h
- HINTS
- ${QT_LIB_DIR}/../include
- PATH_SUFFIXES
- qt5keychain
- )
-
-find_library(QTKEYCHAIN_LIBRARY
- NAMES
- qt5keychain
- lib5qtkeychain
- HINTS
- ${QT_LIB_DIR}
- PATHS
- /usr/lib
- /usr/lib/${CMAKE_ARCH_TRIPLET}
- /usr/local/lib
- /opt/local/lib
- ${CMAKE_LIBRARY_PATH}
- ${CMAKE_INSTALL_PREFIX}/lib
- )
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set QTKEYCHAIN_FOUND to TRUE
-# if all listed variables are TRUE
-find_package_handle_standard_args(Qt5Keychain DEFAULT_MSG
- QTKEYCHAIN_LIBRARY QTKEYCHAIN_INCLUDE_DIR)
-
-mark_as_advanced(QTKEYCHAIN_INCLUDE_DIR QTKEYCHAIN_LIBRARY)
diff --git a/cmake/modules/FindSQLite3.cmake b/cmake/modules/FindSQLite3.cmake
index 4fd1ceb53..c144ca1d8 100644
--- a/cmake/modules/FindSQLite3.cmake
+++ b/cmake/modules/FindSQLite3.cmake
@@ -1,70 +1,66 @@
-# - Try to find SQLite3
-# Once done this will define
-#
-# SQLITE3_FOUND - system has SQLite3
-# SQLITE3_INCLUDE_DIRS - the SQLite3 include directory
-# SQLITE3_LIBRARIES - Link these to use SQLite3
-# SQLITE3_DEFINITIONS - Compiler switches required for using SQLite3
-#
-# Copyright (c) 2009-2013 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.
-#
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+#[=======================================================================[.rst:
+FindSQLite3
+-----------
-if (UNIX)
- find_package(PkgConfig)
- if (PKG_CONFIG_FOUND)
- pkg_check_modules(_SQLITE3 sqlite3)
- endif (PKG_CONFIG_FOUND)
-endif (UNIX)
+Find the SQLite libraries, v3
-find_path(SQLITE3_INCLUDE_DIR
- NAMES
- sqlite3.h
- PATHS
- ${_SQLITE3_INCLUDEDIR}
- ${SQLITE3_INCLUDE_DIRS}
-)
+IMPORTED targets
+^^^^^^^^^^^^^^^^
-find_library(SQLITE3_LIBRARY
- NAMES
- sqlite3 sqlite3-0
- PATHS
- ${_SQLITE3_LIBDIR}
- ${SQLITE3_LIBRARIES}
-)
+This module defines the following :prop_tgt:`IMPORTED` target:
-set(SQLITE3_INCLUDE_DIRS
- ${SQLITE3_INCLUDE_DIR}
-)
+``SQLite::SQLite3``
-if (SQLITE3_LIBRARY)
- set(SQLITE3_LIBRARIES
- ${SQLITE3_LIBRARIES}
- ${SQLITE3_LIBRARY}
- )
-endif (SQLITE3_LIBRARY)
+Result variables
+^^^^^^^^^^^^^^^^
-if (SQLite3_FIND_VERSION AND _SQLITE3_VERSION)
- set(SQLite3_VERSION _SQLITE3_VERSION)
-endif (SQLite3_FIND_VERSION AND _SQLITE3_VERSION)
+This module will set the following variables if found:
-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()
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(SQLite3 DEFAULT_MSG SQLITE3_LIBRARIES SQLITE3_INCLUDE_DIRS)
-endif()
+``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)
-# show the SQLITE3_INCLUDE_DIRS and SQLITE3_LIBRARIES variables only in the advanced view
-mark_as_advanced(SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES)
+# 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/cmake/modules/GNUInstallDirs.cmake b/cmake/modules/GNUInstallDirs.cmake
deleted file mode 100644
index 5249477cb..000000000
--- a/cmake/modules/GNUInstallDirs.cmake
+++ /dev/null
@@ -1,253 +0,0 @@
-#.rst:
-# GNUInstallDirs
-# --------------
-#
-# Define GNU standard installation directories
-#
-# Provides install directory variables as defined for GNU software:
-#
-# ::
-#
-# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
-#
-# Inclusion of this module defines the following variables:
-#
-# ::
-#
-# CMAKE_INSTALL_<dir> - destination for files of a given type
-# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
-#
-# where <dir> is one of:
-#
-# ::
-#
-# BINDIR - user executables (bin)
-# SBINDIR - system admin executables (sbin)
-# LIBEXECDIR - program executables (libexec)
-# SYSCONFDIR - read-only single-machine data (etc)
-# SHAREDSTATEDIR - modifiable architecture-independent data (com)
-# LOCALSTATEDIR - modifiable single-machine data (var)
-# LIBDIR - object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian)
-# INCLUDEDIR - C header files (include)
-# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
-# DATAROOTDIR - read-only architecture-independent data root (share)
-# DATADIR - read-only architecture-independent data (DATAROOTDIR)
-# INFODIR - info documentation (DATAROOTDIR/info)
-# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
-# MANDIR - man documentation (DATAROOTDIR/man)
-# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
-#
-# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION
-# options of install() commands for the corresponding file type. If the
-# includer does not define a value the above-shown default will be used
-# and the value will appear in the cache for editing by the user. Each
-# CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
-# from the corresponding destination by prepending (if necessary) the
-# value of CMAKE_INSTALL_PREFIX.
-
-#=============================================================================
-# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
-# Copyright 2011 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# Installation directories
-#
-if(NOT DEFINED CMAKE_INSTALL_BINDIR)
- set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
-endif()
-
-if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
- set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
-endif()
-
-if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
- set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
-endif()
-
-if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
- set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
-endif()
-
-if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
- set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
-endif()
-
-if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
- set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
-endif()
-
-# We check if the variable was manually set and not cached, in order to
-# allow projects to set the values as normal variables before including
-# GNUInstallDirs to avoid having the entries cached or user-editable. It
-# replaces the "if(NOT DEFINED CMAKE_INSTALL_XXX)" checks in all the
-# other cases.
-# If CMAKE_INSTALL_LIBDIR is defined, if _libdir_set is false, then the
-# variable is a normal one, otherwise it is a cache one.
-get_property(_libdir_set CACHE CMAKE_INSTALL_LIBDIR PROPERTY TYPE SET)
-if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set
- AND DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX
- AND NOT "${_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_INSTALL_PREFIX}"))
- # If CMAKE_INSTALL_LIBDIR is not defined, it is always executed.
- # Otherwise:
- # * if _libdir_set is false it is not executed (meaning that it is
- # not a cache variable)
- # * if _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX is not defined it is
- # not executed
- # * if _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX and
- # CMAKE_INSTALL_PREFIX are the same string it is not executed.
- # _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX is updated after the
- # execution, of this part of code, therefore at the next inclusion
- # of the file, CMAKE_INSTALL_LIBDIR is defined, and the 2 strings
- # are equal, meaning that the if is not executed the code the
- # second time.
-
- set(_LIBDIR_DEFAULT "lib")
- # Override this default 'lib' with 'lib64' iff:
- # - we are on Linux system but NOT cross-compiling
- # - we are NOT on debian
- # - we are on a 64 bits system
- # reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
- # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
- # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
- # and CMAKE_INSTALL_PREFIX is "/usr"
- # See http://wiki.debian.org/Multiarch
- if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX)
- set(__LAST_LIBDIR_DEFAULT "lib")
- # __LAST_LIBDIR_DEFAULT is the default value that we compute from
- # _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX, not a cache entry for
- # the value that was last used as the default.
- # This value is used to figure out whether the user changed the
- # CMAKE_INSTALL_LIBDIR value manually, or if the value was the
- # default one. When CMAKE_INSTALL_PREFIX changes, the value is
- # updated to the new default, unless the user explicitly changed it.
- endif()
- if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
- AND NOT CMAKE_CROSSCOMPILING)
- if (EXISTS "/etc/debian_version") # is this a debian system ?
- if(CMAKE_LIBRARY_ARCHITECTURE)
- set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
- endif()
- else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
- if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
- message(AUTHOR_WARNING
- "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
- "Please enable at least one language before including GNUInstallDirs.")
- else()
- if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
- set(_LIBDIR_DEFAULT "lib64")
- if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX)
- set(__LAST_LIBDIR_DEFAULT "lib64")
- endif()
- endif()
- endif()
- endif()
- endif()
- if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
- set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
- elseif(DEFINED __LAST_LIBDIR_DEFAULT
- AND "${__LAST_LIBDIR_DEFAULT}" STREQUAL "${CMAKE_INSTALL_LIBDIR}")
- set_property(CACHE CMAKE_INSTALL_LIBDIR PROPERTY VALUE "${_LIBDIR_DEFAULT}")
- endif()
-endif()
-# Save for next run
-set(_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "CMAKE_INSTALL_PREFIX during last run")
-unset(_libdir_set)
-unset(__LAST_LIBDIR_DEFAULT)
-
-
-if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
- set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
-endif()
-
-if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
- set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
-endif()
-
-if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
- set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
-endif()
-
-#-----------------------------------------------------------------------------
-# Values whose defaults are relative to DATAROOTDIR. Store empty values in
-# the cache and store the defaults in local variables if the cache values are
-# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
-
-if(NOT CMAKE_INSTALL_DATADIR)
- set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
- set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
-endif()
-
-if(NOT CMAKE_INSTALL_INFODIR)
- set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
- set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
-endif()
-
-if(NOT CMAKE_INSTALL_LOCALEDIR)
- set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
- set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
-endif()
-
-if(NOT CMAKE_INSTALL_MANDIR)
- set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
- set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
-endif()
-
-if(NOT CMAKE_INSTALL_DOCDIR)
- set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
- set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
-endif()
-
-#-----------------------------------------------------------------------------
-
-mark_as_advanced(
- CMAKE_INSTALL_BINDIR
- CMAKE_INSTALL_SBINDIR
- CMAKE_INSTALL_LIBEXECDIR
- CMAKE_INSTALL_SYSCONFDIR
- CMAKE_INSTALL_SHAREDSTATEDIR
- CMAKE_INSTALL_LOCALSTATEDIR
- CMAKE_INSTALL_LIBDIR
- CMAKE_INSTALL_INCLUDEDIR
- CMAKE_INSTALL_OLDINCLUDEDIR
- CMAKE_INSTALL_DATAROOTDIR
- CMAKE_INSTALL_DATADIR
- CMAKE_INSTALL_INFODIR
- CMAKE_INSTALL_LOCALEDIR
- CMAKE_INSTALL_MANDIR
- CMAKE_INSTALL_DOCDIR
- )
-
-# Result directories
-#
-foreach(dir
- BINDIR
- SBINDIR
- LIBEXECDIR
- SYSCONFDIR
- SHAREDSTATEDIR
- LOCALSTATEDIR
- LIBDIR
- INCLUDEDIR
- OLDINCLUDEDIR
- DATAROOTDIR
- DATADIR
- INFODIR
- LOCALEDIR
- MANDIR
- DOCDIR
- )
- if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
- set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
- else()
- set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
- endif()
-endforeach()
diff --git a/cmake/modules/MacOSXBundleInfo.plist.in b/cmake/modules/MacOSXBundleInfo.plist.in
deleted file mode 100644
index 8ae6e09fd..000000000
--- a/cmake/modules/MacOSXBundleInfo.plist.in
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
- <key>LSUIElement</key>
- <true/>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>@APPLICATION_EXECUTABLE@</string>
- <key>CFBundleIconFile</key>
- <string>@APPLICATION_ICON_NAME@.icns</string>
- <key>CFBundleIdentifier</key>
- <string>@APPLICATION_REV_DOMAIN@</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleLongVersionString</key>
- <string>@APPLICATION_NAME_XML_ESCAPED@ @MIRALL_VERSION_STRING@</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>@MIRALL_VERSION_FULL@</string>
- <key>CFBundleShortVersionString</key>
- <string>@MIRALL_VERSION_STRING@</string>
- <key>NSHumanReadableCopyright</key>
- <string>(C) 2014-2020 @APPLICATION_VENDOR@</string>
- <key>SUShowReleaseNotes</key>
- <false/>
- <key>SUPublicDSAKeyFile</key>
- <string>dsa_pub.pem</string>
-
-<key>UTExportedTypeDeclarations</key>
-<array>
- <dict>
- <key>UTTypeIdentifier</key>
- <string>@APPLICATION_REV_DOMAIN@.VIRTUALFILE</string>
- <key>UTTypeTagSpecification</key>
- <dict>
- <key>public.filename-extension</key>
- <string>@APPLICATION_VIRTUALFILE_SUFFIX@</string>
- <key>public.mime-type</key>
- <string>application/octet-stream</string>
- </dict>
- <key>UTTypeConformsTo</key>
- <array>
- <string>public.data</string>
- </array>
- </dict>
-</array>
-
-<key>CFBundleDocumentTypes</key>
-<array>
- <dict>
- <key>CFBundleTypeName</key>
- <string>@APPLICATION_EXECUTABLE@ Download Virtual File</string>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- <key>LSHandlerRank</key>
- <string>Owner</string>
- <key>LSItemContentTypes</key>
- <array>
- <string>@APPLICATION_REV_DOMAIN@.VIRTUALFILE</string>
- </array>
- </dict>
-</array>
-
-
-</dict>
-</plist>
diff --git a/cmake/modules/MacroAddCompileFlags.cmake b/cmake/modules/MacroAddCompileFlags.cmake
deleted file mode 100644
index 8c5129609..000000000
--- a/cmake/modules/MacroAddCompileFlags.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-# - MACRO_ADD_COMPILE_FLAGS(target_name flag1 ... flagN)
-
-# Copyright (c) 2006, Oswald Buddenhagen, <ossi@kde.org>
-# Copyright (c) 2006, Andreas Schneider, <asn@cryptomilk.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-macro (MACRO_ADD_COMPILE_FLAGS _target)
-
- get_target_property(_flags ${_target} COMPILE_FLAGS)
- if (_flags)
- set(_flags ${_flags} ${ARGN})
- else (_flags)
- set(_flags ${ARGN})
- endif (_flags)
-
- set_target_properties(${_target} PROPERTIES COMPILE_FLAGS ${_flags})
-
-endmacro (MACRO_ADD_COMPILE_FLAGS)
diff --git a/cmake/modules/MacroAddLinkFlags.cmake b/cmake/modules/MacroAddLinkFlags.cmake
deleted file mode 100644
index eaef15401..000000000
--- a/cmake/modules/MacroAddLinkFlags.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-# - MACRO_ADD_LINK_FLAGS(target_name flag1 ... flagN)
-
-# Copyright (c) 2006, Oswald Buddenhagen, <ossi@kde.org>
-# Copyright (c) 2006, Andreas Schneider, <asn@cryptomilk.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-macro (MACRO_ADD_LINK_FLAGS _target)
-
- get_target_property(_flags ${_target} LINK_FLAGS)
- if (_flags)
- set(_flags "${_flags} ${ARGN}")
- else (_flags)
- set(_flags "${ARGN}")
- endif (_flags)
-
- set_target_properties(${_target} PROPERTIES LINK_FLAGS "${_flags}")
-
-endmacro (MACRO_ADD_LINK_FLAGS)
diff --git a/cmake/modules/MacroEnsureOutOfSourceBuild.cmake b/cmake/modules/MacroEnsureOutOfSourceBuild.cmake
deleted file mode 100644
index a2e948099..000000000
--- a/cmake/modules/MacroEnsureOutOfSourceBuild.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-# - MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>)
-# MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>)
-
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-macro (MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage)
-
- string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" _insource)
- if (_insource)
- message(SEND_ERROR "${_errorMessage}")
- message(FATAL_ERROR "Remove the file CMakeCache.txt in ${CMAKE_SOURCE_DIR} first.")
- endif (_insource)
-
-endmacro (MACRO_ENSURE_OUT_OF_SOURCE_BUILD)
diff --git a/cmake/modules/MacroLogFeature.cmake b/cmake/modules/MacroLogFeature.cmake
deleted file mode 100644
index 45e27b6df..000000000
--- a/cmake/modules/MacroLogFeature.cmake
+++ /dev/null
@@ -1,157 +0,0 @@
-# This file defines the Feature Logging macros.
-#
-# MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]])
-# Logs the information so that it can be displayed at the end
-# of the configure run
-# VAR : TRUE or FALSE, indicating whether the feature is supported
-# FEATURE: name of the feature, e.g. "libjpeg"
-# DESCRIPTION: description what this feature provides
-# URL: home page
-# REQUIRED: TRUE or FALSE, indicating whether the featue is required
-# MIN_VERSION: minimum version number. empty string if unneeded
-# COMMENTS: More info you may want to provide. empty string if unnecessary
-#
-# MACRO_DISPLAY_FEATURE_LOG()
-# Call this to display the collected results.
-# Exits CMake with a FATAL error message if a required feature is missing
-#
-# Example:
-#
-# INCLUDE(MacroLogFeature)
-#
-# FIND_PACKAGE(JPEG)
-# MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "")
-# ...
-# MACRO_DISPLAY_FEATURE_LOG()
-
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-# Copyright (c) 2006, Allen Winter, <winter@kde.org>
-# Copyright (c) 2009, Sebastian Trueg, <trueg@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-IF (NOT _macroLogFeatureAlreadyIncluded)
- SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
- IF (EXISTS ${_file})
- FILE(REMOVE ${_file})
- ENDIF (EXISTS ${_file})
-
- SET(_file ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
- IF (EXISTS ${_file})
- FILE(REMOVE ${_file})
- ENDIF (EXISTS ${_file})
-
- SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
- IF (EXISTS ${_file})
- FILE(REMOVE ${_file})
- ENDIF (EXISTS ${_file})
-
- SET(_macroLogFeatureAlreadyIncluded TRUE)
-
- INCLUDE(FeatureSummary)
-
-ENDIF (NOT _macroLogFeatureAlreadyIncluded)
-
-
-MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments)
-
- STRING(TOUPPER "${ARGV4}" _required)
- SET(_minvers "${ARGV5}")
- SET(_comments "${ARGV6}")
-
- IF (${_var})
- SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
- ELSE (${_var})
- IF ("${_required}" STREQUAL "TRUE")
- SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
- ELSE ("${_required}" STREQUAL "TRUE")
- SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
- ENDIF ("${_required}" STREQUAL "TRUE")
- ENDIF (${_var})
-
- SET(_logtext " * ${_package}")
-
- IF (NOT ${_var})
- IF (${_minvers} MATCHES ".*")
- SET(_logtext "${_logtext} (${_minvers} or higher)")
- ENDIF (${_minvers} MATCHES ".*")
- SET(_logtext "${_logtext} <${_url}>\n ")
- ELSE (NOT ${_var})
- SET(_logtext "${_logtext} - ")
- ENDIF (NOT ${_var})
-
- SET(_logtext "${_logtext}${_description}")
-
- IF (NOT ${_var})
- IF (${_comments} MATCHES ".*")
- SET(_logtext "${_logtext}\n ${_comments}")
- ENDIF (${_comments} MATCHES ".*")
-# SET(_logtext "${_logtext}\n") #double-space missing features?
- ENDIF (NOT ${_var})
-
- FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n")
-
- IF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3
- SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"")
- ENDIF(COMMAND SET_PACKAGE_INFO)
-
-ENDMACRO(MACRO_LOG_FEATURE)
-
-
-MACRO(MACRO_DISPLAY_FEATURE_LOG)
- IF(COMMAND FEATURE_SUMMARY) # in FeatureSummary.cmake since CMake 2.8.3
- FEATURE_SUMMARY(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/FindPackageLog.txt
- WHAT ALL)
- ENDIF(COMMAND FEATURE_SUMMARY)
-
- SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
- SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
- SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
-
- IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
- SET(_printSummary TRUE)
- ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
-
- IF(_printSummary)
- SET(_missingDeps 0)
- IF (EXISTS ${_enabledFile})
- FILE(READ ${_enabledFile} _enabled)
- FILE(REMOVE ${_enabledFile})
- SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following external packages were located on your system.\n-- This installation will have the extra features provided by these packages.\n-----------------------------------------------------------------------------\n${_enabled}")
- ENDIF (EXISTS ${_enabledFile})
-
-
- IF (EXISTS ${_disabledFile})
- SET(_missingDeps 1)
- FILE(READ ${_disabledFile} _disabled)
- FILE(REMOVE ${_disabledFile})
- SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following OPTIONAL packages could NOT be located on your system.\n-- Consider installing them to enable more features from this software.\n-----------------------------------------------------------------------------\n${_disabled}")
- ENDIF (EXISTS ${_disabledFile})
-
-
- IF (EXISTS ${_missingFile})
- SET(_missingDeps 1)
- FILE(READ ${_missingFile} _requirements)
- SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- You must install these packages before continuing.\n-----------------------------------------------------------------------------\n${_requirements}")
- FILE(REMOVE ${_missingFile})
- SET(_haveMissingReq 1)
- ENDIF (EXISTS ${_missingFile})
-
-
- IF (NOT ${_missingDeps})
- SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- Congratulations! All external packages have been found.")
- ENDIF (NOT ${_missingDeps})
-
-
- MESSAGE(${_summary})
- MESSAGE("-----------------------------------------------------------------------------\n")
-
-
- IF(_haveMissingReq)
- MESSAGE(FATAL_ERROR "Exiting: Missing Requirements")
- ENDIF(_haveMissingReq)
-
- ENDIF(_printSummary)
-
-ENDMACRO(MACRO_DISPLAY_FEATURE_LOG)
diff --git a/cmake/modules/MacroOptionalFindPackage.cmake b/cmake/modules/MacroOptionalFindPackage.cmake
deleted file mode 100644
index a066bc781..000000000
--- a/cmake/modules/MacroOptionalFindPackage.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
-# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
-# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
-# This macro is a combination of OPTION() and FIND_PACKAGE(), it
-# works like FIND_PACKAGE(), but additionally it automatically creates
-# an option name WITH_<name>, which can be disabled via the cmake GUI.
-# or via -DWITH_<name>=OFF
-# The standard <name>_FOUND variables can be used in the same way
-# as when using the normal FIND_PACKAGE()
-
-# Copyright (c) 2006-2010 Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-# This is just a helper macro to set a bunch of variables empty.
-# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
-macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
- if(DEFINED ${_name}_${_var})
- set(${_name}_${_var} "")
- endif(DEFINED ${_name}_${_var})
-
- string(TOUPPER ${_name} _nameUpper)
- if(DEFINED ${_nameUpper}_${_var})
- set(${_nameUpper}_${_var} "")
- endif(DEFINED ${_nameUpper}_${_var})
-endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
-
-
-macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
- option(WITH_${_name} "Search for ${_name} package" ON)
- if (WITH_${_name})
- find_package(${_name} ${ARGN})
- else (WITH_${_name})
- string(TOUPPER ${_name} _nameUpper)
- set(${_name}_FOUND FALSE)
- set(${_nameUpper}_FOUND FALSE)
-
- _mofp_set_empty_if_defined(${_name} INCLUDE_DIRS)
- _mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
- _mofp_set_empty_if_defined(${_name} INCLUDES)
- _mofp_set_empty_if_defined(${_name} LIBRARY)
- _mofp_set_empty_if_defined(${_name} LIBRARIES)
- _mofp_set_empty_if_defined(${_name} LIBS)
- _mofp_set_empty_if_defined(${_name} FLAGS)
- _mofp_set_empty_if_defined(${_name} DEFINITIONS)
- endif (WITH_${_name})
-endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
diff --git a/cmake/modules/NSIS.InstallOptions.ini.in b/cmake/modules/NSIS.InstallOptions.ini.in
deleted file mode 100644
index 566c0b47d..000000000
--- a/cmake/modules/NSIS.InstallOptions.ini.in
+++ /dev/null
@@ -1,24 +0,0 @@
-[Settings]
-NumFields=3
-
-[Field 1]
-Type=Label
-Left=0
-Right=-1
-Top=0
-Bottom=24
-
-[Field 2]
-Type=RadioButton
-Left=30
-Right=-1
-Top=50
-Bottom=58
-State=1
-
-[Field 3]
-Type=RadioButton
-Left=30
-Right=-1
-Top=70
-Bottom=78
diff --git a/cmake/modules/NSIS.template.in b/cmake/modules/NSIS.template.in
deleted file mode 100644
index 3840b6f05..000000000
--- a/cmake/modules/NSIS.template.in
+++ /dev/null
@@ -1,871 +0,0 @@
-;ownCloud installer script.
-
-!define APPLICATION_SHORTNAME "@APPLICATION_EXECUTABLE@"
-!define APPLICATION_NAME "@APPLICATION_NAME@"
-!define APPLICATION_VENDOR "@APPLICATION_VENDOR@"
-!define APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@.exe"
-!define APPLICATION_CMD_EXECUTABLE "@APPLICATION_EXECUTABLE@cmd.exe"
-!define APPLICATION_DOMAIN "@APPLICATION_DOMAIN@"
-!define APPLICATION_LICENSE "@APPLICATION_LICENSE@"
-!define APPLICATION_VIRTUALFILE_SUFFIX "@APPLICATION_VIRTUALFILE_SUFFIX@"
-!define APPLICATION_VIRTUALFILE_FILECLASS "@APPLICATION_EXECUTABLE@.@APPLICATION_VIRTUALFILE_SUFFIX@"
-!define WIN_SETUP_BITMAP_PATH "@WIN_SETUP_BITMAP_PATH@"
-
-!define CRASHREPORTER_EXECUTABLE "@CRASHREPORTER_EXECUTABLE@"
-
-;-----------------------------------------------------------------------------
-; Some installer script options (comment-out options not required)
-;-----------------------------------------------------------------------------
-!if "@APPLICATION_LICENSE@" != ""
- !define OPTION_LICENSE_AGREEMENT
-!endif
-!define OPTION_UAC_PLUGIN_ENHANCED
-!define OPTION_SECTION_SC_SHELL_EXT
-!define OPTION_SECTION_SC_START_MENU
-!define OPTION_SECTION_SC_DESKTOP
-!define OPTION_SECTION_SC_QUICK_LAUNCH
-!define OPTION_FINISHPAGE
-!define OPTION_FINISHPAGE_LAUNCHER
-; !define OPTION_FINISHPAGE_RELEASE_NOTES
-
-;-----------------------------------------------------------------------------
-; Some paths.
-;-----------------------------------------------------------------------------
-!ifndef MING_PATH
- !define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
-!endif
-!define MING_BIN "${MING_PATH}/bin"
-!define MING_LIB "${MING_PATH}/lib"
-!define MING_SHARE "${MING_PATH}/share"
-!define BUILD_PATH "@CMAKE_BINARY_DIR@"
-!define SOURCE_PATH "@CMAKE_SOURCE_DIR@"
-!define QT_DLL_PATH "${MING_BIN}"
-!define ACCESSIBLE_DLL_PATH "${MING_LIB}/qt5/plugins/accessible"
-!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt5/plugins/imageformats"
-!define PLATFORMS_DLL_PATH "${MING_LIB}/qt5/plugins/platforms"
-
-!define CSYNC_LIBRARY_DIR "@CSYNC_LIBRARY_DIR@"
-!define CSYNC_CONFIG_DIR "@CSYNC_CONFIG_DIR@"
-
-!define NSI_PATH "${source_path}/admin/win/nsi"
-
-;-----------------------------------------------------------------------------
-; Installer version
-;-----------------------------------------------------------------------------
-
-!define VER_MAJOR "@CPACK_PACKAGE_VERSION_MAJOR@"
-!define VER_MINOR "@CPACK_PACKAGE_VERSION_MINOR@"
-!define VER_PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
-!define VER_BUILD "@CPACK_PACKAGE_VERSION_BUILD@"
-!define VERSION "@CPACK_PACKAGE_VERSION@"
-
-Var InstallRunIfSilent
-Var NoAutomaticUpdates
-
-;-----------------------------------------------------------------------------
-; Installer build timestamp.
-;-----------------------------------------------------------------------------
-!define /date BUILD_TIME "built on %Y/%m/%d at %I:%M %p"
-
-;-----------------------------------------------------------------------------
-; Initial installer setup and definitions.
-;-----------------------------------------------------------------------------
-Name "@CPACK_NSIS_PACKAGE_NAME@"
-BrandingText "${APPLICATION_NAME} ${VERSION} -- ${BUILD_TIME}"
-OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
-InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-InstallDirRegKey HKCU "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
-InstType Standard
-InstType Full
-InstType Minimal
-CRCCheck On
-SetCompressor @CPACK_NSIS_COMPRESSOR@
-RequestExecutionLevel user ;Now using the UAC plugin.
-ReserveFile NSIS.InstallOptions.ini
-ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
-
-@CPACK_NSIS_SECTION_SELECTED_VARS@
-
-;-----------------------------------------------------------------------------
-; Include some required header files.
-;-----------------------------------------------------------------------------
-!include LogicLib.nsh ;Used by APPDATA uninstaller.
-!include MUI2.nsh ;Used by APPDATA uninstaller.
-!include InstallOptions.nsh ;Required by MUI2 to support old MUI_INSTALLOPTIONS.
-!include Memento.nsh ;Remember user selections.
-!include WinVer.nsh ;Windows version detection.
-!include WordFunc.nsh ;Used by VersionCompare macro function.
-!include FileFunc.nsh ;Used to read out parameters
-!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
-!include nsProcess.nsh ;Used to kill the running process
-!include Library.nsh ;Used by the COM registration for shell extensions
-!include x64.nsh ;Used to determine the right arch for the shell extensions
-
-!include ${source_path}/admin/win/nsi/lib/fileassoc.nsh
-
-;-----------------------------------------------------------------------------
-; Memento selections stored in registry.
-;-----------------------------------------------------------------------------
-!define MEMENTO_REGISTRY_ROOT HKLM
-!define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}"
-
-;-----------------------------------------------------------------------------
-; Modern User Interface (MUI) definitions and setup.
-;-----------------------------------------------------------------------------
-!define MUI_ABORTWARNING
-!define MUI_ICON ${NSI_PATH}\installer.ico
-!define MUI_UNICON ${NSI_PATH}\installer.ico
-!define MUI_WELCOMEFINISHPAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/welcome.bmp
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
-!define MUI_COMPONENTSPAGE_SMALLDESC
-; We removed this, h1 issue 191687
-;!define MUI_FINISHPAGE_LINK "${APPLICATION_DOMAIN}"
-;!define MUI_FINISHPAGE_LINK_LOCATION "http://${APPLICATION_DOMAIN}"
-!define MUI_FINISHPAGE_NOREBOOTSUPPORT
-!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
- !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
- !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NOTES.txt"
- !define MUI_FINISHPAGE_SHOWREADME_TEXT $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING
-!endif
-!ifdef OPTION_FINISHPAGE_LAUNCHER
- !define MUI_FINISHPAGE_NOAUTOCLOSE
- !define MUI_FINISHPAGE_RUN
- !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchApplication"
-!endif
-
-;-----------------------------------------------------------------------------
-; Page macros.
-;-----------------------------------------------------------------------------
-!insertmacro MUI_PAGE_WELCOME
-!ifdef OPTION_LICENSE_AGREEMENT
- !insertmacro MUI_PAGE_LICENSE "${APPLICATION_LICENSE}"
-!endif
-Page custom PageReinstall PageLeaveReinstall
-!insertmacro MUI_PAGE_COMPONENTS
-!insertmacro MUI_PAGE_DIRECTORY
-!insertmacro MUI_PAGE_INSTFILES
-!ifdef OPTION_FINISHPAGE
- !insertmacro MUI_PAGE_FINISH
-!endif
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-
-;-----------------------------------------------------------------------------
-; Other MUI macros.
-;-----------------------------------------------------------------------------
-!insertmacro MUI_LANGUAGE "English"
-
-!include ${source_path}/admin/win/nsi/l10n/languages.nsh
-!include ${source_path}/admin/win/nsi/l10n/declarations.nsh
-
-; Set version strings with english locale
-VIProductVersion "${VERSION}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APPLICATION_NAME}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${APPLICATION_VENDOR}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
-
-!macro SETLANG un
- Function ${un}SetLang
- # load the selected language file
- !include "${source_path}/admin/win/nsi/l10n\English.nsh"
- StrCmp $LANGUAGE ${LANG_GERMAN} German 0
- StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
- StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
- StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
- StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
- StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
- StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
- StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
- StrCmp $LANGUAGE ${LANG_GREEK} Greek 0
- StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
- StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
- StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
- StrCmp $LANGUAGE ${LANG_TURKISH} Turkish 0
- StrCmp $LANGUAGE ${LANG_NORWEGIAN} Norwegian 0
- StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
- German:
- !include "${source_path}/admin/win/nsi/l10n\German.nsh"
- Goto EndLanguageCmp
- Dutch:
- !include "${source_path}/admin/win/nsi/l10n\Dutch.nsh"
- Goto EndLanguageCmp
- Finnish:
- !include "${source_path}/admin/win/nsi/l10n\Finnish.nsh"
- Goto EndLanguageCmp
- Japanese:
- !include "${source_path}/admin/win/nsi/l10n\Japanese.nsh"
- Goto EndLanguageCmp
- Slovenian:
- !include "${source_path}/admin/win/nsi/l10n\Slovenian.nsh"
- Goto EndLanguageCmp
- Spanish:
- !include "${source_path}/admin/win/nsi/l10n\Spanish.nsh"
- Goto EndLanguageCmp
- Italian:
- !include "${source_path}/admin/win/nsi/l10n\Italian.nsh"
- Goto EndLanguageCmp
- Estonian:
- !include "${source_path}/admin/win/nsi/l10n\Estonian.nsh"
- Goto EndLanguageCmp
- Greek:
- !include "${source_path}/admin/win/nsi/l10n\Greek.nsh"
- Goto EndLanguageCmp
- Basque:
- !include "${source_path}/admin/win/nsi/l10n\Basque.nsh"
- Goto EndLanguageCmp
- Galician:
- !include "${source_path}/admin/win/nsi/l10n\Galician.nsh"
- Goto EndLanguageCmp
- Polish:
- !include "${source_path}/admin/win/nsi/l10n\Polish.nsh"
- Goto EndLanguageCmp
- Turkish:
- !include "${source_path}/admin/win/nsi/l10n\Turkish.nsh"
- Goto EndLanguageCmp
- Brazilian:
- !include "${source_path}/admin/win/nsi/l10n\PortugueseBR.nsh"
- Goto EndLanguageCmp
- Norwegian:
- !include "${source_path}/admin/win/nsi/l10n\Norwegian.nsh"
- EndLanguageCmp:
-
- FunctionEnd
-!macroend
-
-!insertmacro SETLANG ""
-!insertmacro SETLANG "un."
-
-; Usage: ${If} ${HasSection} SectionName
-!macro _HasSection _a _b _t _f
- ReadRegDWORD $_LOGICLIB_TEMP "${MEMENTO_REGISTRY_ROOT}" "${MEMENTO_REGISTRY_KEY}" "MementoSection_${_b}"
- IntCmpU $_LOGICLIB_TEMP 0 ${_f} ${_t}
-!macroend
-!define HasSection `"" HasSection`
-
-##############################################################################
-# #
-# FINISH PAGE LAUNCHER FUNCTIONS #
-# #
-##############################################################################
-
-Function LaunchApplication
- !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "" ""
-FunctionEnd
-
-##############################################################################
-# #
-# PROCESS HANDLING FUNCTIONS AND MACROS #
-# #
-##############################################################################
-
-!macro CheckForProcess processName gotoWhenFound gotoWhenNotFound
- ${nsProcess::FindProcess} ${processName} $R0
- StrCmp $R0 0 ${gotoWhenFound} ${gotoWhenNotFound}
-!macroend
-
-!macro ConfirmEndProcess processName
- MessageBox MB_YESNO|MB_ICONEXCLAMATION \
- $ConfirmEndProcess_MESSAGEBOX_TEXT \
- /SD IDYES IDYES process_${processName}_kill IDNO process_${processName}_ended
- process_${processName}_kill:
- DetailPrint $ConfirmEndProcess_KILLING_PROCESSES_TEXT
- ${nsProcess::KillProcess} ${processName} $R0
- Sleep 1500
- StrCmp $R0 "1" process_${processName}_ended
- DetailPrint $ConfirmEndProcess_KILL_NOT_FOUND_TEXT
- process_${processName}_ended:
-!macroend
-
-!macro CheckAndConfirmEndProcess processName
- !insertmacro CheckForProcess ${processName} 0 no_process_${processName}_to_end
- !insertmacro ConfirmEndProcess ${processName}
- no_process_${processName}_to_end:
-!macroend
-
-Function EnsureOwncloudShutdown
- !insertmacro CheckAndConfirmEndProcess "${APPLICATION_EXECUTABLE}"
-FunctionEnd
-
-Function InstallRedistributables
- ${If} ${RunningX64}
- ExecWait '"$OUTDIR\vcredist_x64.exe" /install /quiet'
- ${Else}
- ExecWait '"$OUTDIR\vcredist_x86.exe" /install /quiet'
- ${EndIf}
- Delete "$OUTDIR\vcredist_x86.exe"
- Delete "$OUTDIR\vcredist_x64.exe"
-FunctionEnd
-
-##############################################################################
-# #
-# RE-INSTALLER FUNCTIONS #
-# #
-##############################################################################
-
-Function PageReinstall
- ReadRegStr $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
- StrCmp $R0 "" 0 +2
- Abort
-
- ;Detect version
- ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor"
- IntCmp $R0 ${VER_MAJOR} minor_check new_version older_version
- minor_check:
- ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMinor"
- IntCmp $R0 ${VER_MINOR} rev_check new_version older_version
- rev_check:
- ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionRevision"
- IntCmp $R0 ${VER_PATCH} build_check new_version older_version
- build_check:
- ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild"
- IntCmp $R0 ${VER_BUILD} same_version new_version older_version
-
- new_version:
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" $PageReinstall_NEW_Field_1
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" $PageReinstall_NEW_Field_2
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" $PageReinstall_NEW_Field_3
- !insertmacro MUI_HEADER_TEXT $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE
- StrCpy $R0 "1"
- Goto reinst_start
-
- older_version:
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" $PageReinstall_OLD_Field_1
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" $PageReinstall_NEW_Field_2
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" $PageReinstall_NEW_Field_3
- !insertmacro MUI_HEADER_TEXT $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE
- StrCpy $R0 "1"
- Goto reinst_start
-
- same_version:
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" $PageReinstall_SAME_Field_1
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" $PageReinstall_SAME_Field_2
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" $PageReinstall_SAME_Field_3
- !insertmacro MUI_HEADER_TEXT $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE
- StrCpy $R0 "2"
-
- reinst_start:
- !insertmacro INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"
-FunctionEnd
-
-Function PageLeaveReinstall
- !insertmacro INSTALLOPTIONS_READ $R1 "NSIS.InstallOptions.ini" "Field 2" "State"
- StrCmp $R0 "1" 0 +2
- StrCmp $R1 "1" reinst_uninstall reinst_done
- StrCmp $R0 "2" 0 +3
- StrCmp $R1 "1" reinst_done reinst_uninstall
- reinst_uninstall:
- ReadRegStr $R1 ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "UninstallString"
- HideWindow
- ClearErrors
- ExecWait '$R1 _?=$INSTDIR'
- IfErrors no_remove_uninstaller
- IfFileExists "$INSTDIR\${APPLICATION_EXECUTABLE}" no_remove_uninstaller
- Delete $R1
- RMDir $INSTDIR
- no_remove_uninstaller:
- StrCmp $R0 "2" 0 +3
- Quit
- BringToFront
- reinst_done:
-FunctionEnd
-
-##############################################################################
-# #
-# INSTALLER SECTIONS #
-# #
-##############################################################################
-Section "${APPLICATION_NAME}" SEC_APPLICATION
- SectionIn 1 2 3 RO
- SetDetailsPrint listonly
-
- SetDetailsPrint textonly
- DetailPrint $SEC_APPLICATION_DETAILS
- SetDetailsPrint listonly
- SetOutPath "$INSTDIR"
-
- ;Main executable & csync
- File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}"
- File "${BUILD_PATH}\bin\${APPLICATION_CMD_EXECUTABLE}"
- File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}sync.dll"
- File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}_csync.dll"
-
- File "${BUILD_PATH}\src\gui\client*.qm"
- ; Make sure only to copy qt, not qt_help, etc
- File "${MING_SHARE}\qt5\translations\qt_??.qm"
- File "${MING_SHARE}\qt5\translations\qt_??_??.qm"
- File "${MING_SHARE}\qt5\translations\qtbase_*.qm"
- File "${MING_SHARE}\qt5\translations\qtkeychain_*.qm"
-
- ;Add crash reporter if it was built
- File /nonfatal "${BUILD_PATH}/bin/${CRASHREPORTER_EXECUTABLE}.exe"
-
- SetOutPath "$INSTDIR\platforms"
- File "${PLATFORMS_DLL_PATH}\qwindows.dll"
- SetOutPath "$INSTDIR\imageformats"
- File "${IMAGEFORMATS_DLL_PATH}\qgif.dll"
- File "${IMAGEFORMATS_DLL_PATH}\qjpeg.dll"
- File "${IMAGEFORMATS_DLL_PATH}\qico.dll"
- File "${IMAGEFORMATS_DLL_PATH}\qsvg.dll"
- ; PNG is built in Qt
-
- SetOutPath "$INSTDIR"
- ;License & release notes.
- File "@CPACK_RESOURCE_FILE_LICENSE@"
- ;File /oname=NOTES.txt ${NSI_PATH}\RELEASE_NOTES.txt
-
- ;Qt config:
- File "${NSI_PATH}\qt.conf"
-
- ;Qt stuff:
- File "${QT_DLL_PATH}\Qt5Core.dll"
- File "${QT_DLL_PATH}\Qt5Gui.dll"
- File "${QT_DLL_PATH}\Qt5Network.dll"
- File "${QT_DLL_PATH}\Qt5PrintSupport.dll"
- File "${QT_DLL_PATH}\Qt5Svg.dll"
- File "${QT_DLL_PATH}\Qt5Qml.dll"
- File "${QT_DLL_PATH}\Qt5Sql.dll"
- File "${QT_DLL_PATH}\Qt5Widgets.dll"
- File "${QT_DLL_PATH}\Qt5Xml.dll"
-
- ;Qt deps
- File "${MING_BIN}\libpng16-16.dll"
- File "${MING_BIN}\icudata56.dll"
- File "${MING_BIN}\icui18n56.dll"
- File "${MING_BIN}\icuuc56.dll"
- File "${MING_BIN}\libEGL.dll"
- File "${MING_BIN}\libGLESv2.dll"
- File "${MING_BIN}\libjpeg-8.dll"
- File "${MING_BIN}\libpcre16-0.dll"
- File "${MING_BIN}\libsqlite3-0.dll"
- File "${MING_BIN}\libcrypto-10.dll"
- File "${MING_BIN}\libssl-10.dll"
- File "${MING_BIN}\libstdc++-6.dll"
- File "${MING_BIN}\libwebp-5.dll"
- File "${MING_BIN}\libxslt-1.dll"
- File "${MING_BIN}\libxml2-2.dll"
- File "${MING_BIN}\zlib1.dll"
- File "${MING_BIN}\libharfbuzz-0.dll"
- File "${MING_BIN}\libfreetype-6.dll"
- File "${MING_BIN}\libglib-2.0-0.dll"
- File "${MING_BIN}\libintl-8.dll"
-
- ;QtKeyChain stuff
- File "${MING_BIN}\libqt5keychain.dll"
-
- ;MinGW stuff
- File "${MING_BIN}\libgcc_s_sjlj-1.dll"
- File "${MING_BIN}\libstdc++-6.dll"
- File "${MING_BIN}\libwinpthread-1.dll"
- File "${MING_BIN}\libssp-0.dll"
-
- ;CSync configs
- File "${SOURCE_PATH}/sync-exclude.lst"
-
- ;Add file association
- !insertmacro APP_ASSOCIATE "${APPLICATION_VIRTUALFILE_SUFFIX}" "${APPLICATION_VIRTUALFILE_FILECLASS}" "Virtual File for Remote File" "$INSTDIR\${APPLICATION_EXECUTABLE},0" "Download" "$INSTDIR\${APPLICATION_EXECUTABLE} $\"%1$\""
-
-SectionEnd
-
-!ifdef OPTION_SECTION_SC_SHELL_EXT
- ${MementoSection} $OPTION_SECTION_SC_SHELL_EXT_SECTION SEC_SHELL_EXT
- SectionIn 1 2
- SetDetailsPrint textonly
- DetailPrint $OPTION_SECTION_SC_SHELL_EXT_DetailPrint
- File "${BUILD_PATH}\vcredist_x86.exe"
- File "${BUILD_PATH}\vcredist_x64.exe"
- Call InstallRedistributables
- CreateDirectory "$INSTDIR\shellext"
- !define LIBRARY_COM
- !define LIBRARY_SHELL_EXTENSION
- !define LIBRARY_IGNORE_VERSION
- ${If} ${RunningX64}
- !define LIBRARY_X64
- !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCUtil_x64.dll" "$INSTDIR\shellext\OCUtil_x64.dll" "$INSTDIR\shellext"
- !insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCOverlays_x64.dll" "$INSTDIR\shellext\OCOverlays_x64.dll" "$INSTDIR\shellext"
- !insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCContextMenu_x64.dll" "$INSTDIR\shellext\OCContextMenu_x64.dll" "$INSTDIR\shellext"
- !undef LIBRARY_X64
- ${Else}
- !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCUtil_x86.dll" "$INSTDIR\shellext\OCUtil_x86.dll" "$INSTDIR\shellext"
- !insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCOverlays_x86.dll" "$INSTDIR\shellext\OCOverlays_x86.dll" "$INSTDIR\shellext"
- !insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCContextMenu_x86.dll" "$INSTDIR\shellext\OCContextMenu_x86.dll" "$INSTDIR\shellext"
- ${Endif}
- !undef LIBRARY_COM
- !undef LIBRARY_SHELL_EXTENSION
- !undef LIBRARY_IGNORE_VERSION
- ${MementoSectionEnd}
-!endif
-
-SectionGroup $SectionGroup_Shortcuts
-
-!ifdef OPTION_SECTION_SC_START_MENU
- ${MementoSection} $OPTION_SECTION_SC_START_MENU_SECTION SEC_START_MENU
- SectionIn 1 2 3
- SetDetailsPrint textonly
- DetailPrint $OPTION_SECTION_SC_START_MENU_DetailPrint
- SetDetailsPrint listonly
- SetShellVarContext all
- CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
- SetShellVarContext current
- ${MementoSectionEnd}
-!endif
-
-!ifdef OPTION_SECTION_SC_DESKTOP
- ${MementoSection} $OPTION_SECTION_SC_DESKTOP_SECTION SEC_DESKTOP
- SectionIn 1 2
- SetDetailsPrint textonly
- DetailPrint $OPTION_SECTION_SC_DESKTOP_DetailPrint
- SetDetailsPrint listonly
- SetShellVarContext all
- CreateShortCut "$DESKTOP\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
- SetShellVarContext current
- ${MementoSectionEnd}
-!endif
-
-!ifdef OPTION_SECTION_SC_QUICK_LAUNCH
- ${MementoSection} $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION SEC_QUICK_LAUNCH
- SectionIn 1 2
- SetDetailsPrint textonly
- DetailPrint $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint
- SetShellVarContext all
- SetDetailsPrint listonly
- CreateShortCut "$QUICKLAUNCH\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
- SetShellVarContext current
- ${MementoSectionEnd}
-!endif
-
-SectionGroupEnd
-
-${MementoSectionDone}
-
-; Installer section descriptions
-;--------------------------------
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APPLICATION} $OPTION_SECTION_SC_APPLICATION_Desc
-!insertmacro MUI_DESCRIPTION_TEXT ${SEC_START_MENU} $OPTION_SECTION_SC_START_MENU_Desc
-!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP} $OPTION_SECTION_SC_DESKTOP_Desc
-!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_LAUNCH} $OPTION_SECTION_SC_QUICK_LAUNCH_Desc
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-
-Section -post
-
- ;Uninstaller file.
- SetDetailsPrint textonly
- DetailPrint $UNINSTALLER_FILE_Detail
- SetDetailsPrint listonly
- WriteUninstaller $INSTDIR\uninstall.exe
-
- ;Registry keys required for installer version handling and uninstaller.
- SetDetailsPrint textonly
- DetailPrint $UNINSTALLER_REGISTRY_Detail
- SetDetailsPrint listonly
-
- ;Version numbers used to detect existing installation version for comparison.
- WriteRegStr HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "" $INSTDIR
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor" "${VER_MAJOR}"
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMinor" "${VER_MINOR}"
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionRevision" "${VER_PATCH}"
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild" "${VER_BUILD}"
-
- ;Add or Remove Programs entry.
- WriteRegExpandStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
- WriteRegExpandStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "DisplayName" "${APPLICATION_NAME}"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "Publisher" "${APPLICATION_VENDOR}"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "DisplayVersion" "${VERSION}"
- WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "VersionMajor" "${VER_MAJOR}"
- WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "VersionMinor" "${VER_MINOR}.${VER_PATCH}.${VER_BUILD}"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "URLInfoAbout" "http://${APPLICATION_DOMAIN}/"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "HelpLink" "http://${APPLICATION_DOMAIN}/"
- WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "NoModify" "1"
- WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "NoRepair" "1"
-
-
- SetDetailsPrint textonly
- DetailPrint $UNINSTALLER_FINISHED_Detail
-SectionEnd
-
-##############################################################################
-# #
-# UNINSTALLER SECTION #
-# #
-##############################################################################
-
-Function un.EnsureOwncloudShutdown
- !insertmacro CheckAndConfirmEndProcess "${APPLICATION_EXECUTABLE}"
-FunctionEnd
-
-Section Uninstall
- IfFileExists "$INSTDIR\${APPLICATION_EXECUTABLE}" owncloud_installed
- MessageBox MB_YESNO $UNINSTALL_MESSAGEBOX /SD IDYES IDYES owncloud_installed
- Abort $UNINSTALL_ABORT
- owncloud_installed:
-
- ; Delete Navigation Pane entries added for Windows 10.
- ; On 64bit Windows, the client will be writing to the 64bit registry.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- StrCpy $0 0
- loop:
- ; Look at every registered explorer namespace for HKCU and check if it was added by our application
- ; (we write to a custom "ApplicationName" value there).
- EnumRegKey $1 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace" $0
- StrCmp $1 "" done
-
- ReadRegStr $R0 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\$1" "ApplicationName"
- StrCmp $R0 "${APPLICATION_NAME}" deleteClsid
- ; Increment the index when not deleting the enumerated key.
- IntOp $0 $0 + 1
- goto loop
-
- deleteClsid:
- DetailPrint "Removing Navigation Pane CLSID $1"
- ; Should match FolderMan::updateCloudStorageRegistry
- DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\$1"
- DeleteRegKey HKCU "Software\Classes\CLSID\$1"
- DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" $1
- goto loop
- done:
- ; Go back to the 32bit registry.
- SetRegView lastused
-
- ;Delete registry keys.
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild"
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor"
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMinor"
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionRevision"
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
- DeleteRegKey HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}"
-
- DeleteRegKey HKCR "${APPLICATION_NAME}"
-
- ;Remove file association
- !insertmacro APP_UNASSOCIATE "${APPLICATION_VIRTUALFILE_SUFFIX}" "${APPLICATION_VIRTUALFILE_FILECLASS}"
-
- ;Shell extension
- !ifdef OPTION_SECTION_SC_SHELL_EXT
- !define LIBRARY_COM
- !define LIBRARY_SHELL_EXTENSION
- !define LIBRARY_IGNORE_VERSION
- ${If} ${HasSection} SEC_SHELL_EXT
- DetailPrint "Uninstalling x64 overlay DLLs"
- !define LIBRARY_X64
- !insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCContextMenu_x64.dll"
- !insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCOverlays_x64.dll"
- !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCUtil_x64.dll"
- !undef LIBRARY_X64
- DetailPrint "Uninstalling x86 overlay DLLs"
- !insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCContextMenu_x86.dll"
- !insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCOverlays_x86.dll"
- !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCUtil_x86.dll"
- ${EndIf}
- !undef LIBRARY_COM
- !undef LIBRARY_SHELL_EXTENSION
- !undef LIBRARY_IGNORE_VERSION
- !endif
-
- ;Start menu shortcut
- !ifdef OPTION_SECTION_SC_START_MENU
- SetShellVarContext all
- ${If} ${HasSection} SEC_START_MENU
- Delete "$SMPROGRAMS\${APPLICATION_NAME}.lnk"
- ${EndIf}
- SetShellVarContext current
- !endif
-
- ;Desktop shortcut.
- !ifdef OPTION_SECTION_SC_DESKTOP
- ${If} ${HasSection} SEC_DESKTOP
- SetShellVarContext all
- ${If} ${FileExists} "$DESKTOP\${APPLICATION_NAME}.lnk"
- Delete "$DESKTOP\${APPLICATION_NAME}.lnk"
- ${EndIf}
- SetShellVarContext current
- ${EndIf}
- !endif
-
- ;Quick Launch shortcut.
- !ifdef OPTION_SECTION_SC_QUICK_LAUNCH
- ${If} ${HasSection} SEC_QUICK_LAUNCH
- SetShellVarContext all
- ${If} ${FileExists} "$QUICKLAUNCH\${APPLICATION_NAME}.lnk"
- Delete "$QUICKLAUNCH\${APPLICATION_NAME}.lnk"
- ${EndIf}
- SetShellVarContext current
- ${EndIf}
- !endif
-
- ;Remove all the Program Files.
- RMDir /r $INSTDIR
-
- DeleteRegKey ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}"
-
- SetDetailsPrint textonly
- DetailPrint $UNINSTALLER_FINISHED_Detail
-SectionEnd
-
-##############################################################################
-# #
-# NSIS Installer Event Handler Functions #
-# #
-##############################################################################
-
-Function .onInit
- SetOutPath $INSTDIR
-
- ${GetParameters} $R0
- ${GetOptions} $R0 "/launch" $R0
- ${IfNot} ${Errors}
- StrCpy $InstallRunIfSilent "yes"
- ${EndIf}
-
- ${GetParameters} $R0
- ${GetOptions} $R0 "/noautoupdate" $R0
- ${IfNot} ${Errors}
- StrCpy $NoAutomaticUpdates "yes"
- ${EndIf}
-
-
- !insertmacro INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
-
- ; uncomment this line if you want to see the language selection
- ;!insertmacro MUI_LANGDLL_DISPLAY
-
- Call SetLang
-
- ; Remove Quick Launch option from Windows 7, as no longer applicable - usually.
- ${IfNot} ${AtMostWinVista}
- SectionSetText ${SEC_QUICK_LAUNCH} $INIT_NO_QUICK_LAUNCH
- SectionSetFlags ${SEC_QUICK_LAUNCH} ${SF_RO}
- SectionSetInstTypes ${SEC_QUICK_LAUNCH} 0
- ${EndIf}
-
- ; Some people might have a shortcut called 'ownCloud' pointing elsewhere, see #356
- ; Unselect item and adjust text
- ${If} ${FileExists} "$DESKTOP\${APPLICATION_NAME}.lnk"
- SectionSetText ${SEC_DESKTOP} $INIT_NO_DESKTOP
- Push $0
- SectionSetFlags ${SEC_DESKTOP} 0
- SectionSetInstTypes ${SEC_DESKTOP} 0
- Pop $0
- ${EndIf}
-
- ${MementoSectionRestore}
-
- UAC_TryAgain:
- !insertmacro UAC_RunElevated
- ${Switch} $0
- ${Case} 0
- ${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
- ${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
- ${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
- MessageBox mb_YesNo|mb_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND $UAC_INSTALLER_REQUIRE_ADMIN /SD IDNO IDYES UAC_TryAgain IDNO 0
- ${EndIf}
- ;fall-through and die
- ${Case} 1223
- MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_INSTALLER_REQUIRE_ADMIN
- Quit
- ${Case} 1062
- MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_ERROR_LOGON_SERVICE
- Quit
- ${Default}
- MessageBox MB_ICONSTOP "$UAC_ERROR_ELEVATE $0"
- Abort
- Quit
- ${EndSwitch}
-
- ;Prevent multiple instances.
- System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Installer") i .r1 ?e'
- Pop $R0
- StrCmp $R0 0 +3
- MessageBox MB_OK|MB_ICONEXCLAMATION $INIT_INSTALLER_RUNNING
- Abort
-
- ;Use available InstallLocation when possible. This is useful in the uninstaller
- ;via re-install, which would otherwise use a default location - a bug.
- ReadRegStr $R0 ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "InstallLocation"
- StrCmp $R0 "" SkipSetInstDir
- StrCpy $INSTDIR $R0
- SkipSetInstDir:
-
- ;Shutdown ${APPLICATION_NAME} in case Add/Remove re-installer option used.
- Call EnsureOwncloudShutdown
-
- ReadRegStr $R0 ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "InstallLocation"
- ${If} ${Silent}
- ${AndIf} $R0 != ""
- ExecWait '"$R0\Uninstall.exe" /S _?=$R0'
- ${EndIf}
-FunctionEnd
-
-Function .onInstSuccess
- ${MementoSectionSave}
-
- ${If} $NoAutomaticUpdates == "yes"
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "skipUpdateCheck" "1"
- ${EndIf}
-
- ; TODO: Only needed to when updating from 2.1.{0,1}. Remove in due time.
- Delete /REBOOTOK $INSTDIR\bearer\qgenericbearer.dll
- Delete /REBOOTOK $INSTDIR\bearer\qnativewifibearer.dll
- RMDir /REBOOTOK $INSTDIR\bearer
-
- ${If} ${Silent}
- ${AndIf} $InstallRunIfSilent == "yes"
- Call LaunchApplication
- ${EndIf}
-FunctionEnd
-
-Function .onInstFailed
-FunctionEnd
-
-##############################################################################
-# #
-# NSIS Uninstaller Event Handler Functions #
-# #
-##############################################################################
-
-Function un.onInit
- Call un.SetLang
-
- UAC_TryAgain:
- !insertmacro UAC_RunElevated
- ${Switch} $0
- ${Case} 0
- ${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
- ${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
- ${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
- MessageBox mb_YesNo|mb_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND $UAC_UNINSTALLER_REQUIRE_ADMIN /SD IDNO IDYES UAC_TryAgain IDNO 0
- ${EndIf}
- ;fall-through and die
- ${Case} 1223
- MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_UNINSTALLER_REQUIRE_ADMIN
- Quit
- ${Case} 1062
- MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_ERROR_LOGON_SERVICE
- Quit
- ${Default}
- MessageBox MB_ICONSTOP "$UAC_ERROR_ELEVATE $0"
- Abort
- Quit
- ${EndSwitch}
-
- ;Prevent multiple instances.
- System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Uninstaller") i .r1 ?e'
- Pop $R0
- StrCmp $R0 0 +3
- MessageBox MB_OK|MB_ICONEXCLAMATION $INIT_UNINSTALLER_RUNNING
- Abort
-
- ;Shutdown ${APPLICATION_NAME} in order to remove locked files.
- Call un.EnsureOwncloudShutdown
-FunctionEnd
-
-Function un.onUnInstSuccess
-FunctionEnd
-
-Function un.onUnInstFailed
-FunctionEnd
diff --git a/cmake/modules/UseDoxygen.cmake b/cmake/modules/UseDoxygen.cmake
deleted file mode 100644
index 86622f61c..000000000
--- a/cmake/modules/UseDoxygen.cmake
+++ /dev/null
@@ -1,131 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-# -helper macro to add a "doc" target with CMake build system.
-# and configure doxy.config.in to doxy.config
-#
-# target "doc" allows building the documentation with doxygen/dot on WIN32 and Linux
-# Creates .chm windows help file if MS HTML help workshop
-# (available from http://msdn.microsoft.com/workshop/author/htmlhelp)
-# is installed with its DLLs in PATH.
-#
-#
-# Please note, that the tools, e.g.:
-# doxygen, dot, latex, dvips, makeindex, gswin32, etc.
-# must be in path.
-#
-# Note about Visual Studio Projects:
-# MSVS has its own path environment which may differ from the shell.
-# See "Menu Tools/Options/Projects/VC++ Directories" in VS 7.1
-#
-# author Jan Woetzel 2004-2006
-# www.mip.informatik.uni-kiel.de/~jw
-
-
-FIND_PACKAGE(Doxygen)
-
-IF (DOXYGEN_FOUND)
-
- # click+jump in Emacs and Visual Studio (for doxy.config) (jw)
- IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
- SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"")
- ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
- SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
- ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
-
- # we need latex for doxygen because of the formulas
- FIND_PACKAGE(LATEX)
- IF (NOT LATEX_COMPILER)
- MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user interaction on doxy run.")
- ENDIF (NOT LATEX_COMPILER)
- IF (NOT MAKEINDEX_COMPILER)
- MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
- ENDIF (NOT MAKEINDEX_COMPILER)
- IF (NOT DVIPS_CONVERTER)
- MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
- ENDIF (NOT DVIPS_CONVERTER)
- FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE_PATH NAMES dot)
- IF (DOXYGEN_DOT_EXECUTABLE_PATH)
- SET(DOXYGEN_DOT_FOUND "YES")
- ENDIF (DOXYGEN_DOT_EXECUTABLE_PATH)
-
- IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
- MESSAGE(STATUS "Generate ${CMAKE_CURRENT_BINARY_DIR}/doxy.config from doxy.config.in")
- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in
- ${CMAKE_CURRENT_BINARY_DIR}/doxy.config
- @ONLY )
- # use (configured) doxy.config from (out of place) BUILD tree:
- SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
- ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
- # use static hand-edited doxy.config from SOURCE tree:
- SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
- IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
- MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config instead of configuring from doxy.config.in file.")
- ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
- IF (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
- # using template doxy.config.in
- MESSAGE(STATUS "Generate ${CMAKE_CURRENT_BINARY_DIR}/doxy.config from doxy.config.in")
- CONFIGURE_FILE(${CMAKE_MODULE_PATH}/doxy.config.in
- ${CMAKE_CURRENT_BINARY_DIR}/doxy.config
- @ONLY )
- SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
- ELSE (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
- # failed completely...
- MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in (or doxy.config as fallback)")
- ENDIF(EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
-
- ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
- ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
-
- ADD_CUSTOM_TARGET(csync_doc ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxy.config)
-
- # create a windows help .chm file using hhc.exe
- # HTMLHelp DLL must be in path!
- # fallback: use hhw.exe interactively
- IF (WIN32)
- FIND_PACKAGE(HTMLHelp)
- IF (HTML_HELP_COMPILER)
- SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\doc\\html\\index.hhp")
- STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
- # MESSAGE(SEND_ERROR "DBG HHP_FILE=${HHP_FILE}")
- ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE})
- ADD_DEPENDENCIES (winhelp doc)
-
- IF (NOT TARGET_DOC_SKIP_INSTALL)
- # install windows help?
- # determine useful name for output file
- # should be project and version unique to allow installing
- # multiple projects into one global directory
- IF (EXISTS "${PROJECT_BINARY_DIR}/doc/html/index.chm")
- IF (PROJECT_NAME)
- SET(OUT "${PROJECT_NAME}")
- ELSE (PROJECT_NAME)
- SET(OUT "Documentation") # default
- ENDIF(PROJECT_NAME)
- IF (${PROJECT_NAME}_VERSION_MAJOR)
- SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}")
- IF (${PROJECT_NAME}_VERSION_MINOR)
- SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
- IF (${PROJECT_NAME}_VERSION_PATCH)
- SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")
- ENDIF(${PROJECT_NAME}_VERSION_PATCH)
- ENDIF(${PROJECT_NAME}_VERSION_MINOR)
- ENDIF(${PROJECT_NAME}_VERSION_MAJOR)
- # keep suffix
- SET(OUT "${OUT}.chm")
-
- #MESSAGE("DBG ${PROJECT_BINARY_DIR}/doc/html/index.chm \n${OUT}")
- # create target used by install and package commands
- INSTALL(FILES "${PROJECT_BINARY_DIR}/doc/html/index.chm"
- DESTINATION "doc"
- RENAME "${OUT}"
- )
- ENDIF(EXISTS "${PROJECT_BINARY_DIR}/doc/html/index.chm")
- ENDIF(NOT TARGET_DOC_SKIP_INSTALL)
-
- ENDIF(HTML_HELP_COMPILER)
- # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
- ENDIF (WIN32)
-ENDIF(DOXYGEN_FOUND)
-
diff --git a/cmake/modules/Warnings.cmake b/cmake/modules/Warnings.cmake
deleted file mode 100644
index d4f7c910a..000000000
--- a/cmake/modules/Warnings.cmake
+++ /dev/null
@@ -1,29 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments")
-
- # Fix sqlite compilation on macOS
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-incompatible-pointer-types-discards-qualifiers")
-
- if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- # Fix sqlite compilation on MinGW
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-discarded-qualifiers")
-
- execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
- OUTPUT_VARIABLE GCC_VERSION)
- if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
- else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
- endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
- else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
- endif()
-
- if(DEFINED MIRALL_FATAL_WARNINGS)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
- endif(DEFINED MIRALL_FATAL_WARNINGS)
-endif()