[Marble-bugs] [Bug 282865] New: Issues with incude files for marble lib

Jarosław Staniek staniek at kde.org
Mon Sep 26 20:47:13 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=282865

           Summary: Issues with incude files for marble lib
           Product: marble
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: marble-bugs at kde.org
        ReportedBy: staniek at kde.org


Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

1. FindMarble.cmake defines MARBLE_INCLUDE_DIR with "marble" suffix because it
uses PATH_SUFFIXES in:

FIND_PATH( MARBLE_INCLUDE_DIR NAMES MarbleMap.h PATH_SUFFIXES marble)

This means users of the marble lib cannot use e.g. #include
<marble/MarbleWidget.h> since this won'twork with custom location of marble
includes - now the system one is used.
Used are forced by MARBLE_INCLUDE_DIR to use #include <MarbleWidget.h>. This
can also lead to nonunique filenames e.g. when other <global.h> is somewhere on
the path.

If MARBLE_INCLUDE_DIR has no marble/ suffix, e.g. by default it is :
/usr/include instead of /usr/include/marble, the issue would be fixed.
So it's enough to remove SUFFIX from FIND_PATH in the FindMarble.cmake file.

_Alternatively_ you can keep MARBLE_INCLUDE_DIR as is the do what Qt does: name
al lthe headers with as-much-as-posible-unique-headers e.g. rename global.h to
MarbleGlobal.h, 
AbstractDataPlugin.h to MarbleAbstractDataPlugin.h, etc.

2. At least one public file is not installed: GeoSceneDocument.h in marble lib
1.2. There may be more.
This makes Marble::MapThemeManager API not available while it is documented as
public. Even if you remove its documentation, you would have to remove its uses
from the public API, 
e.g. from QList<GeoSceneDocument const*>  Marble::MapThemeManager::mapThemes()
const.


Reproducible: Always

Steps to Reproduce:
A. Build and install marble in custom PREFIX. Define includes in CMakeLists.txt
with ${MARBLE_INCLUDE_DIR} and use #include <marble/MarbleWidget.h> in user
code. 

or B. Try to use #include <marble/GeoSceneDocument.h>

Actual Results:  
A. MarbleWidget.h will not be found.

or B. <marble/GeoSceneDocument.h> will not be found.

Expected Results:  
Both headers should be found.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Marble-bugs mailing list