From f26dba318ecc765f41b909e3e0dde470988f738c Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 14 Nov 2022 10:58:52 +0100 Subject: Allow building with(out) Lomiri features --- src/CMakeLists.txt | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b7e91aa..33e42c3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,19 +4,29 @@ add_compile_options( ${CXX_WARNING_ARGS} ) -add_library( - ${SERVICE_LIB} - STATIC - adbd-client.cpp - exporter.cpp - greeter.cpp - indicator.cpp - rotation-lock.cpp - usb-manager.cpp - usb-monitor.cpp - usb-snap.cpp +set (SERVICE_LIB_SOURCES + exporter.cpp + indicator.cpp + rotation-lock.cpp ) +if (ENABLE_LOMIRI_FEATURES) + list (APPEND + SERVICE_LIB_SOURCES + greeter.cpp + adbd-client.cpp + usb-manager.cpp + usb-monitor.cpp + usb-snap.cpp + ) +endif () + +add_library (${SERVICE_LIB} STATIC ${SERVICE_LIB_SOURCES}) + +if (ENABLE_LOMIRI_FEATURES) + target_link_libraries(${SERVICE_LIB} Qt5::Core) +endif () + add_executable( ${SERVICE_EXEC} main.cpp -- cgit v1.2.3