-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
47 lines (36 loc) · 1.61 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
project(kde-thumbnailer-qoi)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.3.0")
find_package(ECM 1.0.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR})
find_package(GObject REQUIRED)
find_package(GLIB2 REQUIRED)
find_package(LIBGSF REQUIRED)
find_program(XDG-MIME_EXECUTABLE xdg-mime)
find_program(XDG-DESKTOP-MENU_EXECUTABLE xdg-desktop-menu)
include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS PrintSupport Gui)
find_package(KF5 REQUIRED COMPONENTS KIO Archive)
add_definitions(${QT_DEFINITIONS} ${KF5_DEFINITIONS} -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
include_directories(${GLIB2_INCLUDE_DIR})
include_directories(${QT_INCLUDES} ${KF5_INCLUDES})
set(libqoi_SRCS
"qoi/qoi.h"
)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(qoithumbnail_SRCS qoicreator.cpp ${libqoi_SRCS})
add_library(qoithumbnail ${qoithumbnail_SRCS})
target_link_libraries(qoithumbnail
Qt5::Gui KF5::KIOWidgets
${GOBJECT_LIBRARIES}
${LIBGSF_LIBRARIES}
)
install(TARGETS qoithumbnail DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES qoithumbnail.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(CODE "execute_process(COMMAND ${XDG-MIME_EXECUTABLE} default qoithumbnail.desktop image/x-qoi)")
#install(CODE "execute_process(COMMAND ${XDG-MIME_EXECUTABLE} install --novendor mime/q-qoi.xml)")
#install(CODE "execute_process(COMMAND ${XDG-DESKTOP-MENU_EXECUTABLE} install --novendor qoithumbnail.desktop)")