On 25 May 2015 at 21:26, Gehad Elrobey <gehadelro...@gmail.com> wrote:
> Hello Lubomir,
>
> As GSoC coding period have begun, I wanted to update you with my progress
> till now, I've pushed some more commits to my git branch, I will push some
> more commits on the weekend as I am having my finals exams now. BTW Have you
> managed to build subsurface with Grantlee yet or you still getting the same
> linking error?
>

alright, i'm able to build now.

please, merge the attached patch into your repository and let me know
if you have any issues with it.
also remove the NEW_PRINTING macro and CustomPrintDialog (more comments bellow).

per-commit short reviews. read from bottom to top:

---------------

9b2701e Add Progress bar to custom print dialog

see da5ce64

3a37e57 Remove unused variable

should be rebased. the code which it touches is WIP.

ff97353 Open custom print dialog if NEW_PRINTING is defined

see da5ce64

da5ce64 Create the new custom print dialog

i think you should just modify the current print dialog. adding more
files creates noise.
it was already discussed that master will have a "broken" printing
module while this GSoC task is WIP.

823d86a Add "NEW_PRINTING" Cmake variable

like Dirk pointed out we are going to make grantlee a hard dependency
for the printing to work. thus if cmake cannot find grantlee we just
need to disable the printing.
instead of the NEW_PRINTING cmake option rename it to NO_PRINTING (+
change the description) which sets the NO_PRINTING pre-processor macro
if "the user says so" or if grantlee is not found.

ef99f65 Add Printer class that holds the rendering logic.

this is WIP and is good to go as the basis for the future logic of
having user printer dialog selectable properties.

78fcd53 Add TemplateLayout class

asked the same before; any comments on why we need a local Dive object?
i highly doubt this will reach master as is.

c013202 CMAKE: Require Grantlee library

i need pkg-config for this to work. the attached patch adds the
optional LIBGRANTLEE_FROM_PKGCONFIG
the folder structure of some of these Qt based libraries like (marble
and grantlee) is plain weird...

good to go, once you merge it with my patch and remove the
NEW_PRINTING option see 823d86a.

8c742f1 Create two dives per page grantlee template

this one was reviewed previously. good to go in.

---------------

as usual, let me know if you have any questions.

lubomir
--
From 7894d6a61401464f94b499a9d1eaa26ac75d35ba Mon Sep 17 00:00:00 2001
From: "Lubomir I. Ivanov" <neolit...@gmail.com>
Date: Tue, 26 May 2015 13:51:49 +0300
Subject: [PATCH 39/39] REBASEME: Cmake: add optional pkg-config for Grantlee

Signed-off-by: Lubomir I. Ivanov <neolit...@gmail.com>
---
 CMakeLists.txt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 711a412..09d8652 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,7 @@ set(CMAKE_AUTOMOC ON)
 set(CMAKE_AUTOUIC ON)
 option(LIBGIT2_FROM_PKGCONFIG "use pkg-config to retrieve libgit2" OFF)
 option(LIBDC_FROM_PKGCONFIG "use pkg-config to retrieve libdivecomputer" OFF)
+option(LIBGRANTLEE_FROM_PKGCONFIG "use pkg-config to retrieve grantlee" OFF)
 option(NO_MARBLE "disable the marble widget" OFF)
 option(NO_TESTS "disable the tests" OFF)
 option(NO_DOCS "disable the docs" OFF)
@@ -68,8 +69,13 @@ endif()
 # setup Grantlee
 
 if(NEW_PRINTING)
-	find_package(Grantlee5)
-	set(GRANTLEE_LIBRARIES Grantlee5::Templates)
+	if(LIBGRANTLEE_FROM_PKGCONFIG)
+		pkg_config_library(GRANTLEE libgrantlee REQUIRED)
+		set(GRANTLEE_LIBRARIES "")
+	else()
+		find_package(Grantlee5)
+		set(GRANTLEE_LIBRARIES Grantlee5::Templates)
+	endif()
 	add_definitions(-DNEW_PRINTING)
 endif()
 
-- 
1.7.11.msysgit.0

_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to