aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: 4fe7b1ad467e7abb9040890215c68fb8beb68372 (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

add_definitions(-DG_LOG_DOMAIN="${CMAKE_PROJECT_NAME}")

add_compile_options(
  ${CXX_WARNING_ARGS}
  ${GCOV_FLAGS}
)

add_library(
    ${SERVICE_LIB}
    STATIC
    adbd-client.cpp
    exporter.cpp
    indicator.cpp
    rotation-lock.cpp
    usb-manager.cpp
    usb-snap.cpp
)

add_executable(
    ${SERVICE_EXEC}
    main.cpp
)

if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.2)
    set(SERVICE_THREAD_LIBS -pthread)
else()
    set(SERVICE_THREAD_LIBS Threads::Threads)
endif()

target_link_libraries(${SERVICE_EXEC}
    ${SERVICE_LIB}
    ${SERVICE_DEPS_LIBRARIES}
    ${SERVICE_THREAD_LIBS}
    ${GCOV_LIBS}
)

install(
    TARGETS
        ${SERVICE_EXEC}
    RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}
)