[Kst] branches/work/kst/portto4/kst/cmake
Peter Kümmel
syntheticpp at gmx.net
Thu Jan 13 20:25:29 CET 2011
SVN commit 1214248 by kuemmel:
cmake: install .desktop files
M +5 -5 CMakeLists.txt
M +9 -1 modules/KstMacros.cmake
M +15 -0 src/kst/CMakeLists.txt
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1214247:1214248
@@ -97,9 +97,12 @@
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# the RPATH to be used when installing
-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+#path to install the .desktop files
+set(kst_install_plugin_desktop_file_path share/services/kst)
+
if(MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()
@@ -110,10 +113,7 @@
configure_file(${kst_dir}/cmake/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
-include_directories(
- ${CMAKE_BINARY_DIR}
- ${QT_INCLUDES}
- )
+include_directories(${CMAKE_BINARY_DIR} ${QT_INCLUDES})
message(STATUS "Build summary----------------------------------")
--- branches/work/kst/portto4/kst/cmake/modules/KstMacros.cmake #1214247:1214248
@@ -128,7 +128,7 @@
add_library(${kst_name} MODULE ${kst_${kst_name}_sources} ${kst_${kst_name}_headers})
kst_link(kstcore kstmath kstwidgets)
install(TARGETS ${kst_name} LIBRARY DESTINATION plugin)
- # TODO install(FILES *.desktop DESTINATION share/services/kst)
+ kst_find_install_desktop_file(${kst_plugin_dir}/${folder}/${name})
if(kst_verbose)
message(STATUS "Building plugin ${kst_name}")
endif()
@@ -142,6 +142,14 @@
endmacro()
+macro(kst_find_install_desktop_file folder)
+ if(UNIX)
+ file(GLOB _desktop_file ${kst_dir}/${folder}/*.desktop)
+ install(FILES ${_desktop_file} DESTINATION ${kst_install_plugin_desktop_file_path})
+ endif()
+endmacro()
+
+
macro(kst_link)
target_link_libraries(${kst_name} ${ARGV}
${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTSVG_LIBRARY})
--- branches/work/kst/portto4/kst/cmake/src/kst/CMakeLists.txt #1214247:1214248
@@ -25,3 +25,18 @@
kst_link(kstcore kstmath kstapp kstwidgets)
kst_install_executable()
+
+if(UNIX)
+ set(k ${kst_dir}/src/kst)
+ install(FILES ${k}/kstplugin.desktop
+ ${k}/kstdatasourceplugin.desktop
+ ${k}/kstdataobjectplugin.desktop
+ ${k}/kstbasicplugin.desktop
+ ${k}/kstfilter.desktop
+ ${k}/kstextension.desktop
+ DESTINATION share/servicetypes/kst)
+ install(FILES ${k}/kst.desktop DESTINATION share/applnk/Graphics)
+ install(FILES ${k}/kstui.rc DESTINATION share/apps/kst)
+ install(FILES ${k}/x-kst.desktop DESTINATION share/mimelink/application)
+ install(FILES ${k}/kst.desktop DESTINATION share/applications)
+endif()
More information about the Kst
mailing list