Fixed cmake build.

Non parallel build was broken because qthelper.cpp was depending
indirectly on a QT generated file and no cmake dependency was enforcing
the file to be generated before. I've removed the not needed #include
that was introducing this dependency.

In cmake, {FOO STREQUAL ""} is TRUE only if FOO is defined and
empty. Fixed a couple of bad usages.

Made the required libraries actually required in cmake.

From ef5ab90f258c5754d3022a023c28050cbafed3d5 Mon Sep 17 00:00:00 2001
From: Patrick Valsecchi <patrick@thus.ch>
Date: Tue, 24 Feb 2015 08:38:49 +0100
Subject: [PATCH 1/2] Fixed cmake build.

Non parallel build was broken because qthelper.cpp was depending
indirectly on a QT generated file and no cmake dependency was enforcing
the file to be generated before. I've removed the not needed #include
that was introducing this dependency.

In cmake, {FOO STREQUAL ""} is TRUE only if FOO is defined and
empty. Fixed a couple of bad usages.

Made the required libraries actually required in cmake.

Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Patrick Valsecchi 2015-02-24 08:49:08 +01:00 committed by Dirk Hohndel
parent ddc01e39e7
commit e64501574b
2 changed files with 3 additions and 4 deletions

View file

@ -13,7 +13,7 @@ INCLUDE_DIRECTORIES( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} qt-ui qt-
FIND_PACKAGE(PkgConfig)
MACRO(pkg_config_library LIBNAME pcfile)
pkg_check_modules(${LIBNAME} ${pcfile})
pkg_check_modules(${LIBNAME} REQUIRED ${pcfile})
include_directories(${${LIBNAME}_INCLUDE_DIRS})
link_directories(${${LIBNAME}_LIBRARY_DIRS})
add_definitions(${${LIBNAME}_CFLAGS_OTHER})
@ -22,7 +22,7 @@ ENDMACRO()
pkg_config_library(LIBXML libxml-2.0)
pkg_config_library(LIBSQLITE3 sqlite3)
if(LIBGIT2DEVEL STREQUAL "")
if(NOT DEFINED LIBGIT2DEVEL)
pkg_config_library(LIBGIT2 libgit2)
ELSE()
include_directories(${LIBGIT2DEVEL}/include)
@ -61,7 +61,7 @@ FIND_PACKAGE(Qt5Test REQUIRED)
SET(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::WebKitWidgets Qt5::PrintSupport Qt5::Svg)
SET(QT_TEST_LIBRARIES ${QT_LIBRARIES} Qt5::Test)
IF(LIBMARBLEDEVEL STREQUAL "")
IF(NOT DEFINED LIBMARBLEDEVEL)
FIND_PACKAGE(Marble REQUIRED)
INCLUDE_DIRECTORIES(${MARBLE_INCLUDE_DIR})
ELSE()

View file

@ -2,7 +2,6 @@
#include "helpers.h"
#include "gettextfromc.h"
#include "statistics.h"
#include "subsurfacewebservices.h"
#include "usersurvey.h"
#include "membuffer.h"
#include "subsurfacesysinfo.h"