Commit 7960e601 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use new kde macro

parent 684b727c
project(kalgebra)
cmake_minimum_required(VERSION 2.8.11)
find_package(ECM 1.3.0 REQUIRED NO_MODULE)
find_package(ECM 1.7.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${ECM_MODULE_PATH})
find_package(Qt5 5.2 REQUIRED NO_MODULE COMPONENTS Qml Quick Xml Svg OpenGL PrintSupport Test)
......@@ -10,6 +10,7 @@ include(KDECompilerSettings)
include(KDECMakeSettings)
include(ECMInstallIcons)
include(FeatureSummary)
include(ECMAddAppIcon)
find_package(Analitza5 REQUIRED)
......@@ -68,6 +69,6 @@ if(KF5DocTools_FOUND)
add_subdirectory(doc)
endif()
install(FILES kalgebra.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata/)
install(FILES kalgebra.appdata.xml DESTINATION ${KDE_INSTALL_DATAROOTDIR}/appdata/)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -15,5 +15,5 @@ endif()
add_executable(calgebra main.cpp)
target_link_libraries(calgebra Qt5::Core ${READLINE_LIBRARY} KF5::Analitza)
install(TARGETS calgebra ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS calgebra ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
#
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kalgebra)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR kalgebra)
......@@ -6,5 +6,5 @@ ecm_install_icons(ICONS
hi128-apps-kalgebra.png
hisc-apps-kalgebra.svgz
THEME hicolor
DESTINATION ${ICON_INSTALL_DIR} )
DESTINATION ${KDE_INSTALL_ICONDIR} )
......@@ -11,9 +11,9 @@ add_executable(kalgebramobile pluginsmodel.cpp
target_link_libraries(kalgebramobile Qt5::Qml Qt5::Quick Qt5::Gui
KF5::Analitza KF5::AnalitzaGui KF5::AnalitzaPlot)
set(DESKTOPFILE_INSTALL ${XDG_APPS_INSTALL_DIR})
set(DESKTOPFILE_INSTALL ${KDE_INSTALL_APPDIR})
if(${MOBILE_BACKEND} STREQUAL "harmattan")
set(DESKTOPFILE_INSTALL ${XDG_APPS_INSTALL_DIR}/..)
set(DESKTOPFILE_INSTALL ${KDE_INSTALL_APPDIR}/..)
elseif(KDeclarative_FOUND)
target_link_libraries(kalgebramobile KF5::KDeclarative)
endif()
......@@ -23,5 +23,5 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/kalgebramobile${MOBILE_BACKEND}.desktop)
set(DESKTOPFILE kalgebramobile${MOBILE_BACKEND}.desktop)
endif()
install(TARGETS kalgebramobile ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kalgebramobile ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS ${DESKTOPFILE} DESTINATION ${DESKTOPFILE_INSTALL} )
......@@ -5,5 +5,5 @@ install( FILES
About.qml VariablesView.qml
kalgebraabout.json
kalgebraconsole.json kalgebraplot2d.json kalgebratables.json kalgebravariables.json
DESTINATION ${DATA_INSTALL_DIR}/kalgebramobile/plugins/
DESTINATION ${KDE_INSTALL_DATADIR}/kalgebramobile/plugins/
)
......@@ -2,5 +2,5 @@ add_subdirectory(${MOBILE_BACKEND})
install( FILES
qmldir
DESTINATION ${DATA_INSTALL_DIR}/kalgebramobile/plugins/widgets/
DESTINATION ${KDE_INSTALL_DATADIR}/kalgebramobile/plugins/widgets/
)
......@@ -3,5 +3,5 @@ install( FILES
Keyboard.qml RealInput.qml SimpleListView.qml
KAlgebraPage.qml KAlgebraMobile.qml
DESTINATION ${DATA_INSTALL_DIR}/kalgebramobile/plugins/widgets/
DESTINATION ${KDE_INSTALL_DATADIR}/kalgebramobile/plugins/widgets/
)
......@@ -3,5 +3,5 @@ install( FILES
RealInput.qml SimpleListView.qml ScrollDecorator.qml
KAlgebraPage.qml KAlgebraMobile.qml
DESTINATION ${DATA_INSTALL_DIR}/kalgebramobile/plugins/widgets/
DESTINATION ${KDE_INSTALL_DATADIR}/kalgebramobile/plugins/widgets/
)
......@@ -3,5 +3,5 @@ install( FILES
RealInput.qml SimpleListView.qml
KAlgebraPage.qml KAlgebraMobile.qml
DESTINATION ${DATA_INSTALL_DIR}/kalgebramobile/plugins/widgets/
DESTINATION ${KDE_INSTALL_DATADIR}/kalgebramobile/plugins/widgets/
)
# add_subdirectory(calculator)
# TODO: port to QML
install(DIRECTORY graphsplasmoid/ DESTINATION ${DATA_INSTALL_DIR}/plasma/plasmoids/org.kde.graphsplasmoid)
install(FILES graphsplasmoid/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME graphsplasmoid.desktop)
install(DIRECTORY graphsplasmoid/ DESTINATION ${KDE_INSTALL_DATADIR}/plasma/plasmoids/org.kde.graphsplasmoid)
install(FILES graphsplasmoid/metadata.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} RENAME graphsplasmoid.desktop)
......@@ -6,6 +6,6 @@ set(kalgebraplasma_SRCS kalgebraplasma.cpp)
add_library(plasma_applet_kalgebra MODULE ${kalgebraplasma_SRCS})
target_link_libraries(plasma_applet_kalgebra ${KF5::plasma} KF5::Analitza)
set(plugin_dir ${PLUGIN_INSTALL_DIR}/plugins/kalgebra)
install(TARGETS plasma_applet_kalgebra DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES kalgebraplasmoid.desktop DESTINATION ${SERVICES_INSTALL_DIR})
set(plugin_dir ${KDE_INSTALL_PLUGINDIR}/plugins/kalgebra)
install(TARGETS plasma_applet_kalgebra DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES kalgebraplasmoid.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
......@@ -30,8 +30,8 @@ if(OPENGL_FOUND)
target_link_libraries(kalgebra Qt5::OpenGL ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
endif(OPENGL_FOUND)
install(TARGETS kalgebra ${INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.kalgebra.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install(FILES kalgebra.xml DESTINATION ${DATA_INSTALL_DIR}/katepart5/syntax )
install(TARGETS kalgebra ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.kalgebra.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install(FILES kalgebra.xml DESTINATION ${KDE_INSTALL_DATADIR}/katepart5/syntax )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment