aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2022-11-14 10:58:52 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-12-15 20:27:19 +0100
commitf26dba318ecc765f41b909e3e0dde470988f738c (patch)
treea1e96036ace3acfed6c86b436ce32c71ded4abe6 /src/CMakeLists.txt
parent796525b933045a6477f57a60aff394cdd5f62a32 (diff)
downloadayatana-indicator-display-f26dba318ecc765f41b909e3e0dde470988f738c.tar.gz
ayatana-indicator-display-f26dba318ecc765f41b909e3e0dde470988f738c.tar.bz2
ayatana-indicator-display-f26dba318ecc765f41b909e3e0dde470988f738c.zip
Allow building with(out) Lomiri features
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt32
1 files changed, 21 insertions, 11 deletions
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