Changeset View
Changeset View
Standalone View
Standalone View
lib/CMakeLists.txt
1 | add_definitions(-DTRANSLATION_DOMAIN=\"milou\") | 1 | add_definitions(-DTRANSLATION_DOMAIN=\"milou\") | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") | 3 | if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") | ||
4 | # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros. | 4 | # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros. | ||
5 | # 3.10+ lets us provide more macro names that require automoc. | 5 | # 3.10+ lets us provide more macro names that require automoc. | ||
6 | list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "MILOU_EXPORT_PREVIEW") | 6 | list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "MILOU_EXPORT_PREVIEW") | ||
7 | endif() | 7 | endif() | ||
8 | 8 | | |||
9 | set (lib_SRCS | 9 | set (lib_SRCS | ||
10 | preview.cpp | 10 | preview.cpp | ||
11 | previewplugin.cpp | 11 | previewplugin.cpp | ||
12 | resultsmodel.cpp | ||||
13 | runnerresultsmodel.cpp | ||||
12 | sourcesmodel.cpp | 14 | sourcesmodel.cpp | ||
13 | draghelper.cpp | 15 | draghelper.cpp | ||
14 | mousehelper.cpp | 16 | mousehelper.cpp | ||
15 | ) | 17 | ) | ||
16 | 18 | | |||
17 | add_library(milou SHARED ${lib_SRCS}) | 19 | add_library(milou SHARED ${lib_SRCS}) | ||
18 | set_target_properties(milou PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} ) | 20 | set_target_properties(milou PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} ) | ||
19 | 21 | | |||
20 | target_link_libraries (milou | 22 | target_link_libraries (milou | ||
21 | Qt5::Qml | 23 | Qt5::Qml | ||
22 | Qt5::Quick | 24 | Qt5::Quick | ||
23 | Qt5::Widgets # for QAction... | 25 | Qt5::Widgets # for QAction... | ||
26 | KF5::ItemModels | ||||
24 | KF5::Service | 27 | KF5::Service | ||
25 | KF5::Plasma | 28 | KF5::Plasma | ||
26 | KF5::Runner | 29 | KF5::Runner | ||
27 | ) | 30 | ) | ||
28 | 31 | | |||
29 | install( | 32 | install( | ||
30 | FILES miloupreviewplugin.desktop | 33 | FILES miloupreviewplugin.desktop | ||
31 | DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) | 34 | DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) | ||
32 | 35 | | |||
33 | generate_export_header(milou BASE_NAME MILOU EXPORT_FILE_NAME milou_export.h) | 36 | generate_export_header(milou BASE_NAME MILOU EXPORT_FILE_NAME milou_export.h) | ||
34 | 37 | | |||
35 | install(TARGETS milou EXPORT MilouLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) | 38 | install(TARGETS milou EXPORT MilouLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) | ||
36 | 39 | | |||
37 | add_subdirectory(qml) | 40 | add_subdirectory(qml) | ||
38 | add_subdirectory(previews) | 41 | add_subdirectory(previews) | ||
39 | add_subdirectory(test) | 42 | add_subdirectory(test) |