On 22 September 2015 at 13:36, Lubomir I. Ivanov <[email protected]> wrote:
> On 22 September 2015 at 12:34, Lubomir I. Ivanov <[email protected]> wrote:
>> On 22 September 2015 at 06:56, Dirk Hohndel <[email protected]> wrote:
>>
>> i'm now downloading Qt5.5 to test it out.
>
> and it works - now building natively with qt5.5 and mingw 4.9.2.
>
> QtWebKit is pre-built and inlcuded in the official Qt package.
> the compiler is just a newer GCC as far as i can tell - still 32bit
> dwarf, but i *did install it* since i don't want to deal with possible
> issues between 4.8.2 (the old one from Qt5.3) and this one.
>
> one thing i forgot to mention that my cmake command line includes:
> -DNO_DOCS=1 -DNO_MARBLE=1 -DNO_TESTS=1
>

update:

i was able to get the tests and marble to work.
attached is a patch to add the MARBLE_FROM_PKGCONFIG. i know these
_FROM_PKGCONFIG are mostly for me, but please apply it.

the docs are problematic...
Documentation/Makefile does not work with what is distributed for
Win32 (e.g. a 1MB zip package).

a2x: ERROR: xmllint --nonet --noout --valid
C:\dev\subsurface\Documentation\user-manual.xml returned non-zero exit
status 1

something in the lines of:
python /bin/asciidoc/asciidoc.py user-manual.txt
does work though - i.e. not using "a2x -f text". the docs can be
retrieved from a Linux build, so there are alternatives here.

so apart from NO_DOCS=0, the only thing i'm not building at the moment
is FTDISUPPORT=1, but that's probably doable as well.

lubomir
--
From afd419ec3f4e55893545c57a1f6cc0887f89c0a0 Mon Sep 17 00:00:00 2001
From: "Lubomir I. Ivanov" <[email protected]>
Date: Tue, 22 Sep 2015 14:45:40 +0300
Subject: [PATCH] Cmake: add LIBMARBLE_FROM_PKGCONFIG and some Marble related
 fixes

This patch adds the option to retrive Marble with pkg-config in a
similar way to Grantlee, libgit2, etc.

It reorganizes the "if(NO_MARBLE)" case to be the "else()" of
if(NOT NO_MARBLE).

Also, it adds the "-r" option to "rm" here:
add_custom_target(link_marble_data ALL COMMAND rm -rf ./marbledata ...

as otherwise it fails on Win32/Msys with "marbledata is a directory".

Signed-off-by: Lubomir I. Ivanov <[email protected]>
---
 CMakeLists.txt | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2b911f2..f2d299d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,7 @@ 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(LIBMARBLE_FROM_PKGCONFIG "use pkg-config to retrieve marble" OFF)
 option(NO_MARBLE "disable the marble widget" OFF)
 option(NO_TESTS "disable the tests" OFF)
 option(NO_DOCS "disable the docs" OFF)
@@ -109,14 +110,24 @@ else()
 	include_directories(${LIBDIVECOMPUTER_INCLUDE_DIR})
 endif()
 
-# optional marble
+# setup marble
+
 if(NOT NO_MARBLE)
-	find_package(Marble QUIET)
-	if(MARBLE_FOUND)
-		include_directories(${MARBLE_INCLUDE_DIR})
+	if(LIBMARBLE_FROM_PKGCONFIG)
+		pkg_config_library(MARBLE libmarble REQUIRED)
+		set(MARBLE_LIBRARIES "")
 	else()
-		set(NO_MARBLE ON)
+		find_package(MARBLE QUIET)
+		if(MARBLE_FOUND)
+			include_directories(${MARBLE_INCLUDE_DIR})
+		else()
+			set(NO_MARBLE ON)
+		endif()
 	endif()
+else()
+	message(STATUS "building without marble widget support")
+	add_definitions(-DNO_MARBLE)
+	set(MARBLE_LIBRARIES "")
 endif()
 
 if(FTDISUPPORT)
@@ -129,12 +140,6 @@ if(FTDISUPPORT)
 	add_definitions(-DSERIAL_FTDI)
 endif()
 
-if(NO_MARBLE)
-	message(STATUS "building without marble widget support")
-	add_definitions(-DNO_MARBLE)
-	set(MARBLE_LIBRARIES "")
-endif()
-
 if(ANDROID)
 	set(FBSUPPORT OFF)
 	set(NO_PRINTING ON)
@@ -187,7 +192,7 @@ get_filename_component(PARENTDIR ${${PROJECT_NAME}_SOURCE_DIR} PATH)
 string(COMPARE EQUAL "${${PROJECT_NAME}_SOURCE_DIR}" "${PARENTDIR}" insourcesubdir)
 if(NOT (insource OR insourcedir))
 	if(NOT NO_MARBLE)
-		add_custom_target(link_marble_data ALL COMMAND rm -f marbledata && ln -s ${${PROJECT_NAME}_SOURCE_DIR}/marbledata ${${PROJECT_NAME}_BINARY_DIR}/marbledata)
+		add_custom_target(link_marble_data ALL COMMAND rm -rf ./marbledata && ln -s ${${PROJECT_NAME}_SOURCE_DIR}/marbledata ${${PROJECT_NAME}_BINARY_DIR}/marbledata)
 	endif()
 endif()
 
-- 
1.7.11.msysgit.0

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

Reply via email to