From 4f6bd462c8d6532f43ec6609b32f711957603b9f Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Sat, 23 Sep 2017 16:06:13 +0200 Subject: [PATCH] Imported upstream version 0.4.0. --- CHANGELOG | 16 ++++- CMakeLists.txt | 16 ++--- cmake/LXQtConfigVars.cmake.in | 6 -- cmake/find-modules/FindExif.cmake | 80 ++++++++++++++++++++++++ cmake/modules/LXQtCompilerSettings.cmake | 13 +++- debian/changelog | 2 +- 6 files changed, 115 insertions(+), 18 deletions(-) create mode 100644 cmake/find-modules/FindExif.cmake diff --git a/CHANGELOG b/CHANGELOG index d89921c..2dd3d3b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,21 @@ -lxqt-build-tools-0.3.2 / 2017-01-14 +lxqt-build-tools-0.4.0 / 2017-09-22 =================================== + * Bump version to 0.4.0 + * Added needed versions + * remove version set from LXQtConfigVars.in + * Move LXQt version to liblxqt + * Fixes a FTBFS with superbuild mode + * Adds a FindExif module + * LXQtCompilerSettings: Fixes a typo in diagnostics-color + * Adds (Ninja) colored diagnostics for GCC (>=4.9) + * Enable strict iterators for debug builds + +0.3.2 / 2017-01-14 +================== + + * Release 0.3.2: Update changelog * Bump version to 0.3.2 - finally the build tools are arch: all (#15) * Warnings (#16) * Remove arched bits from version.cmake-file (#14) diff --git a/CMakeLists.txt b/CMakeLists.txt index e63004c..a276011 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,14 +5,16 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) option(WITH_XDG_DIRS_FALLBACK "Use our XDG_CONFIG_DIRS fallback" ON) set(LXQT_BUILD_TOOLS_MAJOR_VERSION 0) -set(LXQT_BUILD_TOOLS_MINOR_VERSION 3) -set(LXQT_BUILD_TOOLS_PATCH_VERSION 2) +set(LXQT_BUILD_TOOLS_MINOR_VERSION 4) +set(LXQT_BUILD_TOOLS_PATCH_VERSION 0) set(LXQT_BUILD_TOOLS_VERSION ${LXQT_BUILD_TOOLS_MAJOR_VERSION}.${LXQT_BUILD_TOOLS_MINOR_VERSION}.${LXQT_BUILD_TOOLS_PATCH_VERSION}) -set(LXQT_MAJOR_VERSION 0) -set(LXQT_MINOR_VERSION 11) -set(LXQT_PATCH_VERSION 1) -set(LXQT_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_PATCH_VERSION}) + +# Check for needed versions +# We need at least Qt 5.6.1 and glib-2.0 >= 2.50 to build all LXQt parts +find_package(PkgConfig REQUIRED) +find_package(Qt5Core "5.6.1" REQUIRED) +pkg_check_modules(GLIB2 glib-2.0>=2.50 REQUIRED) include(CMakePackageConfigHelpers) include(GNUInstallDirs) # Standard directories for installation @@ -103,7 +105,7 @@ configure_file( # The package version file is common to superbuild and installable mode configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/lxqt-build-tools-config-version.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/lxqt-build-tools-config-version.cmake" + "${CMAKE_BINARY_DIR}/lxqt-build-tools-config-version.cmake" @ONLY ) diff --git a/cmake/LXQtConfigVars.cmake.in b/cmake/LXQtConfigVars.cmake.in index fd8870f..3dfe0e6 100644 --- a/cmake/LXQtConfigVars.cmake.in +++ b/cmake/LXQtConfigVars.cmake.in @@ -16,11 +16,6 @@ # added to XDG_DATA_DIRS by the startlxqt script. -set(LXQT_MAJOR_VERSION "@LXQT_MAJOR_VERSION@") -set(LXQT_MINOR_VERSION "@LXQT_MINOR_VERSION@") -set(LXQT_PATCH_VERSION "@LXQT_PATCH_VERSION@") -set(LXQT_VERSION "@LXQT_VERSION@") - set(LXQT_LIBRARY_NAME "@LXQT_LIBRARY_NAME@") set(LXQT_RELATIVE_SHARE_DIR "@LXQT_RELATIVE_SHARE_DIR@") set(LXQT_SHARE_DIR "@LXQT_SHARE_DIR@") @@ -37,4 +32,3 @@ add_definitions("-DLXQT_SHARE_TRANSLATIONS_DIR=\"${LXQT_TRANSLATIONS_DIR}\"") add_definitions("-DLXQT_GRAPHICS_DIR=\"${LXQT_GRAPHICS_DIR}\"") add_definitions("-DLXQT_ETC_XDG_DIR=\"${LXQT_ETC_XDG_DIR}\"") add_definitions("-DLXQT_DATA_DIR=\"${LXQT_DATA_DIR}\"") -add_definitions("-DLXQT_VERSION=\"${LXQT_VERSION}\"") diff --git a/cmake/find-modules/FindExif.cmake b/cmake/find-modules/FindExif.cmake new file mode 100644 index 0000000..dd4d2b2 --- /dev/null +++ b/cmake/find-modules/FindExif.cmake @@ -0,0 +1,80 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# BSD-3-Clause file for details. + +#.rst: +# FindExif +# ----------- +# +# Try to find the Exif library +# +# Once done this will define +# +# :: +# +# EXIF_FOUND - System has the Exif library +# EXIF_INCLUDE_DIR - The Exif library include directory +# EXIF_INCLUDE_DIRS - Location of the headers needed to use the Exif library +# EXIF_LIBRARIES - The libraries needed to use the Exif library +# EXIF_DEFINITIONS - Compiler switches required for using the Exif library +# EXIF_VERSION_STRING - the version of the Exif library found + + +# use pkg-config to get the directories and then use these values +# in the find_path() and find_library() calls +find_package(PkgConfig QUIET) +pkg_check_modules(PC_EXIF QUIET libexif) +set(EXIF_DEFINITIONS ${PC_EXIF_CFLAGS_OTHER}) + +find_path(EXIF_INCLUDE_DIR NAMES libexif/exif-data.h + HINTS + ${PC_EXIF_INCLUDEDIR} + ${PC_EXIF_INCLUDE_DIRS} + PATH_SUFFIXES libexif +) + +find_library(EXIF_LIBRARIES NAMES exif libexif + HINTS + ${PC_EXIF_LIBDIR} + ${PC_EXIF_LIBRARY_DIRS} +) + + +# iterate over all dependencies +unset(FD_LIBRARIES) +foreach(depend ${PC_EXIF_LIBRARIES}) + find_library(_DEPEND_LIBRARIES + NAMES + ${depend} + HINTS + ${PC_EXIF_LIBDIR} + ${PC_EXIF_LIBRARY_DIRS} + ) + + if (_DEPEND_LIBRARIES) + list(APPEND FD_LIBRARIES ${_DEPEND_LIBRARIES}) + endif() + unset(_DEPEND_LIBRARIES CACHE) +endforeach() + +set(EXIF_VERSION_STRING ${PC_EXIF_VERSION}) +set(EXIF_INCLUDE_DIR ${PC_EXIF_INCLUDEDIR}) + +list(APPEND EXIF_INCLUDE_DIRS + ${EXIF_INCLUDE_DIR} + ${PC_EXIF_INCLUDE_DIRS} +) +list(REMOVE_DUPLICATES EXIF_INCLUDE_DIRS) + +list(APPEND EXIF_LIBRARIES + ${FD_LIBRARIES} +) + +list(REMOVE_DUPLICATES EXIF_LIBRARIES) +# handle the QUIETLY and REQUIRED arguments and set EXIF_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Exif + REQUIRED_VARS EXIF_LIBRARIES EXIF_INCLUDE_DIR EXIF_INCLUDE_DIRS + VERSION_VAR EXIF_VERSION_STRING) + +mark_as_advanced(EXIF_INCLUDE_DIR EXIF_LIBRARIES) diff --git a/cmake/modules/LXQtCompilerSettings.cmake b/cmake/modules/LXQtCompilerSettings.cmake index 2b1e774..14c8398 100644 --- a/cmake/modules/LXQtCompilerSettings.cmake +++ b/cmake/modules/LXQtCompilerSettings.cmake @@ -75,6 +75,10 @@ add_definitions( -DQT_USE_QSTRINGBUILDER ) +if (CMAKE_BUILD_TYPE MATCHES "Debug") + add_definitions(-DQT_STRICT_ITERATORS) +endif() + #----------------------------------------------------------------------------- # Detect Clang compiler @@ -189,9 +193,12 @@ endif() #----------------------------------------------------------------------------- # Enable colored diagnostics for the CLang/Ninja combination #----------------------------------------------------------------------------- -if (LXQT_COMPILER_IS_CLANGCXX AND CMAKE_GENERATOR STREQUAL "Ninja") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics") +if (CMAKE_GENERATOR STREQUAL "Ninja" AND + # Rationale: https://public.kitware.com/Bug/view.php?id=15502 + ((CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) OR + (LXQT_COMPILER_IS_CLANGCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5))) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") endif() diff --git a/debian/changelog b/debian/changelog index 240754c..232d967 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,7 @@ lxqt-build-tools (0.4.0-1) experimental; urgency=medium - git-versions: get current upstream git versions - get-snapshot: get a git snapshot - -- Alf Gaida Sat, 23 Sep 2017 15:56:32 +0200 + -- Alf Gaida Sat, 23 Sep 2017 16:05:32 +0200 lxqt-build-tools (0.3.2-1) unstable; urgency=medium