aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: d66cc1cac4c664af53167dd963a1a0d954027bc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
add_definitions(-DG_LOG_DOMAIN="${CMAKE_PROJECT_NAME}")

add_compile_options(
  ${CXX_WARNING_ARGS}
)

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 ()

if (ENABLE_COLOR_TEMP)
    list (APPEND
          SERVICE_LIB_SOURCES
          solar.c
    )
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
)

target_link_libraries(${SERVICE_EXEC}
    ${SERVICE_LIB}
    ${SERVICE_DEPS_LIBRARIES}
    ${THREAD_LINK_LIBRARIES}
)

install(
    TARGETS
        ${SERVICE_EXEC}
    RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}"
)