Good morning.

It looks like that 72806e4 breaks building the automated html exporter by
including the mainwindow.h file.

Adding the dependencies required to link produces a 22mb executable, which
seems pretty much for a non-gui standalone tool (I think previously it was
about 4mb).

Attached patch, although solves the build problem, is not meant to be
applied, just to show what I'm talking about. The correct solution would
probably be to put the helper in_planer() function elsewhere, or change it
to avoid the need of mainwindow.h

Regards.

Salva.
From 47a447558e96ed2b9407117bc9f30ea011c320e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Salvador=20Cu=C3=B1at?= <[email protected]>
Date: Sat, 22 Aug 2015 07:35:00 +0200
Subject: [PATCH] add export-html building capability again
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Changes in 72806e4 breaks building the export-html automated exporter
including mainwindow.h.

This patch makes building possible again, but linking against so many
libraries produces a pretty big executable.

Signed-off-by: Salvador Cuñat <[email protected]>
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a2270b..e21b2ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -551,8 +551,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
 endif()
 
 # build an automated html exporter
-add_executable(export-html EXCLUDE_FROM_ALL export-html.cpp qt-init.cpp qthelper.cpp ${SUBSURFACE_RESOURCES})
-target_link_libraries(export-html subsurface_corelib ${SUBSURFACE_LINK_LIBRARIES})
+add_executable(export-html EXCLUDE_FROM_ALL export-html.cpp qt-init.cpp qthelper.cpp ${SUBSURFACE_INTERFACE} ${SUBSURFACE_RESOURCES})
+target_link_libraries(export-html subsurface_corelib subsurface_generated_ui subsurface_interface subsurface_models subsurface_profile ${SUBSURFACE_LINK_LIBRARIES})
 
 # QTest based tests
 macro(TEST NAME FILE)
-- 
2.5.0

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to