Commit 1a0dbc18 authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Directory structure reorganization

Moves files and directories:
1) src/lib => src/lib/marble
2) src/*marble-qt related* => src/apps/marble-qt
   src/*marble (KDE) related* => src/apps/marble-kde
   src/qt-components/marble-touch => src/apps/marble-touch

1) is a preparation to align the structure of installed headers with
the structure of the library sources, so that we can build tools and
examples in the same go and detect API changes early.
2) results in a much more tidy src/ and more intuitive location of the
sources of the respective applications.

REVIEW: 112114
parent 1ba23851

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -356,18 +356,18 @@ endif(WIN32)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src/lib
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/projections
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/geodata
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/geodata/data
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/geodata/graphicsitem
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/geodata/handlers/dgml
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/geodata/parser
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/geodata/writer
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/geodata/scene
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/graphicsview
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble/projections
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble/geodata
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble/geodata/data
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble/geodata/graphicsitem
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble/geodata/handlers/dgml
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble/geodata/parser
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble/geodata/writer
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble/geodata/scene
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/marble/graphicsview
${CMAKE_CURRENT_BINARY_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}/src/lib
${CMAKE_CURRENT_BINARY_DIR}/src/lib/marble
)
####################################################
# Descend into subdirectories
......
......@@ -98,7 +98,7 @@ endmacro( marble_add_plugin _target_name )
macro( marble_add_designer_plugin _target_name )
set( _src ${ARGN} )
qt_add_resources( _src ../../../marble.qrc )
qt_add_resources( _src ../../../apps/marble-ui/marble.qrc )
if( QTONLY )
marble_qt4_automoc( ${_src} )
......
......@@ -41,16 +41,12 @@ if( QT_QTDECLARATIVE_FOUND OR Qt5Quick_FOUND )
ENDIF()
ENDIF()
add_subdirectory( marble-mobile )
add_subdirectory( apps )
add_subdirectory( routing-instructions )
add_subdirectory( lib )
add_subdirectory( lib/marble )
add_subdirectory( plugins )
add_subdirectory( bindings )
if( QT_QTDECLARATIVE_FOUND OR Qt5Quick_FOUND )
add_subdirectory( qt-components )
endif( QT_QTDECLARATIVE_FOUND OR Qt5Quick_FOUND )
if( NOT QTONLY AND KDE4_PLASMA_LIBS ) # don't try to build this against kdelibs < 4.2
add_subdirectory( plasmoid )
add_subdirectory( plasmarunner )
......@@ -112,127 +108,6 @@ else (QTONLY)
endif (QTONLY)
set(marble_SRCS ControlView.cpp MarbleTest.cpp qtmain.cpp QtMainWindow.cpp)
set(marble_HDRS ControlView.h MarbleTest.h QtMainWindow.h)
if (NOT QTONLY)
set(marble_kde_SRCS ControlView.cpp MarbleTest.cpp kdemain.cpp KdeMainWindow.cpp marble_part.cpp)
set(marble_kde_HDRS ControlView.h MarbleTest.h KdeMainWindow.h)
set(marblepart_SRCS marble_part.cpp)
kde4_add_kcfg_files(marblepart_SRCS settings.kcfgc)
kde4_add_plugin(marble_part WITH_PREFIX ${marblepart_SRCS} ControlView.cpp)
target_link_libraries(marble_part ${KDE4_KPARTS_LIBS} ${KDE4_KNEWSTUFF3_LIBS} marblewidget)
install(TARGETS marble_part DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES marble_part.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES marble_part.rc DESTINATION ${DATA_INSTALL_DIR}/marble)
endif (NOT QTONLY)
if(MSVC)
set(marble_SRCS ${marble_SRCS} marble.rc)
endif(MSVC)
if(MINGW)
QT4_ADD_RESOURCES2(marble_SRCS marble.rc)
endif(MINGW)
qt_add_resources(marble_SRCS marble.qrc)
qt_wrap_ui(marble_SRCS ${marble_UI})
marble_qt4_automoc(${marble_SRCS})
if (NOT QTONLY)
kde4_add_ui_files(marble_kde_SRCS ${marble_UI})
kde4_add_kcfg_files(marble_kde_SRCS settings.kcfgc)
endif ()
if (WIN32)
add_executable (marble-qt WIN32 ${marble_SRCS} ${marble_HDRS})
else (WIN32)
if (APPLE)
add_executable (marble-qt MACOSX_BUNDLE ${marble_SRCS})
# For Mac OS X, the executable must be at the root of the bundle's executable folder
INSTALL(TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
else (APPLE)
add_executable (marble-qt ${marble_SRCS} ${marble_HDRS})
endif (APPLE)
endif (WIN32)
if (NOT QTONLY)
kde4_add_executable (marble ${marble_kde_SRCS} ${marble_kde_HDRS})
endif ()
if( QT4_FOUND )
target_link_libraries (
marble-qt
${QT_QTCORE_LIBRARY}
${QT_QTDBUS_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${QT_QTSCRIPT_LIBRARY}
${QT_QTMAIN_LIBRARY}
marblewidget)
else()
target_link_libraries (
marble-qt
${Qt5Core_LIBRARIES}
${Qt5Xml_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${Qt5PrintSupport_LIBRARIES}
${Qt5Network_LIBRARIES}
${Qt5WebKitWidgets_LIBRARIES}
${Qt5WebKit_LIBRARIES}
marblewidget
)
endif()
if (NOT QTONLY)
target_link_libraries (
marble
${KDE4_KPARTS_LIBS}
${KDE4_KNEWSTUFF3_LIBS}
marblewidget
)
endif ()
if(WIN32)
target_link_libraries(
marble-qt
ws2_32
imm32
winmm
)
endif(WIN32)
## this works for win32 only because FindQt4 does not handle this correct
if(STATIC_BUILD)
target_link_libraries(marble ${QT_PLUGINS_DIR}/imageformats/qjpeg.lib)
target_link_libraries(marble ${QT_PLUGINS_DIR}/imageformats/qsvg.lib)
endif(STATIC_BUILD)
if(WIN32)
install (TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
else(WIN32)
if (APPLE)
# No need for this when installing to a bundle
else (APPLE)
install (TARGETS marble-qt RUNTIME DESTINATION bin )
install( FILES marble.desktop DESTINATION ${APPS_INSTALL_DIR})
endif (APPLE)
endif(WIN32)
if(NOT QTONLY)
install(TARGETS marble ${INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS marble.desktop DESTINATION ${APPS_INSTALL_DIR})
install(FILES marble.kcfg DESTINATION ${KCFG_INSTALL_DIR})
# install the XML GUI file and the Hot New Stuff config
install(FILES marbleui.rc DESTINATION ${DATA_INSTALL_DIR}/marble)
install(FILES marble.knsrc DESTINATION ${DATA_INSTALL_DIR}/marble)
endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/config-marble.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config-marble.h
......
/**
* This file is part of the Marble Virtual Globe.
*
* Copyright (C) 2005 Torsten Rahn (rahn@kde.org)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef MARBLE_MARBLEVIEWADAPTOR_H
#define MARBLE_MARBLEVIEWADAPTOR_H
#include <QDBusAbstractAdaptor>
#include "katlasview.h"
/**
* @short D-Bus Adaptor for MarbleView
*
* This class provides a D-Bus Adaptor for the MarbleView.
*
* @author Torsten Rahn rahn @ kde.org
*/
class MarbleViewAdaptor : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.DBus.MarbleView")
public:
explicit MarbleViewAdaptor( KAtlasView* marbleView )
: QDBusAbstractAdaptor(marbleView)
{
}
protected:
KAtlasView *m_marbleView;
public slots:
// Q_ASYNC
void zoomIn()
{
m_marbleView->zoomIn();
}
};
#endif // MARBLE_MARBLEVIEWADAPTOR_H
add_subdirectory(marble-ui)
add_subdirectory(marble-qt)
add_subdirectory(marble-mobile)
if (NOT QTONLY)
add_subdirectory(marble-kde)
endif()
if( QT_QTDECLARATIVE_FOUND OR Qt5Quick_FOUND )
add_subdirectory(marble-touch)
endif( QT_QTDECLARATIVE_FOUND OR Qt5Quick_FOUND )
set(marble_kde_SRCS
kdemain.cpp
KdeMainWindow.cpp
marble_part.cpp
)
set(marblepart_SRCS marble_part.cpp)
MESSAGE(STATUS "including directory ${KDE4_INCLUDE_DIR}")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../marble-ui)
kde4_add_kcfg_files(marblepart_SRCS settings.kcfgc)
kde4_add_plugin(marble_part WITH_PREFIX ${marblepart_SRCS})
target_link_libraries(marble_part ${KDE4_KPARTS_LIBS} ${KDE4_KNEWSTUFF3_LIBS} marbleui marblewidget)
install(TARGETS marble_part DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES marble_part.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES marble_part.rc DESTINATION ${DATA_INSTALL_DIR}/marble)
kde4_add_ui_files(marble_kde_SRCS ${marble_UI})
kde4_add_kcfg_files(marble_kde_SRCS settings.kcfgc)
kde4_add_executable (marble ${marble_kde_SRCS})
target_link_libraries (
marble
${KDE4_KPARTS_LIBS}
${KDE4_KNEWSTUFF3_LIBS}
marbleui
marblewidget
)
## this works for win32 only because FindQt4 does not handle this correct
if(STATIC_BUILD)
target_link_libraries(marble ${QT_PLUGINS_DIR}/imageformats/qjpeg.lib)
target_link_libraries(marble ${QT_PLUGINS_DIR}/imageformats/qsvg.lib)
endif(STATIC_BUILD)
if (NOT APPLE)
install( FILES marble.desktop DESTINATION ${APPS_INSTALL_DIR})
endif()
install(TARGETS marble ${INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS marble.desktop DESTINATION ${APPS_INSTALL_DIR})
install(FILES marble.kcfg DESTINATION ${KCFG_INSTALL_DIR})
# install the XML GUI file and the Hot New Stuff config
install(FILES marbleui.rc DESTINATION ${DATA_INSTALL_DIR}/marble)
install(FILES marble.knsrc DESTINATION ${DATA_INSTALL_DIR}/marble)
......@@ -14,7 +14,7 @@
#define MARBLE_MAINWINDOW_H
#include <KXmlGuiWindow>
#include <KDE/KXmlGuiWindow>
namespace Marble
{
......
......@@ -10,13 +10,13 @@
// Copyright 2009 Jens-Michael Hoffmann <jensmh@gmx.de>
//
#include <KApplication>
#include <KLocale>
#include <KAboutData>
#include <KCmdLineArgs>
#include <KConfig>
#include <KConfigGroup>
#include <KGlobal>
#include <KDE/KApplication>
#include <KDE/KLocale>
#include <KDE/KAboutData>
#include <KDE/KCmdLineArgs>
#include <KDE/KConfig>
#include <KDE/KConfigGroup>
#include <KDE/KGlobal>
#include <QFile>
......
......@@ -5,7 +5,7 @@
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="marblerc" />
<include>kglobalsettings.h</include>
<include>"lib/MarbleGlobal.h"</include>
<include>"../../lib/marble/MarbleGlobal.h"</include>
<include>QtCore/QDir</include>
<include>QtCore/QLocale</include>
<group name="MarbleWidget" >
......
......@@ -51,9 +51,9 @@
#include <knewstuff3/knewstuffaction.h>
#include <knewstuff3/downloaddialog.h>
#include <knewstuff3/uploaddialog.h>
#include <KStandardDirs>
#include <KDE/KStandardDirs>
#include <kdeprintdialog.h>
#include <KToolBar>
#include <KDE/KToolBar>
// Marble library classes
#include "AbstractFloatItem.h"
......
......@@ -5,6 +5,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}
${QT_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../marble-ui
)
if( QT4_FOUND )
include(${QT_USE_FILE})
......@@ -14,12 +15,11 @@ set( marblemobile_SRCS
main.cpp
MobileMainWindow.cpp
StackableWindow.cpp
../MarbleTest.cpp
)
add_definitions(-DMARBLE_MOBILE_VERSION_STRING="1.6.20")
marble_qt4_automoc( ${marblemobile_SRCS} )
add_executable( marble-mobile ${marblemobile_SRCS} )
target_link_libraries( marble-mobile ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTMAIN_LIBRARY} marblewidget )
target_link_libraries( marble-mobile ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTMAIN_LIBRARY} marbleui marblewidget )
install( TARGETS marble-mobile RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment