[Amarok] Clean up includes a bit.

Maximilian Kossick maximilian.kossick at googlemail.com
Fri Dec 25 14:39:41 CET 2009


What's the "right" way to structure includes in Amarok? personally
I've basically changed all of SqlCollection and a bit more to include
files relative to "logical" units, i.e. amarok/src, amarok/utilities
and amarok/collection/sqlcollection, as this makes it easier to add
new compilation units (aka unit tests) and makes it easier to find the
header/implementaton files in the file system.

Cheers,
Max

On Fri, Dec 25, 2009 at 1:45 PM, Mark Kretschmann <kretschmann at kde.org> wrote:
> commit 9a999f2196c3da8f6bc992207dc3a3f98611e906
> Author:     Mark Kretschmann <kretschmann at kde.org>
> AuthorDate: Fri Dec 25 13:40:54 2009 +0100
> Commit:     Mark Kretschmann <kretschmann at kde.org>
> CommitDate: Fri Dec 25 13:40:54 2009 +0100
>
>    Clean up includes a bit.
>
> diff --git a/src/collection/mtpcollection/CMakeLists.txt b/src/collection/mtpcollection/CMakeLists.txt
> index 225184c..5b88a09 100644
> --- a/src/collection/mtpcollection/CMakeLists.txt
> +++ b/src/collection/mtpcollection/CMakeLists.txt
> @@ -5,24 +5,26 @@ macro_optional_find_package(Mtp)
>  #pkg_check_modules(Mtp libmtp>=0.3.0)
>
>  if (MTP_FOUND)
> -   include_directories( ../..
> -   ../../plugin
> -   ../../meta
> -   ../../meta/file
> -   ../../collection
> -   ../mediadevicecollection
> -   ../mediadevicecollection/support
> -   ../mediadevicecollection/handler
> -   ../mediadevicecollection/handler/capabilities
> -   handler
> -   handler/capabilities
> -   support
> -   ${GLIB2_INCLUDE_DIR}
> -   ${MTP_INCLUDE_DIR}
> -   ${CMAKE_CURRENT_BINARY_DIR}/../..
> -   ${AMAROK_COLLECTION_SUPPORT_DIR}
> -   ${KDE4_INCLUDE_DIR}
> -   ${QT_INCLUDES} )
> +   include_directories(
> +       ${Amarok_SOURCE_DIR}/src
> +       ${Amarok_SOURCE_DIR}/src/plugin
> +       ${Amarok_SOURCE_DIR}/src/meta
> +       ${Amarok_SOURCE_DIR}/src/meta/file
> +       ${Amarok_SOURCE_DIR}/src/collection
> +       ${Amarok_SOURCE_DIR}/src/collection/mediadevicecollection
> +       ${Amarok_SOURCE_DIR}/src/collection/mediadevicecollection/support
> +       ${Amarok_SOURCE_DIR}/src/collection/mediadevicecollection/handler
> +       ${Amarok_SOURCE_DIR}/src/collection/mediadevicecollection/handler/capabilities
> +       ${Amarok_SOURCE_DIR}/src/collection/mtpcollection/handler
> +       ${Amarok_SOURCE_DIR}/src/collection/mtpcollection/handler/capabilities
> +       ${Amarok_SOURCE_DIR}/src/collection/mtpcollection/support
> +       ${GLIB2_INCLUDE_DIR}
> +       ${MTP_INCLUDE_DIR}
> +       ${CMAKE_CURRENT_BINARY_DIR}/../..
> +       ${AMAROK_COLLECTION_SUPPORT_DIR}
> +       ${KDE4_INCLUDE_DIR}
> +       ${QT_INCLUDES}
> +)
>
>
>  ########### next target ###############
> @@ -48,7 +50,7 @@ if (MTP_FOUND)
>         ${QT_QTGUI_LIBRARY}
>         ${GLIB2_LIBRARIES}
>         ${MTP_LIBRARIES}
> -        )
> +    )
>
>        install(TARGETS amarok_collection-mtpcollection DESTINATION ${PLUGIN_INSTALL_DIR} )
>
>
>
>


More information about the Amarok-devel mailing list