From e64501574b6d68685082aa478965b11a517b4f48 Mon Sep 17 00:00:00 2001 From: Patrick Valsecchi Date: Tue, 24 Feb 2015 08:49:08 +0100 Subject: 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 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 Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 6 +++--- qthelper.cpp | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0707ca6e3..9c8b7e6e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/qthelper.cpp b/qthelper.cpp index 2776290bd..4cedc5597 100644 --- a/qthelper.cpp +++ b/qthelper.cpp @@ -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" -- cgit v1.2.3-70-g09d2