Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Update
libkscreen
0003-Fix-quoting-problems-with-D-depending-on-r...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-Fix-quoting-problems-with-D-depending-on-required-cm.patch of Package libkscreen
From 3d8aedab6319b38840dd65e97a09d403c629a5d1 Mon Sep 17 00:00:00 2001 From: David Faure <faure@kde.org> Date: Sun, 26 Jul 2015 00:04:06 +0200 Subject: [PATCH 3/4] Fix quoting problems with -D depending on required cmake version by using a generated header file instead. This is also nicer because changing the version will only recompile the one file that includes that header, instead of all. cmake_minimum_required must be before project(), and should be 2.8.9 to match kdelibs4's own files. --- CMakeLists.txt | 12 +++++------- backends/xrandr/xrandrconfig.cpp | 1 + libkscreen-version.h.in | 1 + 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 libkscreen-version.h.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 9910cad949ea7c357faab02e1f18dc58ffb0653d..17ed027d73a96f540fa83a814735762c398c9652 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,9 @@ +cmake_minimum_required(VERSION 2.8.9) project(libkscreen) set(libkscreen_VERSION_MAJOR 1) set(libkscreen_VERSION_MINOR 0) set(libkscreen_VERSION_RELEASE 4) set(libkscreen_VERSION "${libkscreen_VERSION_MAJOR}.${libkscreen_VERSION_MINOR}.${libkscreen_VERSION_RELEASE}") -add_definitions("-DLIBKSCREEN_VERSION=\\\"${libkscreen_VERSION}\\\"") - -cmake_minimum_required(VERSION 2.8.0) if(POLICY CMP0017) cmake_policy(SET CMP0017 NEW) @@ -60,15 +58,15 @@ set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${BIN_INSTALL_DIR}" ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT Devel ) include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES} ${KDE4_INCLUDES}) +set(LIBKSCREEN_VERSION ${libkscreen_VERSION}) +configure_file(${libkscreen_SOURCE_DIR}/libkscreen-version.h.in libkscreen-version.h @ONLY) add_subdirectory(src) add_subdirectory(backends) add_subdirectory(tests) -configure_file(${libkscreen_SOURCE_DIR}/LibKScreenConfig.cmake.in - ${libkscreen_BINARY_DIR}/LibKScreenConfig.cmake - @ONLY -) +configure_file(${libkscreen_SOURCE_DIR}/LibKScreenConfig.cmake.in LibKScreenConfig.cmake @ONLY) + # this file is used by to check if the installed version can be used. macro_write_basic_cmake_version_file(${libkscreen_BINARY_DIR}/LibKScreenConfigVersion.cmake ${libkscreen_VERSION_MAJOR} ${libkscreen_VERSION_MINOR} ${libkscreen_VERSION_RELEASE}) diff --git a/backends/xrandr/xrandrconfig.cpp b/backends/xrandr/xrandrconfig.cpp index c75d5ea078598c4da1e29564fd6440a8ac4ad434..683ac7adcc9cbbd2fdbd47a0f68af984d169c868 100644 --- a/backends/xrandr/xrandrconfig.cpp +++ b/backends/xrandr/xrandrconfig.cpp @@ -25,6 +25,7 @@ #include "config.h" #include "output.h" #include "edid.h" +#include <libkscreen-version.h> #include <QX11Info> #include <QRect> diff --git a/libkscreen-version.h.in b/libkscreen-version.h.in new file mode 100644 index 0000000000000000000000000000000000000000..b2a9ca6c2b54119afdc072a17fc996371a98b1fa --- /dev/null +++ b/libkscreen-version.h.in @@ -0,0 +1 @@ +#cmakedefine LIBKSCREEN_VERSION "@LIBKSCREEN_VERSION@" -- 2.6.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor