aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src/CMakeLists.txt
blob: 9a4984020d7b3c65df75af4a1225201ba9c37dba (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
project(src)

set(QMENUMODEL_SRC
    actionstateparser.cpp
    converter.cpp
    dbus-enums.h
    menunode.cpp
    qmenumodel.cpp
    qdbusobject.cpp
    qdbusmenumodel.cpp
    qdbusactiongroup.cpp
    qmenumodelevents.cpp
    qstateaction.cpp
    unitymenuaction.cpp
    unitymenuactionevents.cpp
    unitymenumodel.cpp
    unitymenumodelevents.cpp
    gtk/gtkactionmuxer.c
    gtk/gtkactionmuxer.h
    gtk/gtkactionobservable.c
    gtk/gtkactionobservable.h
    gtk/gtkactionobserver.c
    gtk/gtkactionobserver.h
    gtk/gtksimpleactionobserver.c
    gtk/gtksimpleactionobserver.h
    gtk/gtkmenutracker.c
    gtk/gtkmenutracker.h
    gtk/gtkmenutrackeritem.c
    gtk/gtkmenutrackeritem.h
)

set(SHAREDLIBNAME qmenumodel)
add_library(${SHAREDLIBNAME} SHARED
    ${QMENUMODEL_SRC}
)

set_target_properties(${SHAREDLIBNAME} PROPERTIES
    COMPILE_FLAGS -fPIC
    SOVERSION 0
    VERSION 0.1.1
)

include_directories(
    ${GLIB_INCLUDE_DIRS}
    ${GIO_INCLUDE_DIRS}
)

find_package(Qt5Quick REQUIRED)
target_link_libraries(${SHAREDLIBNAME}
    ${GLIB_LDFLAGS}
    ${GIO_LDFLAGS}
    Qt5::Core Qt5::Qml Qt5::Quick
)

install(TARGETS ${SHAREDLIBNAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

set(QMENUMODEL_HEADERS
    actionstateparser.h
    dbus-enums.h
    qdbusactiongroup.h
    qdbusmenumodel.h
    qdbusobject.h
    qmenumodel.h
    qstateaction.h
    unitymenuaction.h
    unitymenumodel.h
)

set(INCLUDEDIR qmenumodel)
install(FILES ${QMENUMODEL_HEADERS}
    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${INCLUDEDIR}
)

set(PCFILE qmenumodel.pc)
configure_file(${PCFILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${PCFILE} @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}
    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)