CMakeLists.txt 1.14 KB
Newer Older
1
add_subdirectory(plugins)
2

3
if(KF5I18n_FOUND)
4
    add_definitions(-DKDECOMPONENTS)
5
endif()
6

7
8
qt5_add_resources(KALGEBRAMOBILE_SRCS resources.qrc)
add_executable(kalgebramobile pluginsmodel.cpp
9
    kalgebramobile.cpp main.cpp ${KALGEBRAMOBILE_SRCS})
10

11
target_link_libraries(kalgebramobile Qt5::Qml Qt5::Quick Qt5::Gui
12
    KF5::Analitza KF5::AnalitzaGui KF5::AnalitzaPlot)
13

Laurent Montel's avatar
Laurent Montel committed
14
set(DESKTOPFILE_INSTALL ${KDE_INSTALL_APPDIR})
15
if(${MOBILE_BACKEND} STREQUAL "harmattan")
16
    set(DESKTOPFILE_INSTALL ${KDE_INSTALL_APPDIR}/..)
17
18
19
20
21
elseif(${MOBILE_BACKEND} STREQUAL "material")
#   Material requires QtSvg for icons
#   if we don't link it here explicitly, androiddeployqt doesn't bring it
    find_package(Qt5Svg REQUIRED)
    target_link_libraries(kalgebramobile Qt5::Svg)
22
23
elseif(KF5I18n_FOUND)
    target_link_libraries(kalgebramobile KF5::I18n)
24
endif()
25

26
set(DESKTOPFILE kalgebramobile.desktop)
27
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/kalgebramobile${MOBILE_BACKEND}.desktop)
28
    set(DESKTOPFILE kalgebramobile${MOBILE_BACKEND}.desktop)
29
endif()
30

Laurent Montel's avatar
Laurent Montel committed
31
install(TARGETS kalgebramobile ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
32
install(PROGRAMS ${DESKTOPFILE} DESTINATION ${DESKTOPFILE_INSTALL} )