-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (42 loc) · 1.48 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.16)
project(ilbm-thumb-kde
DESCRIPTION "ILBM file thumbnail generator for Plasma"
)
set(QT_MIN_VERSION "5.3.0")
set(KF5_MIN_VERSION "5.2.0")
find_package(ECM 1.0.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(FeatureSummary)
# Find Qt modules
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core # QCommandLineParser, QStringLiteral
Widgets # QApplication
)
# Find KDE modules
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
KIO
)
include(ECMSetupQtPluginMacroNames)
ecm_setup_qtplugin_macro_names(
JSON_ARG2
"EXPORT_THUMBNAILER_WITH_JSON"
CONFIG_CODE_VARIABLE
PACKAGE_SETUP_AUTOMOC_VARIABLES
)
find_package(ImageMagick REQUIRED COMPONENTS Magick++)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
set(ilbmthumbnail_SRCS ilbmcreator.cpp)
add_library(ilbmthumbnail MODULE ${ilbmthumbnail_SRCS})
add_definitions(-fexceptions)
target_link_libraries(ilbmthumbnail
Qt5::Widgets
KF5::KIOWidgets
${ImageMagick_Magick++_LIBRARY}
)
target_include_directories(ilbmthumbnail PUBLIC ${ImageMagick_Magick++_INCLUDE_DIRS})
install(TARGETS ilbmthumbnail DESTINATION ${LIB_INSTALL_DIR}/qt5/plugins/)
install(FILES ilbmthumbnail.desktop DESTINATION ${SERVICES_INSTALL_DIR})
add_subdirectory(test)