summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Patrick Valsecchi <patrick@thus.ch>2015-02-24 08:49:08 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-24 11:40:54 +0100
commite64501574b6d68685082aa478965b11a517b4f48 (patch)
tree5802be32bc6196278691f24c7713af59b4526daa /CMakeLists.txt
parentddc01e39e7486434c6b814358ab4c77ea92c0776 (diff)
downloadsubsurface-e64501574b6d68685082aa478965b11a517b4f48.tar.gz
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>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 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()