commit extra-cmake-modules for openSUSE:Factory
Hello community, here is the log from the commit of package extra-cmake-modules for openSUSE:Factory checked in at 2014-10-07 16:00:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/extra-cmake-modules (Old) and /work/SRC/openSUSE:Factory/.extra-cmake-modules.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "extra-cmake-modules" Changes: -------- --- /work/SRC/openSUSE:Factory/extra-cmake-modules/extra-cmake-modules.changes 2014-09-12 17:03:09.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.extra-cmake-modules.new/extra-cmake-modules.changes 2014-10-07 16:01:06.000000000 +0200 @@ -1,0 +2,12 @@ +Sat Oct 4 17:59:54 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 1.3.0 + * New module ECMGeneratePkgConfigFile, for frameworks to + install a pkgconfig file. + * New option ECM_ENABLE_SANITIZERS, to enable clang sanitizers. + Example: ECM_ENABLE_SANITIZERS='address;undefined' + * New option BUILD_COVERAGE, to enable code coverage. + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.3.0.php + +------------------------------------------------------------------- Old: ---- extra-cmake-modules-1.2.0.tar.xz New: ---- extra-cmake-modules-1.3.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ extra-cmake-modules.spec ++++++ --- /var/tmp/diff_new_pack.6uuZJH/_old 2014-10-07 16:01:08.000000000 +0200 +++ /var/tmp/diff_new_pack.6uuZJH/_new 2014-10-07 16:01:08.000000000 +0200 @@ -21,9 +21,9 @@ License: BSD-3-Clause Group: Development/Tools/Other Url: https://projects.kde.org/projects/kdesupport/extra-cmake-modules -Version: 1.2.0 +Version: 1.3.0 Release: 0 -Source: http://download.kde.org/stable/frameworks/5.2.0/%{name}-%{version}.tar.xz +Source: http://download.kde.org/stable/frameworks/5.3.0/%{name}-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake >= 2.8.12 BuildRequires: gcc-c++ ++++++ extra-cmake-modules-1.2.0.tar.xz -> extra-cmake-modules-1.3.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/CMakeLists.txt new/extra-cmake-modules-1.3.0/CMakeLists.txt --- old/extra-cmake-modules-1.2.0/CMakeLists.txt 2014-09-06 00:20:45.000000000 +0200 +++ new/extra-cmake-modules-1.3.0/CMakeLists.txt 2014-10-03 22:53:30.000000000 +0200 @@ -3,7 +3,7 @@ project(extra-cmake-modules NONE) set(ECM_MAJOR_VERSION 1) -set(ECM_MINOR_VERSION 2) +set(ECM_MINOR_VERSION 3) set(ECM_PATCH_VERSION 0) set(ECM_VERSION ${ECM_MAJOR_VERSION}.${ECM_MINOR_VERSION}.${ECM_PATCH_VERSION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/docs/find-module/FindLibGit2.rst new/extra-cmake-modules-1.3.0/docs/find-module/FindLibGit2.rst --- old/extra-cmake-modules-1.2.0/docs/find-module/FindLibGit2.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/docs/find-module/FindLibGit2.rst 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindLibGit2.cmake diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/find-modules/FindLibGit2.cmake new/extra-cmake-modules-1.3.0/find-modules/FindLibGit2.cmake --- old/extra-cmake-modules-1.2.0/find-modules/FindLibGit2.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/find-modules/FindLibGit2.cmake 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1,133 @@ +#.rst: +# FindLibGit2 +# ------- +# +# Try to find libgit2 on a Unix system. +# +# This will define the following variables: +# +# ``LIBGIT2_FOUND`` +# True if (the requested version of) libgit2 is available +# ``LIBGIT2_VERSION`` +# The version of libgit2 +# ``LIBGIT2_LIBRARIES`` +# This can be passed to target_link_libraries() instead of the ``LibGit2::LibGit2`` +# target +# ``LIBGIT2_INCLUDE_DIRS`` +# This should be passed to target_include_directories() if the target is not +# used for linking +# ``LIBGIT2_DEFINITIONS`` +# This should be passed to target_compile_options() if the target is not +# used for linking +# +# If ``LIBGIT2_FOUND`` is TRUE, it will also define the following imported target: +# +# ``LibGit2::LibGit2`` +# The libgit2 library +# +# In general we recommend using the imported target, as it is easier to use. +# Bear in mind, however, that if the target is in the link interface of an +# exported library, it must be made available by the package config file. + +#============================================================================= +# Copyright 2014 Alex Merry <alex.merry@kde.org> +# Copyright 2014 Martin Gräßlin <mgraesslin@kde.org> +# Copyright 2014 Christoph Cullmann <cullmann@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. +#============================================================================= + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "CMake 2.8.12 is required by FindLibGit2.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 FindLibGit2.cmake") +endif() + +# Use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +find_package(PkgConfig) +pkg_check_modules(PKG_GIT2 QUIET git2) + +set(LIBGIT2_DEFINITIONS ${PKG_GIT2_CFLAGS_OTHER}) + +find_path(LIBGIT2_INCLUDE_DIR + NAMES + git2.h + HINTS + ${PKG_GIT2_INCLUDE_DIRS} +) +find_library(LIBGIT2_LIBRARY + NAMES + git2 + HINTS + ${PKG_GIT2_LIBRARY_DIRS} +) + +# get version from header, should work on windows, too +if(LIBGIT2_INCLUDE_DIR) + file(STRINGS "${LIBGIT2_INCLUDE_DIR}/git2/version.h" LIBGIT2_H REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$") + + string(REGEX REPLACE "^.*LIBGIT2_VERSION \"([0-9]+).*$" "\\1" LIBGIT2_VERSION_MAJOR "${LIBGIT2_H}") + string(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_MINOR "${LIBGIT2_H}") + string(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_PATCH "${LIBGIT2_H}") + set(LIBGIT2_VERSION "${LIBGIT2_VERSION_MAJOR}.${LIBGIT2_VERSION_MINOR}.${LIBGIT2_VERSION_PATCH}") + + set(LIBGIT2_MAJOR_VERSION "${LIBGIT2_VERSION_MAJOR}") + set(LIBGIT2_MINOR_VERSION "${LIBGIT2_VERSION_MINOR}") + set(LIBGIT2_PATCH_VERSION "${LIBGIT2_VERSION_PATCH}") + + unset(LIBGIT2_H) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibGit2 + FOUND_VAR + LIBGIT2_FOUND + REQUIRED_VARS + LIBGIT2_LIBRARY + LIBGIT2_INCLUDE_DIR + VERSION_VAR + LIBGIT2_VERSION +) + +if(LIBGIT2_FOUND AND NOT TARGET LibGit2::LibGit2) + add_library(LibGit2::LibGit2 UNKNOWN IMPORTED) + set_target_properties(LibGit2::LibGit2 PROPERTIES + IMPORTED_LOCATION "${LIBGIT2_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${LIBGIT2_DEFINITIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${LIBGIT2_INCLUDE_DIR}" + ) +endif() + +mark_as_advanced(LIBGIT2_LIBRARY LIBGIT2_INCLUDE_DIR) + +set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARY}) +set(LIBGIT2_INCLUDE_DIRS ${LIBGIT2_INCLUDE_DIR}) + +include(FeatureSummary) +set_package_properties(LibGit2 PROPERTIES + URL "https://libgit2.github.com/" + DESCRIPTION "A plain C library to interface with the git version control system." +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/kde-modules/KDECompilerSettings.cmake new/extra-cmake-modules-1.3.0/kde-modules/KDECompilerSettings.cmake --- old/extra-cmake-modules-1.2.0/kde-modules/KDECompilerSettings.cmake 2014-09-06 00:20:45.000000000 +0200 +++ new/extra-cmake-modules-1.3.0/kde-modules/KDECompilerSettings.cmake 2014-10-03 22:53:30.000000000 +0200 @@ -420,3 +420,6 @@ set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--export-all-symbols") endif() +include("${ECM_MODULE_DIR}/ECMEnableSanitizers.cmake") +include("${ECM_MODULE_DIR}/ECMCoverageOption.cmake") + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/kde-modules/KDEInstallDirs.cmake new/extra-cmake-modules-1.3.0/kde-modules/KDEInstallDirs.cmake --- old/extra-cmake-modules-1.2.0/kde-modules/KDEInstallDirs.cmake 2014-09-06 00:20:45.000000000 +0200 +++ new/extra-cmake-modules-1.3.0/kde-modules/KDEInstallDirs.cmake 2014-10-03 22:53:30.000000000 +0200 @@ -324,7 +324,7 @@ option (KDE_INSTALL_USE_QT_SYS_PATHS "Install mkspecs files, Plugins and Imports to the Qt 5 install dir") if(KDE_INSTALL_USE_QT_SYS_PATHS) # Qt-specific vars - include(ECMQueryQmake) + include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake") query_qmake(qt_plugins_dir QT_INSTALL_PLUGINS) @@ -334,10 +334,15 @@ query_qmake(qt_imports_dir QT_INSTALL_IMPORTS) - _define_absolute(QTQUICKIMPORTSDIR QTPLUGINDIR ${qt_imports_dir} + _define_absolute(QTQUICKIMPORTSDIR ${qt_imports_dir} "QtQuick1 imports" IMPORTS_INSTALL_DIR) + query_qmake(qt_qml_dir QT_INSTALL_QML) + + _define_absolute(QMLDIR ${qt_qml_dir} + "QtQuick2 imports" + QML_INSTALL_DIR) else() _define_relative(QTPLUGINDIR LIBDIR "plugins" "Qt plugins" @@ -346,16 +351,16 @@ _define_relative(QTQUICKIMPORTSDIR QTPLUGINDIR "imports" "QtQuick1 imports" IMPORTS_INSTALL_DIR) + + _define_relative(QMLDIR LIBDIR "qml" + "QtQuick2 imports" + QML_INSTALL_DIR) endif() _define_relative(PLUGINDIR QTPLUGINDIR "" "Plugins" PLUGIN_INSTALL_DIR) -_define_relative(QMLDIR LIBDIR "qml" - "QtQuick2 imports" - QML_INSTALL_DIR) - _define_absolute(INCLUDEDIR "include" "C and C++ header files" INCLUDE_INSTALL_DIR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/modules/ECMCoverageOption.cmake new/extra-cmake-modules-1.3.0/modules/ECMCoverageOption.cmake --- old/extra-cmake-modules-1.2.0/modules/ECMCoverageOption.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/modules/ECMCoverageOption.cmake 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1,36 @@ +#.rst: +# ECMCoverageOption +# -------------------- +# +# Creates a BUILD_COVERAGE option, so the project can be built with code coverage +# support. +# +# :: +# +# BUILD_COVERAGE +# +# If it's on, the project will be compiled with code coverage support, using +# gcov. Otherwise, it will be built normally. +# +# :: +# +# +#============================================================================= +# Copyright 2014 Aleix Pol Gonzalez <aleixpol@kde.org> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file COPYING-CMAKE-SCRIPTS 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 extra-cmake-modules, substitute the full +# License text for the above reference.) + +option(BUILD_COVERAGE "Build the project with gcov support" OFF) + +if(BUILD_COVERAGE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov") +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/modules/ECMEnableSanitizers.cmake new/extra-cmake-modules-1.3.0/modules/ECMEnableSanitizers.cmake --- old/extra-cmake-modules-1.2.0/modules/ECMEnableSanitizers.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/modules/ECMEnableSanitizers.cmake 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1,140 @@ +#.rst: +# ECMEnableSanitizers +# ------------------- +# +# Enable compiler sanitizer flags +# +# The following sanitizers are supported : +# - Address Sanitizer +# - Memory Sanitizer +# - Thread Sanitizer +# - Leak Sanitizer +# - Undefined Behaviour Sanitizer +# +# All of them are implemented in Clang, depending on your version, and +# there is an work in progress in GCC, where some of them are currently +# implemented. +# This module will check your current compiler version to see if it support +# the sanitizers that you want to enable +# +# How to use it ? +# --------------- +# This module is included in KDECompilerSettings. Therefore you don't have +# to change your CMakeLists.txt +# +# It introduce a new cached variable : +# ECM_ENABLE_SANITIZERS +# +# which can take the following values : +# - address +# - memory +# - thread +# - leak +# - undefined +# +# You can enable two sanitizers in the same build, depending on their +# compatibility by separating each one with a semicolon : +# ECM_ENABLE_SANITIZERS='address;undefined' +# +# +# The sanitizers `address`, `memory` and `thread` are mutually exclusive. +# You cannot enable two of them in the same build. +# +# `undefined` can be used with every other sanitizers +# +# `leak` can be enable with the `address` sanitizer. +# +# Finally, to reduce the overhead induced by the instrumentation of the +# sanitizers, it is advised to use -O1, or higher to improve the performances. +# +# Example +# ------- +# This is an example of usage : +# mkdir _build +# cd _build +# cmake -DECM_ENABLE_SANITIZERS='address' .. +# +# If you want to use multiple sanitizers +# +# cmake -DECM_ENABLE_SANITIZERS='address;leak;undefined' .. +# +# => Most of the sanitizers will require Clang. To enable it, use : +# -DCMAKE_CXX_COMPILER=clang++ +# +#============================================================================= +# Copyright 2014 Mathieu Tarral <mathieu.tarral@gmail.com> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file COPYING-CMAKE-SCRIPTS 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 extra-cmake-modules, substitute the full +# License text for the above reference.) + +# MACRO check_compiler_version +#----------------------------- +macro (check_compiler_version gcc_required_version clang_required_version) + if ( + ( + CMAKE_CXX_COMPILER_ID MATCHES "GNU" + AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_required_version} + ) + OR + ( + CMAKE_CXX_COMPILER_ID MATCHES "Clang" + AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${clang_required_version} + ) + ) + # error ! + message(FATAL_ERROR "You ask to enable the sanitizer ${CUR_SANITIZER}, + but your compiler ${CMAKE_CXX_COMPILER_ID} version ${CMAKE_CXX_COMPILER_VERSION} + does not support it ! + You should use at least GCC ${gcc_required_version} or Clang ${clang_required_version} + (99.99 means not implemented yet)") + endif () +endmacro () + +# MACRO check_compiler_support +#------------------------------ +macro (enable_sanitizer_flags sanitize_option) + if (${sanitize_option} MATCHES "address") + check_compiler_version("4.8" "3.1") + set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls") + set(XSAN_LINKER_FLAGS "asan") + elseif (${sanitize_option} MATCHES "thread") + check_compiler_version("4.8" "3.1") + set(XSAN_COMPILE_FLAGS "-fsanitize=thread") + set(XSAN_LINKER_FLAGS "tsan") + elseif (${sanitize_option} MATCHES "memory") + check_compiler_version("99.99" "3.1") + set(XSAN_COMPILE_FLAGS "-fsanitize=memory") + elseif (${sanitize_option} MATCHES "leak") + check_compiler_version("4.9" "3.4") + set(XSAN_COMPILE_FLAGS "-fsanitize=leak") + set(XSAN_LINKER_FLAGS "lsan") + elseif (${sanitize_option} MATCHES "undefined") + check_compiler_version("99.99" "3.1") + set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls") + else () + message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.") + endif () +endmacro () + +# for each element of the ECM_ENABLE_SANITIZERS list +foreach ( CUR_SANITIZER ${ECM_ENABLE_SANITIZERS} ) + # lowercase filter + string(TOLOWER ${CUR_SANITIZER} CUR_SANITIZER) + # check option and enable appropriate flags + enable_sanitizer_flags ( ${CUR_SANITIZER} ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" ) + link_libraries(${XSAN_LINKER_FLAGS}) + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") + string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") + endif () +endforeach () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/modules/ECMGeneratePkgConfigFile.cmake new/extra-cmake-modules-1.3.0/modules/ECMGeneratePkgConfigFile.cmake --- old/extra-cmake-modules-1.2.0/modules/ECMGeneratePkgConfigFile.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/modules/ECMGeneratePkgConfigFile.cmake 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1,156 @@ +#.rst: +# ECMGeneratePkgConfigFile +# ------------------ +# +# Generate a ``.pc`` file for the benefit of autotools-based projects. +# +# :: +# +# ecm_generate_pkgconfig_file(BASE_NAME <baseName> +# [LIB_NAME <libName>] +# [DEPS "<dep> [<dep> [...]]"] +# [FILENAME_VAR <filename_variable>] +# [INCLUDE_INSTALL_DIR <dir>] +# [LIB_INSTALL_DIR <dir>] +# [DEFINES -D<variable=value>...] +# [INSTALL]) +# +# BASE_NAME is the name of the module. It's the name projects will use to find +# the module. +# +# LIB_NAME is the name of the library that is being exported. If undefined, it +# will default to the BASE_NAME. That means the LIB_NAME will be set as the name +# field as well as the library to link to. +# +# FILENAME_VAR is specified with a variable name. This variable will receive the +# location of the generated file will be set, within the build directory. This +# way it can be used in case some processing is required. See also INSTALL. +# +# INCLUDE_INSTALL_DIR specifies where the includes will be installed. If it's not +# specified, it will default to INSTALL_INCLUDEDIR, CMAKE_INSTALL_INCLUDEDIR or just +# "include/" in case they are specified, with the BASE_NAME postfixed. +# +# LIB_INSTALL_DIR specifies where the library is being installed. If it's not +# specified, it will default to LIB_INSTALL_DIR, CMAKE_INSTALL_LIBDIR or just +# "lib/" in case they are specified. +# +# DEFINES is a list of preprocessor defines that it is recommended users of the +# library pass to the compiler when using it. +# +# INSTALL will cause the module to be installed to the ``pkgconfig`` subdirectory +# of LIB_INSTALL_DIR, unless the ECM_PKGCONFIG_INSTALL_DIR cache variable is set +# to something different. Note that the first call to ecm_generate_pkgconfig_file +# with the INSTALL argument will cause ECM_PKGCONFIG_INSTALL_DIR to be set to the +# cache, and will be used in any subsequent calls. +# +# To properly use this macro a version needs to be set. To retrieve it ``ECM_PKGCONFIG_INSTALL_DIR`` +# uses PROJECT_VERSION. To set it, use the project() command (only available since CMake 3.0) or the +# ecm_setup_version() macro. +# +# +# Example usage: +# +# .. code-block:: cmake +# +# ecm_generate_pkgconfig_file( +# BASE_NAME KF5Archive +# DEPS Qt5Core +# FILENAME_VAR pkgconfig_filename +# INSTALL +# ) +# + +#============================================================================= +# Copyright 2014 Aleix Pol Gonzalez <aleixpol@kde.org> +# Copyright 2014 David Faure <faure@kde.org> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file COPYING-CMAKE-SCRIPTS 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 extra-cmake-modules, substitute the full +# License text for the above reference.) + +function(ECM_GENERATE_PKGCONFIG_FILE) + set(options INSTALL) + set(oneValueArgs BASE_NAME LIB_NAME FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR) + set(multiValueArgs DEPS DEFINES) + + cmake_parse_arguments(EGPF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(EGPF_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to ECM_GENERATE_PKGCONFIG_FILE(): \"${EGPF_UNPARSED_ARGUMENTS}\"") + endif() + + if(NOT EGPF_BASE_NAME) + message(FATAL_ERROR "Required argument BASE_NAME missing in ECM_GENERATE_PKGCONFIG_FILE() call") + endif() + if(NOT PROJECT_VERSION) + message(FATAL_ERROR "Required variable PROJECT_VERSION not set before ECM_GENERATE_PKGCONFIG_FILE() call. Did you call ecm_setup_version or project with the VERSION argument?") + endif() + if(NOT EGPF_LIB_NAME) + set(EGPF_LIB_NAME ${EGPF_BASE_NAME}) + endif() + if(NOT EGPF_INCLUDE_INSTALL_DIR) + if(INCLUDE_INSTALL_DIR) + set(EGPF_INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_DIR}/${EGPF_BASE_NAME}") + elseif(CMAKE_INSTALL_INCLUDEDIR) + set(EGPF_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${EGPF_BASE_NAME}") + else() + set(EGPF_INCLUDE_INSTALL_DIR "include/${EGPF_BASE_NAME}") + endif() + endif() + if(NOT EGPF_LIB_INSTALL_DIR) + if(LIB_INSTALL_DIR) + set(EGPF_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}") + elseif(CMAKE_INSTALL_LIBDIR) + set(EGPF_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") + else() + set(EGPF_LIB_INSTALL_DIR "lib") + endif() + endif() + + set(PKGCONFIG_TARGET_BASENAME ${EGPF_BASE_NAME}) + set(PKGCONFIG_TARGET_LIBNAME ${EGPF_LIB_NAME}) + if (DEFINED EGPF_DEPS) + string(REPLACE ";" " " PKGCONFIG_TARGET_DEPS "${EGPF_DEPS}") + endif () + if(IS_ABSOLUTE "${EGPF_INCLUDE_INSTALL_DIR}") + set(PKGCONFIG_TARGET_INCLUDES "-I${EGPF_INCLUDE_INSTALL_DIR}") + else() + set(PKGCONFIG_TARGET_INCLUDES "-I${CMAKE_INSTALL_PREFIX}/${EGPF_INCLUDE_INSTALL_DIR}") + endif() + if(IS_ABSOLUTE "${EGPF_LIB_INSTALL_DIR}") + set(PKGCONFIG_TARGET_LIBS "${EGPF_LIB_INSTALL_DIR}") + else() + set(PKGCONFIG_TARGET_LIBS "${CMAKE_INSTALL_PREFIX}/${EGPF_LIB_INSTALL_DIR}") + endif() + set(PKGCONFIG_TARGET_DEFINES "") + if(EGPF_DEFINES) + set(PKGCONFIG_TARGET_DEFINES "${EGPF_DEFINE}") + endif() + + set(PKGCONFIG_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/${PKGCONFIG_TARGET_BASENAME}.pc) + if (EGPF_FILENAME_VAR) + set(${EGPF_FILENAME_VAR} ${PKGCONFIG_FILENAME} PARENT_SCOPE) + endif() + + file(WRITE ${PKGCONFIG_FILENAME} +" +Name: @PKGCONFIG_TARGET_LIBNAME@ +Version: @PROJECT_VERSION@ +Libs: -L@CMAKE_INSTALL_PREFIX@/@EGPF_LIB_INSTALL_DIR@ -l@PKGCONFIG_TARGET_LIBNAME@ +Cflags: @PKGCONFIG_TARGET_INCLUDES@ @PKGCONFIG_TARGET_DEFINES@ +Requires: @PKGCONFIG_TARGET_DEPS@ +" + ) + + if(EGPF_INSTALL) + set(ECM_PKGCONFIG_INSTALL_DIR "${EGPF_LIB_INSTALL_DIR}/pkgconfig" CACHE PATH "The directory where pkgconfig will be installed to.") + install(FILES ${PKGCONFIG_FILENAME} DESTINATION ${ECM_PKGCONFIG_INSTALL_DIR}) + endif() +endfunction() + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/modules/ECMQueryQmake.cmake new/extra-cmake-modules-1.3.0/modules/ECMQueryQmake.cmake --- old/extra-cmake-modules-1.2.0/modules/ECMQueryQmake.cmake 2014-09-06 00:20:45.000000000 +0200 +++ new/extra-cmake-modules-1.3.0/modules/ECMQueryQmake.cmake 2014-10-03 22:53:30.000000000 +0200 @@ -6,10 +6,18 @@ set(QMAKE_EXECUTABLE "qmake-qt5" CACHE) endif() -function(QUERY_QMAKE RESULT VAR) - exec_program(${QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output ) - if(NOT return_code) - file(TO_CMAKE_PATH "${output}" output) - set(${RESULT} ${output} PARENT_SCOPE) +# This is not public API (yet)! +function(query_qmake result_variable qt_variable) + execute_process( + COMMAND ${QMAKE_EXECUTABLE} -query "${qt_variable}" + RESULT_VARIABLE return_code + OUTPUT_VARIABLE output + ) + string(STRIP ${output} output) + if(return_code EQUAL 0) + file(TO_CMAKE_PATH "${output}" output_path) + set(${result_variable} "${output_path}" PARENT_SCOPE) + else() + message(FATAL "QMake call failed: ${error}") endif() -endfunction(QUERY_QMAKE) +endfunction() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/tests/CMakeLists.txt new/extra-cmake-modules-1.3.0/tests/CMakeLists.txt --- old/extra-cmake-modules-1.2.0/tests/CMakeLists.txt 2014-09-06 00:20:45.000000000 +0200 +++ new/extra-cmake-modules-1.3.0/tests/CMakeLists.txt 2014-10-03 22:53:30.000000000 +0200 @@ -6,6 +6,7 @@ add_subdirectory(ECMGenerateHeadersTest) add_subdirectory(ECMSetupVersionTest) +add_subdirectory(ECMGeneratePkgConfigFile) # a macro for tests that have a simple format where the name matches the # directory and project @@ -28,8 +29,16 @@ add_test_macro(ExecuteCoreModules dummy) add_test_macro(ExecuteKDEModules dummy) + add_test_macro(KDEInstallDirsTest.vars_defined dummy) add_test_macro(KDEInstallDirsTest.not_cache_variable dummy) +find_package(Qt5Core QUIET) +if (TARGET Qt5::qmake) + set(KDEInstallDirsTest.qt_vars_defined_EXTRA_OPTIONS + --build-options -DKDE_INSTALL_USE_QT_SYS_PATHS=ON) + add_test_macro(KDEInstallDirsTest.qt_vars_defined dummy) +endif () + add_test_macro(FindModules dummy) add_test_macro(UseFindModules dummy) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/tests/ECMGeneratePkgConfigFile/CMakeLists.txt new/extra-cmake-modules-1.3.0/tests/ECMGeneratePkgConfigFile/CMakeLists.txt --- old/extra-cmake-modules-1.2.0/tests/ECMGeneratePkgConfigFile/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/tests/ECMGeneratePkgConfigFile/CMakeLists.txt 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1,6 @@ +set(MODULES_DIR "${extra-cmake-modules_SOURCE_DIR}/modules") +configure_file(run_test.cmake.config "${CMAKE_CURRENT_BINARY_DIR}/run_test.cmake" @ONLY) + +add_test( + NAME ECMGenerateHeaders + COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/run_test.cmake") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/tests/ECMGeneratePkgConfigFile/KF5CoreAddons.pc new/extra-cmake-modules-1.3.0/tests/ECMGeneratePkgConfigFile/KF5CoreAddons.pc --- old/extra-cmake-modules-1.2.0/tests/ECMGeneratePkgConfigFile/KF5CoreAddons.pc 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/tests/ECMGeneratePkgConfigFile/KF5CoreAddons.pc 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1,6 @@ + +Name: KF5CoreAddons +Version: 5.43 +Libs: -L/usr/lib -lKF5CoreAddons +Cflags: -I/usr/KCoreAddons +Requires: Qt5Core diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/tests/ECMGeneratePkgConfigFile/run_test.cmake.config new/extra-cmake-modules-1.3.0/tests/ECMGeneratePkgConfigFile/run_test.cmake.config --- old/extra-cmake-modules-1.2.0/tests/ECMGeneratePkgConfigFile/run_test.cmake.config 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/tests/ECMGeneratePkgConfigFile/run_test.cmake.config 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1,54 @@ +set(CMAKE_MODULE_PATH "@MODULES_DIR@") +set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") +set(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@") + +set(CMAKE_INSTALL_PREFIX "/usr") + +include(ECMGeneratePkgConfigFile) +include(ECMSetupVersion) +include(CMakeParseArguments) + + +function (compare_files) + set(options) + set(oneValueArgs GENERATED ORIGINALS) + set(multiValueArgs) + cmake_parse_arguments(CF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + list(LENGTH CF_GENERATED count) + foreach(i RANGE ${count}) + list(GET CF_GENERATED 0 generated_file) + if (NOT EXISTS "${generated_file}") + message(FATAL_ERROR "${generated_file} was not generated") + endif() + file(READ "${generated_file}" file_contents) + string(STRIP "${file_contents}" file_contents) + + list(GET CF_ORIGINALS 0 original_file) + if (NOT EXISTS "${original_file}") + message(FATAL_ERROR "Original ${original_file} was not found") + endif() + file(READ "${original_file}" original_contents) + string(STRIP "${original_contents}" original_contents) + + if(NOT original_contents STREQUAL file_contents) + message(FATAL_ERROR "Different files: ${original_file} ${generated_file}") + endif() + endforeach() +endfunction() + +########################################################### + + +ecm_setup_version(5.43 VARIABLE_PREFIX KCOREADDONS + VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h" + PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfigVersion.cmake" + SOVERSION 5) + +message(STATUS "Test 1: no optional arguments") +set(origfiles "${CMAKE_CURRENT_SOURCE_DIR}/KF5CoreAddons.pc") + +ecm_generate_pkgconfig_file(BASE_NAME KF5CoreAddons DEPS Qt5Core INCLUDE_INSTALL_DIR /usr/KCoreAddons FILENAME_VAR OutputFile) + +compare_files(GENERATED ${OutputFile} + ORIGINALS ${origfiles}) +file(REMOVE ${OutputFile}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/tests/ExecuteKDEModules/CMakeLists.txt new/extra-cmake-modules-1.3.0/tests/ExecuteKDEModules/CMakeLists.txt --- old/extra-cmake-modules-1.2.0/tests/ExecuteKDEModules/CMakeLists.txt 2014-09-06 00:20:45.000000000 +0200 +++ new/extra-cmake-modules-1.3.0/tests/ExecuteKDEModules/CMakeLists.txt 2014-10-03 22:53:30.000000000 +0200 @@ -9,7 +9,9 @@ KDEFrameworkCompilerSettings ) -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../kde-modules) +set(ECM_KDE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../kde-modules) +set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../modules) +set(CMAKE_MODULE_PATH "${ECM_KDE_MODULE_DIR}") foreach(module ${all_kde_modules}) message(STATUS "module: ${module}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/tests/KDEInstallDirsTest/not_cache_variable/CMakeLists.txt new/extra-cmake-modules-1.3.0/tests/KDEInstallDirsTest/not_cache_variable/CMakeLists.txt --- old/extra-cmake-modules-1.2.0/tests/KDEInstallDirsTest/not_cache_variable/CMakeLists.txt 2014-09-06 00:20:45.000000000 +0200 +++ new/extra-cmake-modules-1.3.0/tests/KDEInstallDirsTest/not_cache_variable/CMakeLists.txt 2014-10-03 22:53:30.000000000 +0200 @@ -1,10 +1,12 @@ # Test KDEInstallDirs does not crash if a variable like CMAKE_INSTALL_LIBDIR is # defined but is not a cache variable. cmake_minimum_required(VERSION 2.8) -set(kde_modules_dir ${CMAKE_SOURCE_DIR}/../../../kde-modules) + +set(ECM_KDE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../kde-modules) +set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules) set(CMAKE_INSTALL_LIBDIR "foo") -include(${kde_modules_dir}/KDEInstallDirs.cmake) +include(${ECM_KDE_MODULE_DIR}/KDEInstallDirs.cmake) add_executable(dummy main.c) set_target_properties(dummy PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/tests/KDEInstallDirsTest/qt_vars_defined/CMakeLists.txt new/extra-cmake-modules-1.3.0/tests/KDEInstallDirsTest/qt_vars_defined/CMakeLists.txt --- old/extra-cmake-modules-1.2.0/tests/KDEInstallDirsTest/qt_vars_defined/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/tests/KDEInstallDirsTest/qt_vars_defined/CMakeLists.txt 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1,177 @@ +project(KDEInstallDirs.vars_defined) +cmake_minimum_required(VERSION 2.8.12) + +set(ECM_KDE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../kde-modules) +set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules) +set(CMAKE_MODULE_PATH "${ECM_KDE_MODULE_DIR}") +include(KDEInstallDirs) + +set(misc_vars + CMAKE_INSTALL_DEFAULT_COMPONENT_NAME + INSTALL_TARGETS_DEFAULT_ARGS + KF5_INSTALL_TARGETS_DEFAULT_ARGS +) + +set(relative_path_vars + # old-style variables + AUTOSTART_INSTALL_DIR + BIN_INSTALL_DIR + CMAKECONFIG_INSTALL_PREFIX + CONFIG_INSTALL_DIR + DATA_INSTALL_DIR + DBUS_INTERFACES_INSTALL_DIR + DBUS_SERVICES_INSTALL_DIR + DBUS_SYSTEM_SERVICES_INSTALL_DIR + EXEC_INSTALL_PREFIX + HTML_INSTALL_DIR + ICON_INSTALL_DIR + INCLUDE_INSTALL_DIR + KCFG_INSTALL_DIR + KCONF_UPDATE_INSTALL_DIR + KF5_DATA_INSTALL_DIR + KF5_INCLUDE_INSTALL_DIR + KF5_LIBEXEC_INSTALL_DIR + KNOTIFYRC_INSTALL_DIR + KXMLGUI_INSTALL_DIR + LIBEXEC_INSTALL_DIR + LIB_INSTALL_DIR + LOCALE_INSTALL_DIR + MAN_INSTALL_DIR + SBIN_INSTALL_DIR + SERVICES_INSTALL_DIR + SERVICETYPES_INSTALL_DIR + SHARE_INSTALL_PREFIX + SOUND_INSTALL_DIR + SYSCONF_INSTALL_DIR + TEMPLATES_INSTALL_DIR + WALLPAPER_INSTALL_DIR + XDG_APPS_INSTALL_DIR + XDG_DIRECTORY_INSTALL_DIR + XDG_MIME_INSTALL_DIR + + # new-style variables + CMAKE_INSTALL_APPDIR + CMAKE_INSTALL_AUTOSTARTDIR + CMAKE_INSTALL_BINDIR + CMAKE_INSTALL_CMAKEPACKAGEDIR + CMAKE_INSTALL_CONFDIR + CMAKE_INSTALL_DATADIR + CMAKE_INSTALL_DATADIR_KF5 + CMAKE_INSTALL_DATAROOTDIR + CMAKE_INSTALL_DBUSDIR + CMAKE_INSTALL_DBUSINTERFACEDIR + CMAKE_INSTALL_DBUSSERVICEDIR + CMAKE_INSTALL_DBUSSYSTEMSERVICEDIR + CMAKE_INSTALL_DESKTOPDIR + CMAKE_INSTALL_DOCBUNDLEDIR + CMAKE_INSTALL_EXECROOTDIR + CMAKE_INSTALL_ICONDIR + CMAKE_INSTALL_INCLUDEDIR + CMAKE_INSTALL_INCLUDEDIR_KF5 + CMAKE_INSTALL_INFODIR + CMAKE_INSTALL_KCFGDIR + CMAKE_INSTALL_KCONFUPDATEDIR + CMAKE_INSTALL_KNOTIFY5RCDIR + CMAKE_INSTALL_KXMLGUI5DIR + CMAKE_INSTALL_KSERVICES5DIR + CMAKE_INSTALL_KSERVICETYPES5DIR + CMAKE_INSTALL_LIBDIR + CMAKE_INSTALL_LIBEXECDIR + CMAKE_INSTALL_LIBEXECDIR_KF5 + CMAKE_INSTALL_LOCALEDIR + CMAKE_INSTALL_LOCALSTATEDIR + CMAKE_INSTALL_MANDIR + CMAKE_INSTALL_MIMEDIR + CMAKE_INSTALL_METAINFODIR + CMAKE_INSTALL_SBINDIR + CMAKE_INSTALL_SHAREDSTATEDIR + CMAKE_INSTALL_SOUNDDIR + CMAKE_INSTALL_SYSCONFDIR + CMAKE_INSTALL_TEMPLATEDIR + CMAKE_INSTALL_WALLPAPERDIR +) + +set(absolute_path_vars + IMPORTS_INSTALL_DIR + PLUGIN_INSTALL_DIR + QML_INSTALL_DIR + QT_PLUGIN_INSTALL_DIR + + CMAKE_INSTALL_PLUGINDIR + CMAKE_INSTALL_QMLDIR + CMAKE_INSTALL_QTPLUGINDIR + CMAKE_INSTALL_QTQUICKIMPORTSDIR + + CMAKE_INSTALL_FULL_APPDIR + CMAKE_INSTALL_FULL_AUTOSTARTDIR + CMAKE_INSTALL_FULL_BINDIR + CMAKE_INSTALL_FULL_CMAKEPACKAGEDIR + CMAKE_INSTALL_FULL_CONFDIR + CMAKE_INSTALL_FULL_DATADIR + CMAKE_INSTALL_FULL_DATADIR_KF5 + CMAKE_INSTALL_FULL_DATAROOTDIR + CMAKE_INSTALL_FULL_DBUSDIR + CMAKE_INSTALL_FULL_DBUSINTERFACEDIR + CMAKE_INSTALL_FULL_DBUSSERVICEDIR + CMAKE_INSTALL_FULL_DBUSSYSTEMSERVICEDIR + CMAKE_INSTALL_FULL_DESKTOPDIR + CMAKE_INSTALL_FULL_DOCBUNDLEDIR + CMAKE_INSTALL_FULL_EXECROOTDIR + CMAKE_INSTALL_FULL_ICONDIR + CMAKE_INSTALL_FULL_INCLUDEDIR + CMAKE_INSTALL_FULL_INCLUDEDIR_KF5 + CMAKE_INSTALL_FULL_INFODIR + CMAKE_INSTALL_FULL_KCFGDIR + CMAKE_INSTALL_FULL_KCONFUPDATEDIR + CMAKE_INSTALL_FULL_KNOTIFY5RCDIR + CMAKE_INSTALL_FULL_KXMLGUI5DIR + CMAKE_INSTALL_FULL_KSERVICES5DIR + CMAKE_INSTALL_FULL_KSERVICETYPES5DIR + CMAKE_INSTALL_FULL_LIBDIR + CMAKE_INSTALL_FULL_LIBEXECDIR + CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 + CMAKE_INSTALL_FULL_LOCALEDIR + CMAKE_INSTALL_FULL_LOCALSTATEDIR + CMAKE_INSTALL_FULL_MANDIR + CMAKE_INSTALL_FULL_MIMEDIR + CMAKE_INSTALL_FULL_METAINFODIR + CMAKE_INSTALL_FULL_PLUGINDIR + CMAKE_INSTALL_FULL_QMLDIR + CMAKE_INSTALL_FULL_QTPLUGINDIR + CMAKE_INSTALL_FULL_QTQUICKIMPORTSDIR + CMAKE_INSTALL_FULL_SBINDIR + CMAKE_INSTALL_FULL_SHAREDSTATEDIR + CMAKE_INSTALL_FULL_SOUNDDIR + CMAKE_INSTALL_FULL_SYSCONFDIR + CMAKE_INSTALL_FULL_TEMPLATEDIR + CMAKE_INSTALL_FULL_WALLPAPERDIR +) +if(APPLE) + # The default bundle directory is an absolute path + list(APPEND absolute_path_vars + BUNDLE_INSTALL_DIR + CMAKE_INSTALL_BUNDLEDIR + CMAKE_INSTALL_FULL_BUNDLEDIR + ) +endif() + +foreach(variable ${misc_vars} ${relative_path_vars} ${absolute_path_vars}) + if(NOT DEFINED ${variable}) + message(SEND_ERROR "${variable} is not defined.") + endif() +endforeach() + +foreach(variable ${relative_path_vars}) + if(IS_ABSOLUTE ${${variable}}) + message(SEND_ERROR "${variable} (${${variable}}) should be a relative path, but is absolute.") + endif() +endforeach() + +foreach(variable ${absolute_path_vars}) + if(NOT IS_ABSOLUTE ${${variable}}) + message(SEND_ERROR "${variable} (${${variable}}) should be an absolute path, but is relative.") + endif() +endforeach() + +add_executable(dummy main.c) +set_target_properties(dummy PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/tests/KDEInstallDirsTest/qt_vars_defined/main.c new/extra-cmake-modules-1.3.0/tests/KDEInstallDirsTest/qt_vars_defined/main.c --- old/extra-cmake-modules-1.2.0/tests/KDEInstallDirsTest/qt_vars_defined/main.c 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-1.3.0/tests/KDEInstallDirsTest/qt_vars_defined/main.c 2014-10-03 22:53:30.000000000 +0200 @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-1.2.0/tests/KDEInstallDirsTest/vars_defined/CMakeLists.txt new/extra-cmake-modules-1.3.0/tests/KDEInstallDirsTest/vars_defined/CMakeLists.txt --- old/extra-cmake-modules-1.2.0/tests/KDEInstallDirsTest/vars_defined/CMakeLists.txt 2014-09-06 00:20:45.000000000 +0200 +++ new/extra-cmake-modules-1.3.0/tests/KDEInstallDirsTest/vars_defined/CMakeLists.txt 2014-10-03 22:53:30.000000000 +0200 @@ -1,7 +1,9 @@ project(KDEInstallDirs.vars_defined) cmake_minimum_required(VERSION 2.8.12) -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../kde-modules) +set(ECM_KDE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../kde-modules) +set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules) +set(CMAKE_MODULE_PATH "${ECM_KDE_MODULE_DIR}") include(KDEInstallDirs) set(misc_vars -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de