From 74755b64b169a7d161cd42c672ca45fcdeb5f028 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Sun, 22 Dec 2019 14:10:29 +0100 Subject: [PATCH] build-system: Add CMakeLists.txt to map-widget In order to make the central CMakeLists cleaner and more consistent add a CMakeLists.txt to map-widget, like in other root directories. Signed-off-by: Jan Iversen --- CMakeLists.txt | 4 +++- map-widget/CMakeLists.txt | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 map-widget/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index dd005a61d..b2211c477 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -278,6 +278,7 @@ add_subdirectory(core) add_subdirectory(qt-models) add_subdirectory(commands) add_subdirectory(profile-widget) +add_subdirectory(map-widget) if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable") add_subdirectory(desktop-widgets) @@ -304,7 +305,6 @@ if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable") mobile-widgets/qml/kirigami/src/libkirigami/tabletmodewatcher.cpp subsurface-mobile-main.cpp subsurface-helper.cpp - map-widget/qmlmapwidgethelper.cpp ) include_directories(${CMAKE_SOURCE_DIR}/mobile-widgets/qml/kirigami/src/libkirigami) add_definitions(-DKIRIGAMI_BUILD_TYPE_STATIC) @@ -324,6 +324,7 @@ if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable") target_link_libraries( ${SUBSURFACE_TARGET} subsurface_profile + subsurface_mapwidget subsurface_models_mobile subsurface_corelib ${SUBSURFACE_LINK_LIBRARIES} @@ -346,6 +347,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable") subsurface_interface subsurface_profile subsurface_statistics + subsurface_mapwidget subsurface_models_desktop subsurface_commands_desktop subsurface_corelib diff --git a/map-widget/CMakeLists.txt b/map-widget/CMakeLists.txt new file mode 100644 index 000000000..4f1b5dc33 --- /dev/null +++ b/map-widget/CMakeLists.txt @@ -0,0 +1,8 @@ +# map widget to show locations + +# library used by mobile build +set(SUBSURFACE_MAPWIDGET_SRCS + qmlmapwidgethelper.cpp +) +add_library(subsurface_mapwidget STATIC ${SUBSURFACE_MAPWIDGET_SRCS}) +target_link_libraries(subsurface_mapwidget ${QT_LIBRARIES})