aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: e4ca3439a62e559ba89dadbee0c0aa2e8fd9516f (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
cmake_minimum_required(VERSION 3.13)

# libayatana-keyboard-backend-x11.so

add_library("ayatana-keyboard-x11" SHARED keyboard-x11.c)
target_link_libraries("ayatana-keyboard-x11" ${SERVICE_DEPS_LIBRARIES} ${X11_DEPS_LIBRARIES})
set_target_properties("ayatana-keyboard-x11" PROPERTIES VERSION 0.0.0 SOVERSION 0)
install(TARGETS "ayatana-keyboard-x11" DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})

# libayatana-keyboard-backend-lomiri.so

add_library("ayatana-keyboard-lomiri" SHARED keyboard-lomiri.c)
target_link_libraries("ayatana-keyboard-lomiri" ${SERVICE_DEPS_LIBRARIES})
set_target_properties("ayatana-keyboard-lomiri" PROPERTIES VERSION 0.0.0 SOVERSION 0)
install(TARGETS "ayatana-keyboard-lomiri" DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})

# libayatanaindicatorkeyboardservice.a

add_definitions(-DG_LOG_DOMAIN="ayatana-indicator-keyboard")
set_source_files_properties(service.c PROPERTIES COMPILE_FLAGS "-std=c99")
add_library("ayatanaindicatorkeyboardservice" STATIC service.c)
include_directories(${CMAKE_SOURCE_DIR})
link_directories(${SERVICE_DEPS_LIBRARY_DIRS})

# ayatana-indicator-keyboard-service

add_executable("ayatana-indicator-keyboard-service" main.c)
set_source_files_properties(service.c main.c PROPERTIES COMPILE_FLAGS "-std=c99")
target_link_libraries("ayatana-indicator-keyboard-service" "ayatanaindicatorkeyboardservice" "${SERVICE_DEPS_LIBRARIES} -ldl")
install(TARGETS "ayatana-indicator-keyboard-service" RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}")